diff options
Diffstat (limited to 'sapi/cli')
| -rw-r--r-- | sapi/cli/tests/007.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/008.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/010-2.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/011.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/013.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/014.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/022.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/argv_mb.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/argv_mb_bug77111.phpt | 8 | ||||
| -rw-r--r-- | sapi/cli/tests/bug71624.phpt | 2 | ||||
| -rw-r--r-- | sapi/cli/tests/php_cli_server_015.phpt | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/sapi/cli/tests/007.phpt b/sapi/cli/tests/007.phpt index dd8e17163c..51858bae48 100644 --- a/sapi/cli/tests/007.phpt +++ b/sapi/cli/tests/007.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { $php = getenv('TEST_PHP_EXECUTABLE'); -$filename = dirname(__FILE__).'/007.test.php'; +$filename = __DIR__.'/007.test.php'; $code =' <?php /* some test script */ diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt index d795c98879..fb8518535a 100644 --- a/sapi/cli/tests/008.phpt +++ b/sapi/cli/tests/008.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { $php = getenv('TEST_PHP_EXECUTABLE'); -$filename = dirname(__FILE__).'/008.test.php'; +$filename = __DIR__.'/008.test.php'; $code =' <?php diff --git a/sapi/cli/tests/010-2.phpt b/sapi/cli/tests/010-2.phpt index 73198ad28b..af998351bb 100644 --- a/sapi/cli/tests/010-2.phpt +++ b/sapi/cli/tests/010-2.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { $php = getenv('TEST_PHP_EXECUTABLE'); -$filename_txt = dirname(__FILE__)."/010.test.txt"; +$filename_txt = __DIR__."/010.test.txt"; $txt = ' test diff --git a/sapi/cli/tests/011.phpt b/sapi/cli/tests/011.phpt index 1fbe93d703..3ada7c53bf 100644 --- a/sapi/cli/tests/011.phpt +++ b/sapi/cli/tests/011.phpt @@ -7,7 +7,7 @@ syntax check $php = getenv('TEST_PHP_EXECUTABLE'); -$filename = dirname(__FILE__)."/011.test.php"; +$filename = __DIR__."/011.test.php"; $code = ' <?php diff --git a/sapi/cli/tests/013.phpt b/sapi/cli/tests/013.phpt index 9e17c009c2..3ca2ba833c 100644 --- a/sapi/cli/tests/013.phpt +++ b/sapi/cli/tests/013.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { $php = getenv('TEST_PHP_EXECUTABLE'); -$filename_txt = dirname(__FILE__)."/013.test.txt"; +$filename_txt = __DIR__."/013.test.txt"; file_put_contents($filename_txt, "test\nfile\ncontents\n"); var_dump(`cat "$filename_txt" | "$php" -n -B 'var_dump("start");'`); diff --git a/sapi/cli/tests/014.phpt b/sapi/cli/tests/014.phpt index 1794d78b54..1ee72e05f6 100644 --- a/sapi/cli/tests/014.phpt +++ b/sapi/cli/tests/014.phpt @@ -7,7 +7,7 @@ syntax highlighting $php = getenv('TEST_PHP_EXECUTABLE'); -$filename = dirname(__FILE__)."/014.test.php"; +$filename = __DIR__."/014.test.php"; $code = ' <?php $test = "var"; //var diff --git a/sapi/cli/tests/022.phpt b/sapi/cli/tests/022.phpt index 0110220bee..3b97016b58 100644 --- a/sapi/cli/tests/022.phpt +++ b/sapi/cli/tests/022.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == "WIN") die("skip non windows test"); <?php $php = getenv("TEST_PHP_EXECUTABLE"); $socket_file = tempnam(sys_get_temp_dir(), pathinfo(__FILE__, PATHINFO_FILENAME) . '.sock'); -$test_file = dirname(__FILE__) . '/' . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc'; +$test_file = __DIR__ . '/' . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc'; if (file_exists($socket_file)) { unlink($socket_file); } diff --git a/sapi/cli/tests/argv_mb.phpt b/sapi/cli/tests/argv_mb.phpt index 3b7c6eac19..868b1a857f 100644 --- a/sapi/cli/tests/argv_mb.phpt +++ b/sapi/cli/tests/argv_mb.phpt @@ -9,7 +9,7 @@ include "skipif.inc"; $php = getenv('TEST_PHP_EXECUTABLE'); -$argv_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "argv_test.php"; +$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php"; file_put_contents($argv_fl, "<?php var_dump(\$argv); ?>"); var_dump(`$php -n $argv_fl 多字节字符串 マルチバイト文字列 многобайтоваястрока flerbytesträng`); diff --git a/sapi/cli/tests/argv_mb_bug77111.phpt b/sapi/cli/tests/argv_mb_bug77111.phpt index e21cc07678..45913b841f 100644 --- a/sapi/cli/tests/argv_mb_bug77111.phpt +++ b/sapi/cli/tests/argv_mb_bug77111.phpt @@ -19,9 +19,9 @@ if (!file_exists($php)) { $php = dirname(getenv('TEST_PHP_EXECUTABLE')) . DIRECTORY_SEPARATOR . "php-win.exe"; -$out_fl = dirname(__FILE__) . "\\argv_bug77111.txt"; +$out_fl = __DIR__ . "\\argv_bug77111.txt"; -$argv_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "argv_test.php"; +$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php"; file_put_contents($argv_fl, "<?php file_put_contents('$out_fl', implode(' ', array_slice(\$argv, 1))); ?>"); `$php -n $argv_fl Ästhetik Æstetik Esthétique Estética Эстетика`; @@ -31,8 +31,8 @@ var_dump(file_get_contents($out_fl)); ==DONE== --CLEAN-- <?php -$out_fl = dirname(__FILE__) . "\\argv_bug77111.txt"; -$argv_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "argv_test.php"; +$out_fl = __DIR__ . "\\argv_bug77111.txt"; +$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php"; unlink($argv_fl); unlink($out_fl); ?> diff --git a/sapi/cli/tests/bug71624.phpt b/sapi/cli/tests/bug71624.phpt index aa4c69da12..67e3e8f343 100644 --- a/sapi/cli/tests/bug71624.phpt +++ b/sapi/cli/tests/bug71624.phpt @@ -9,7 +9,7 @@ include "skipif.inc"; $php = getenv('TEST_PHP_EXECUTABLE'); -$filename_txt = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71624.test.txt"; +$filename_txt = __DIR__ . DIRECTORY_SEPARATOR . "bug71624.test.txt"; $txt = 'foo test diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt index 42000adbb9..990a3db97e 100644 --- a/sapi/cli/tests/php_cli_server_015.phpt +++ b/sapi/cli/tests/php_cli_server_015.phpt @@ -10,7 +10,7 @@ display_errors=1 <?php include "php_cli_server.inc"; php_cli_server_start('require("syntax_error.php");'); -$dir = realpath(dirname(__FILE__)); +$dir = realpath(__DIR__); file_put_contents($dir . "/syntax_error.php", "<?php non_exists_function(); ?>"); |
