diff options
| author | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 17:23:43 +0200 |
|---|---|---|
| committer | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 19:44:14 +0200 |
| commit | 17ccbeec3242b80f84fbf6b3acd58421ef003b02 (patch) | |
| tree | 8fed8d7515c6603fd4a50eb0f8177883bc6da336 /ext/mysqli/tests | |
| parent | cc7215f48f66982f0b7799c47d8fa4c09a32a3c7 (diff) | |
| download | php-git-17ccbeec3242b80f84fbf6b3acd58421ef003b02.tar.gz | |
Trim trailing whitespace in *.phpt
Diffstat (limited to 'ext/mysqli/tests')
24 files changed, 45 insertions, 45 deletions
diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt index 4896a786a8..89ad7ae3da 100644 --- a/ext/mysqli/tests/004.phpt +++ b/ext/mysqli/tests/004.phpt @@ -34,7 +34,7 @@ require_once('skipifconnectfailure.inc'); if (!$stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1")) printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - + $c1 = $c2 = NULL; mysqli_stmt_bind_result($stmt, $c1, $c2); mysqli_stmt_execute($stmt); diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt index 6500241760..719146f292 100644 --- a/ext/mysqli/tests/bug33491.phpt +++ b/ext/mysqli/tests/bug33491.phpt @@ -3,8 +3,8 @@ Bug #33491 (extended mysqli class crashes when result is not object) --INI-- error_reporting=1 --SKIPIF-- -<?php -require_once('skipif.inc'); +<?php +require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- diff --git a/ext/mysqli/tests/bug38003.phpt b/ext/mysqli/tests/bug38003.phpt index a974815d4d..bcfd239911 100644 --- a/ext/mysqli/tests/bug38003.phpt +++ b/ext/mysqli/tests/bug38003.phpt @@ -16,7 +16,7 @@ $DB = new DB(); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Fatal error: Uncaught Error: Call to private DB::__construct() from invalid context in %s Stack trace: #0 {main} diff --git a/ext/mysqli/tests/bug54221.phpt b/ext/mysqli/tests/bug54221.phpt index 78c9a2c40e..e6166e19d4 100644 --- a/ext/mysqli/tests/bug54221.phpt +++ b/ext/mysqli/tests/bug54221.phpt @@ -30,7 +30,7 @@ mysqli.reconnect = Off $warnings = $link->get_warnings(); if ($warnings) { do { - echo "Warning: ".$warnings->errno.": ".$warnings->message."\n"; + echo "Warning: ".$warnings->errno.": ".$warnings->message."\n"; } while ($warnings->next()); } } diff --git a/ext/mysqli/tests/bug55582.phpt b/ext/mysqli/tests/bug55582.phpt index 3933845147..132a731d0c 100644 --- a/ext/mysqli/tests/bug55582.phpt +++ b/ext/mysqli/tests/bug55582.phpt @@ -12,7 +12,7 @@ require_once("connect.inc"); if (!($link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))) { printf("[001] Cannot connect to the server"); } - + var_dump($link->real_query("SELECT 1")); $res = $link->use_result(); var_dump(mysqli_num_rows($res)); diff --git a/ext/mysqli/tests/bug62046.phpt b/ext/mysqli/tests/bug62046.phpt index c8ad3c3675..3ad913d951 100644 --- a/ext/mysqli/tests/bug62046.phpt +++ b/ext/mysqli/tests/bug62046.phpt @@ -16,14 +16,14 @@ require_once('skipifconnectfailure.inc'); printf("[002] Prepare failed, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); } if (FALSE === $stmt->execute()) { - printf("[003] Execute failed, [%d] %s\n", $stmt->errorno, $stmt->error); + printf("[003] Execute failed, [%d] %s\n", $stmt->errorno, $stmt->error); } if (FALSE === $stmt->store_result()) { - printf("[004] store_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); + printf("[004] store_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); } $one = NULL; if (FALSE === $stmt->bind_result($one)) { - printf("[005] bind_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); + printf("[005] bind_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); } if (FALSE === $stmt->reset()) { printf("[006] bind_result failed, [%d] %s\n", $stmt->errorno, $stmt->error); diff --git a/ext/mysqli/tests/bug70384.phpt b/ext/mysqli/tests/bug70384.phpt index aa8662badf..e3b18ae212 100644 --- a/ext/mysqli/tests/bug70384.phpt +++ b/ext/mysqli/tests/bug70384.phpt @@ -49,7 +49,7 @@ mysqli_float_handling - ensure 4 byte float is handled correctly if (json_encode($rows[0][0]) != json_encode($jsfield_data)) { printf("[006] Data differs"); var_dump(json_encode($rows[0][0]) != json_encode($jsfield_data)); - die(); + die(); } mysqli_close($link); echo "OK"; diff --git a/ext/mysqli/tests/bug70949.phpt b/ext/mysqli/tests/bug70949.phpt index 17f7f9d96b..dc7b202152 100644 --- a/ext/mysqli/tests/bug70949.phpt +++ b/ext/mysqli/tests/bug70949.phpt @@ -21,7 +21,7 @@ $mysql->query("INSERT INTO bug70949 VALUES ('dummy'),(NULL),('foo'),('bar')"); $sql = "select * from bug70949"; if ($stmt = $mysql->prepare($sql)) -{ +{ $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, MYSQLI_CURSOR_TYPE_READ_ONLY); if ($stmt->bind_result($name)) { @@ -29,7 +29,7 @@ if ($stmt = $mysql->prepare($sql)) if ($stmt->execute()) { while ($stmt->fetch()) - { + { var_dump($name); } } diff --git a/ext/mysqli/tests/bug71863.phpt b/ext/mysqli/tests/bug71863.phpt index ea0a78faeb..18465e996b 100644 --- a/ext/mysqli/tests/bug71863.phpt +++ b/ext/mysqli/tests/bug71863.phpt @@ -18,7 +18,7 @@ $req = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); // create db and table for test mysqli_query($req, "DROP TABLE IF EXISTS test_bug_71863") or die(mysqli_error($req)); mysqli_query($req, "CREATE TABLE test_bug_71863 (id INT UNSIGNED NOT NULL DEFAULT 0)") or die(mysqli_error($req)); - + // segfault if EXPLAIN + "Unknown column" error mysqli_query($req, "EXPLAIN SELECT `id` FROM `test_bug_71863` WHERE `owner_id` = '2' AND `object_id` = '1' AND type = '0'") or die(mysqli_error($req)."\n"); diff --git a/ext/mysqli/tests/bug72489.phpt b/ext/mysqli/tests/bug72489.phpt index 4e8fb3f4e5..754eadeed3 100644 --- a/ext/mysqli/tests/bug72489.phpt +++ b/ext/mysqli/tests/bug72489.phpt @@ -45,9 +45,9 @@ while ($stmt->fetch()) { echo "Finished 1\n"; $newArray = array(); - + echo "Finished 2\n"; - + ?> --CLEAN-- <?php diff --git a/ext/mysqli/tests/bug73949.phpt b/ext/mysqli/tests/bug73949.phpt index 7ce311eb77..d358c55a40 100644 --- a/ext/mysqli/tests/bug73949.phpt +++ b/ext/mysqli/tests/bug73949.phpt @@ -12,7 +12,7 @@ require_once("connect.inc"); class cc{ function __construct($c=null){ - } + } }; $i=mysqli_connect('p:'.$host, $user, $passwd, $db); $res=mysqli_query($i, "SHOW STATUS LIKE 'Connections'"); diff --git a/ext/mysqli/tests/bug_bits.phpt b/ext/mysqli/tests/bug_bits.phpt index 8a56469772..59752e4159 100644 --- a/ext/mysqli/tests/bug_bits.phpt +++ b/ext/mysqli/tests/bug_bits.phpt @@ -42,7 +42,7 @@ while ($row = $res->fetch_assoc()) { $link->close(); -echo "Done\n"; +echo "Done\n"; ?> --CLEAN-- <?php diff --git a/ext/mysqli/tests/mysqli_begin_transaction.phpt b/ext/mysqli/tests/mysqli_begin_transaction.phpt index 6c0508172f..57f0595238 100644 --- a/ext/mysqli/tests/mysqli_begin_transaction.phpt +++ b/ext/mysqli/tests/mysqli_begin_transaction.phpt @@ -97,7 +97,7 @@ if (!have_innodb($link)) $res = mysqli_query($link, "SELECT id FROM test WHERE id = 2"); } } - + if (!mysqli_begin_transaction($link, -1)) { printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); } diff --git a/ext/mysqli/tests/mysqli_connect.phpt b/ext/mysqli/tests/mysqli_connect.phpt index 8b1c923304..3ae0050017 100644 --- a/ext/mysqli/tests/mysqli_connect.phpt +++ b/ext/mysqli/tests/mysqli_connect.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_connect() --SKIPIF-- -<?php +<?php require_once('skipif.inc'); -require_once('skipifemb.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- diff --git a/ext/mysqli/tests/mysqli_connect_oo.phpt b/ext/mysqli/tests/mysqli_connect_oo.phpt index 32dfac0eb2..7b19b1e41f 100644 --- a/ext/mysqli/tests/mysqli_connect_oo.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo.phpt @@ -1,9 +1,9 @@ --TEST-- new mysqli() --SKIPIF-- -<?php +<?php require_once('skipif.inc'); -require_once('skipifemb.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- diff --git a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt index 7f049b052f..b3dde58c3d 100644 --- a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt @@ -1,9 +1,9 @@ --TEST-- new mysqli() --SKIPIF-- -<?php +<?php require_once('skipif.inc'); -require_once('skipifemb.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index dff91531ce..746e78faf5 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -67,7 +67,7 @@ require_once('skipifconnectfailure.inc'); } } catch (Throwable $e) { echo "Exception: " . $e->getMessage() . "\n"; - } + } try { $obj = mysqli_fetch_object($res, 'mysqli_fetch_object_construct', array('a')); @@ -77,7 +77,7 @@ require_once('skipifconnectfailure.inc'); } } catch (Throwable $e) { echo "Exception: " . $e->getMessage() . "\n"; - } + } $obj = mysqli_fetch_object($res, 'mysqli_fetch_object_construct', array('a', 'b')); if (($obj->ID !== "5") || ($obj->label !== "e") || ($obj->a !== 'a') || ($obj->b !== 'b') || (get_class($obj) != 'mysqli_fetch_object_construct')) { diff --git a/ext/mysqli/tests/mysqli_get_client_version.phpt b/ext/mysqli/tests/mysqli_get_client_version.phpt index 5862c0aaa1..7994c1d65c 100644 --- a/ext/mysqli/tests/mysqli_get_client_version.phpt +++ b/ext/mysqli/tests/mysqli_get_client_version.phpt @@ -4,10 +4,10 @@ mysqli_get_client_version() <?php require_once('skipif.inc'); ?> <?php require_once('skipifemb.inc'); ?> --FILE-- -<?php +<?php if (!is_int($info = mysqli_get_client_version()) || ($info < 100)) printf("[001] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info); - + print "done!"; ?> --EXPECTF-- diff --git a/ext/mysqli/tests/mysqli_get_host_info.phpt b/ext/mysqli/tests/mysqli_get_host_info.phpt index 2c3c0f806d..2dff6ae8b3 100644 --- a/ext/mysqli/tests/mysqli_get_host_info.phpt +++ b/ext/mysqli/tests/mysqli_get_host_info.phpt @@ -23,7 +23,7 @@ require_once('skipifconnectfailure.inc'); if ($IS_MYSQLND && $host != 'localhost' && $host != '127.0.0.1' && $port != '' && $host != "" && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { /* this should be a TCP/IP connection and not a Unix Socket (or SHM or Named Pipe) */ if (!stristr($info, "TCP/IP")) - printf("[004] Should be a TCP/IP connection but mysqlnd says '%s'\n", $info); + printf("[004] Should be a TCP/IP connection but mysqlnd says '%s'\n", $info); } print "done!"; ?> diff --git a/ext/mysqli/tests/mysqli_init.phpt b/ext/mysqli/tests/mysqli_init.phpt index 1abb7ca37e..0c4059175b 100644 --- a/ext/mysqli/tests/mysqli_init.phpt +++ b/ext/mysqli/tests/mysqli_init.phpt @@ -1,9 +1,9 @@ --TEST-- mysqli_init() --SKIPIF-- -<?php +<?php require_once('skipif.inc'); -require_once('skipifemb.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt index 5daaa597fa..32bfb97906 100644 --- a/ext/mysqli/tests/mysqli_options.phpt +++ b/ext/mysqli/tests/mysqli_options.phpt @@ -58,7 +58,7 @@ require_once('skipifconnectfailure.inc'); var_dump("MYSQLI_OPT_LOCAL_INFILE", mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, 1)); var_dump("MYSQLI_INIT_COMMAND", mysqli_options($link, MYSQLI_INIT_COMMAND, array('SET AUTOCOMMIT=0', 'SET AUTOCOMMIT=1'))); - + if (!$link2 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); @@ -104,7 +104,7 @@ require_once('skipifconnectfailure.inc'); /* mysqli_real_connect() */ var_dump("MYSQLI_CLIENT_SSL", mysqli_options($link, MYSQLI_CLIENT_SSL, 'not a mysqli_option')); - + mysqli_close($link); echo "Link closed"; diff --git a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt index 4b0c947191..42acfd2af0 100644 --- a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt +++ b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt @@ -7,7 +7,7 @@ require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); -if (!$IS_MYSQLND) +if (!$IS_MYSQLND) die("skip mysqlnd only test"); ?> --FILE-- @@ -45,12 +45,12 @@ if (!$IS_MYSQLND) printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); continue; } - + if (!mysqli_query($link, sprintf("CREATE TABLE test (id %s)", $data[0]))) { printf("[004] TODO [%d] %s\n", mysqli_errno($link), mysqli_error($link)); continue; } - + if (!mysqli_query($link, sprintf("INSERT INTO test(id) VALUES (%f)", $data[1]))) { printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); continue; @@ -65,7 +65,7 @@ if (!$IS_MYSQLND) mysqli_free_result($res); if ($row['id'] !== $data[1]) { - printf("[007] Expecting %s - %s/%s got %s/%s\n", + printf("[007] Expecting %s - %s/%s got %s/%s\n", $name, $data[1], gettype($data[1]), $row['id'], gettype($row['id'])); } @@ -81,7 +81,7 @@ if (!$IS_MYSQLND) printf("[009] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); continue; } - + if (!$res = mysqli_query($link, "SELECT id FROM test")) { printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); continue; @@ -91,14 +91,14 @@ if (!$IS_MYSQLND) mysqli_free_result($res); if (!is_string($row['id']) || ($row['id'] != $data[1])) { - printf("[011] Expecting %s - %s/string got %s/%s\n", + printf("[011] Expecting %s - %s/string got %s/%s\n", $name, $data[1], $row['id'], gettype($row['id'])); - } - mysqli_close($link); + } + mysqli_close($link); } - + print "done!"; ?> --CLEAN-- diff --git a/ext/mysqli/tests/mysqli_select_db.phpt b/ext/mysqli/tests/mysqli_select_db.phpt index f58a19bea3..0a7acb4b20 100644 --- a/ext/mysqli/tests/mysqli_select_db.phpt +++ b/ext/mysqli/tests/mysqli_select_db.phpt @@ -67,7 +67,7 @@ require_once('skipifconnectfailure.inc'); $current_db = $row['dbname']; - mysqli_report(MYSQLI_REPORT_OFF); + mysqli_report(MYSQLI_REPORT_OFF); mysqli_select_db($link, 'I can not imagine that this database exists'); mysqli_report(MYSQLI_REPORT_ERROR); @@ -91,7 +91,7 @@ require_once('skipifconnectfailure.inc'); if (strtolower($row['dbname']) != strtolower($current_db)) printf("[017] Current DB should not change if set fails\n"); - + if (!$res = $link->query("SELECT id FROM test WHERE id = 1")) printf("[018] [%d] %s\n"); diff --git a/ext/mysqli/tests/mysqli_stmt_multires.phpt b/ext/mysqli/tests/mysqli_stmt_multires.phpt index 28cf5e38f4..7420e85b9d 100644 --- a/ext/mysqli/tests/mysqli_stmt_multires.phpt +++ b/ext/mysqli/tests/mysqli_stmt_multires.phpt @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); if (!$link->query("CREATE PROCEDURE p123() BEGIN SELECT id+12, CONCAT_WS('-',label,'ahoi') FROM test ORDER BY id LIMIT 1; SELECT id + 42, CONCAT_WS('---',label, label) FROM test ORDER BY id LIMIT 1; END")) { printf("[002] [%d] %s\n", $link->error, $link->errno); } - + if (!($stmt = $link->prepare("CALL p123"))) { printf("[003] [%d] %s\n", $stmt->error, $stmt->errno); } |
