diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2019-03-15 22:55:30 +0100 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-03-15 22:55:30 +0100 |
commit | 26dfce7f36d1c6f737ac241df1315a1b42b932c7 (patch) | |
tree | 570279b2f4d66a3de7f6ff7f7c865654ad04cea4 | |
parent | 63802a8446691869371bb37078d55b99cae7eb95 (diff) | |
download | php-git-26dfce7f36d1c6f737ac241df1315a1b42b932c7.tar.gz |
Replace dirname(__FILE__) by __DIR__ in tests
2845 files changed, 5630 insertions, 5630 deletions
diff --git a/Zend/tests/014.phpt b/Zend/tests/014.phpt index 18037a99e3..a2c5335923 100644 --- a/Zend/tests/014.phpt +++ b/Zend/tests/014.phpt @@ -5,17 +5,17 @@ get_included_files() tests var_dump(get_included_files()); -include(dirname(__FILE__)."/014.inc"); +include(__DIR__."/014.inc"); var_dump(get_included_files()); var_dump(get_included_files(1,1)); -include_once(dirname(__FILE__)."/014.inc"); +include_once(__DIR__."/014.inc"); var_dump(get_included_files()); var_dump(get_included_files(1)); -include(dirname(__FILE__)."/014.inc"); +include(__DIR__."/014.inc"); var_dump(get_included_files()); echo "Done\n"; diff --git a/Zend/tests/019.phpt b/Zend/tests/019.phpt index 2b1c17bd1e..cde590734f 100644 --- a/Zend/tests/019.phpt +++ b/Zend/tests/019.phpt @@ -151,7 +151,7 @@ foreach ($array_variables as $array_var) { echo "\n*** Testing unset(), empty() & isset() with resource variables ***\n"; $fp = fopen(__FILE__, "r"); -$dfp = opendir( dirname(__FILE__) ); +$dfp = opendir( __DIR__ ); $resources = array ( $fp, $dfp diff --git a/Zend/tests/bug21478.phpt b/Zend/tests/bug21478.phpt index 8da1980400..2738b7964d 100644 --- a/Zend/tests/bug21478.phpt +++ b/Zend/tests/bug21478.phpt @@ -15,7 +15,7 @@ class debugfilter extends php_user_filter { stream_filter_register("myfilter","debugfilter"); -$fp = fopen(dirname(__FILE__)."/test.txt","w"); +$fp = fopen(__DIR__."/test.txt","w"); stream_filter_append($fp, "myfilter"); stream_filter_append($fp, "myfilter"); stream_filter_append($fp, "myfilter"); @@ -24,8 +24,8 @@ print "Done.\n"; fclose($fp); // Uncommenting the following 'print' line causes the segfault to stop occurring // print "2\n"; -readfile(dirname(__FILE__)."/test.txt"); -unlink(dirname(__FILE__)."/test.txt"); +readfile(__DIR__."/test.txt"); +unlink(__DIR__."/test.txt"); ?> --EXPECT-- Done. diff --git a/Zend/tests/bug38779_1.phpt b/Zend/tests/bug38779_1.phpt index 2b69653eb0..f4f89235a4 100644 --- a/Zend/tests/bug38779_1.phpt +++ b/Zend/tests/bug38779_1.phpt @@ -23,14 +23,14 @@ class Loader { var_dump("flush!"); } function stream_close() { - @unlink(dirname(__FILE__)."/bug38779.txt"); + @unlink(__DIR__."/bug38779.txt"); var_dump("close!"); } } stream_wrapper_register('Loader', 'Loader'); $fp = fopen ('Loader://qqq.php', 'r'); -$filename = dirname(__FILE__)."/bug38779.txt"; +$filename = __DIR__."/bug38779.txt"; $fp1 = fopen($filename, "w"); fwrite($fp1, "<"."?php blah blah?".">"); fclose($fp1); @@ -42,9 +42,9 @@ echo "Done\n"; --CLEAN-- <?php -$filename = dirname(__FILE__)."/bug38779.txt"; +$filename = __DIR__."/bug38779.txt"; if (file_exists($filename)) { - @unlink(dirname(__FILE__)."/bug38779.txt"); + @unlink(__DIR__."/bug38779.txt"); } ?> --EXPECTF-- diff --git a/Zend/tests/bug39542.phpt b/Zend/tests/bug39542.phpt index 1409c4181c..336deb7f18 100644 --- a/Zend/tests/bug39542.phpt +++ b/Zend/tests/bug39542.phpt @@ -3,11 +3,11 @@ Bug #39542 (Behaviour of require_once/include_once different to < 5.2.0) --FILE-- <?php $oldcwd = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); if (substr(PHP_OS, 0, 3) == 'WIN') { - set_include_path(dirname(__FILE__).'/bug39542;.'); + set_include_path(__DIR__.'/bug39542;.'); } else { - set_include_path(dirname(__FILE__).'/bug39542:.'); + set_include_path(__DIR__.'/bug39542:.'); } spl_autoload_register(function ($class) { diff --git a/Zend/tests/bug40236.phpt b/Zend/tests/bug40236.phpt index f9a4277249..81cd56f71f 100644 --- a/Zend/tests/bug40236.phpt +++ b/Zend/tests/bug40236.phpt @@ -8,7 +8,7 @@ if (extension_loaded("readline")) die("skip Test doesn't support readline"); --FILE-- <?php $php = getenv('TEST_PHP_EXECUTABLE'); -$cmd = "\"$php\" -n -d memory_limit=4M -a \"".dirname(__FILE__)."\"/bug40236.inc"; +$cmd = "\"$php\" -n -d memory_limit=4M -a \"".__DIR__."\"/bug40236.inc"; echo `$cmd`; ?> --EXPECTF-- diff --git a/Zend/tests/bug52508.phpt b/Zend/tests/bug52508.phpt index 83292a5405..a9b12e793c 100644 --- a/Zend/tests/bug52508.phpt +++ b/Zend/tests/bug52508.phpt @@ -3,7 +3,7 @@ Bug #52508 (newline problem with parse_ini_file+INI_SCANNER_RAW) --FILE-- <?php -$file = dirname(__FILE__) .'/bug52508.ini'; +$file = __DIR__ .'/bug52508.ini'; file_put_contents($file, "a = 1"); diff --git a/Zend/tests/bug63741.phpt b/Zend/tests/bug63741.phpt index fc04c9e79c..354acfdb97 100644 --- a/Zend/tests/bug63741.phpt +++ b/Zend/tests/bug63741.phpt @@ -2,7 +2,7 @@ Bug #63741 (Crash when autoloading from spl) --FILE-- <?php -file_put_contents(dirname(__FILE__)."/bug63741.tmp.php", +file_put_contents(__DIR__."/bug63741.tmp.php", <<<'EOT' <?php if (isset($autoloading)) @@ -41,10 +41,10 @@ else EOT ); -include dirname(__FILE__)."/bug63741.tmp.php"; +include __DIR__."/bug63741.tmp.php"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__)."/bug63741.tmp.php"); ?> +<?php unlink(__DIR__."/bug63741.tmp.php"); ?> --EXPECT-- autoloading... OK! diff --git a/Zend/tests/class_constants_003.phpt b/Zend/tests/class_constants_003.phpt index 14222a4960..3e61a8ab97 100644 --- a/Zend/tests/class_constants_003.phpt +++ b/Zend/tests/class_constants_003.phpt @@ -11,7 +11,7 @@ class test { ?> DATA; -$filename = dirname(__FILE__)."/cc003.dat"; +$filename = __DIR__."/cc003.dat"; file_put_contents($filename, $class_data); function foo($v = test::val) { diff --git a/Zend/tests/globals_004.phpt b/Zend/tests/globals_004.phpt index 6e21b7fbc0..0f2f7f0764 100644 --- a/Zend/tests/globals_004.phpt +++ b/Zend/tests/globals_004.phpt @@ -6,7 +6,7 @@ variables_order="egpcs" <?php function test() { - include dirname(__FILE__)."/globals.inc"; + include __DIR__."/globals.inc"; } test(); diff --git a/Zend/tests/halt_compiler2.phpt b/Zend/tests/halt_compiler2.phpt index da8ac6cae9..a89274a804 100644 --- a/Zend/tests/halt_compiler2.phpt +++ b/Zend/tests/halt_compiler2.phpt @@ -4,18 +4,18 @@ __HALT_COMPILER(); 2 files <?php $text = "<?php echo 'test'; var_dump(__COMPILER_HALT_OFFSET__); __HALT_COMPILER(); ?> hi there"; -file_put_contents(dirname(__FILE__) . '/test1.php', $text); +file_put_contents(__DIR__ . '/test1.php', $text); $text = "<?php echo 'test2'; var_dump(__COMPILER_HALT_OFFSET__); __HALT_COMPILER(); ?> hi there 2"; -file_put_contents(dirname(__FILE__) . '/test2.php', $text); -include dirname(__FILE__) . '/test1.php'; -include dirname(__FILE__) . '/test2.php'; +file_put_contents(__DIR__ . '/test2.php', $text); +include __DIR__ . '/test1.php'; +include __DIR__ . '/test2.php'; ?> ==DONE== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/test1.php'); -unlink(dirname(__FILE__) . '/test2.php'); +unlink(__DIR__ . '/test1.php'); +unlink(__DIR__ . '/test2.php'); ?> --EXPECT-- testint(73) diff --git a/Zend/tests/runtime_compile_time_binary_operands.phpt b/Zend/tests/runtime_compile_time_binary_operands.phpt index 7caec412bc..897ce3e1a5 100644 --- a/Zend/tests/runtime_compile_time_binary_operands.phpt +++ b/Zend/tests/runtime_compile_time_binary_operands.phpt @@ -122,7 +122,7 @@ function prepareLine($op1, $op2, $cmp, $operator) { return $line; } -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'compare_binary_operands_temp.php'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'compare_binary_operands_temp.php'; $file = fopen($filename, "w"); fwrite($file, "<?php\n"); @@ -148,7 +148,7 @@ if($c === 0) { ===DONE=== --CLEAN-- <?php -$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'compare_binary_operands_temp.php'; +$fl = __DIR__ . DIRECTORY_SEPARATOR . 'compare_binary_operands_temp.php'; @unlink($fl); ?> --EXPECT-- diff --git a/Zend/tests/unset_cv05.phpt b/Zend/tests/unset_cv05.phpt index f7a2736bc6..073ee4bee4 100644 --- a/Zend/tests/unset_cv05.phpt +++ b/Zend/tests/unset_cv05.phpt @@ -6,7 +6,7 @@ session.save_handler=files --SKIPIF-- <?php -include(dirname(__FILE__).'/../../ext/session/tests/skipif.inc'); +include(__DIR__.'/../../ext/session/tests/skipif.inc'); ?> --FILE-- diff --git a/Zend/tests/unset_cv06.phpt b/Zend/tests/unset_cv06.phpt index dd788158e4..073a3007f9 100644 --- a/Zend/tests/unset_cv06.phpt +++ b/Zend/tests/unset_cv06.phpt @@ -1,7 +1,7 @@ --TEST-- unset() CV 6 (indirect unset() of global variable in session_unset()) --SKIPIF-- -<?php include(dirname(__FILE__).'/../../ext/session/tests/skipif.inc'); ?> +<?php include(__DIR__.'/../../ext/session/tests/skipif.inc'); ?> --INI-- session.auto_start=0 session.save_handler=files diff --git a/ext/bz2/tests/003-mb.phpt b/ext/bz2/tests/003-mb.phpt index 6454d0d182..ad43b0d11e 100644 --- a/ext/bz2/tests/003-mb.phpt +++ b/ext/bz2/tests/003-mb.phpt @@ -5,7 +5,7 @@ bzread() tests --FILE-- <?php -$fd = bzopen(dirname(__FILE__)."/003私はガラスを食べられます.txt.bz2","r"); +$fd = bzopen(__DIR__."/003私はガラスを食べられます.txt.bz2","r"); var_dump(bzread()); var_dump(bzread($fd, 1 ,0)); var_dump(bzread($fd, 0)); diff --git a/ext/bz2/tests/003.phpt b/ext/bz2/tests/003.phpt index 23b005ac11..feb806e424 100644 --- a/ext/bz2/tests/003.phpt +++ b/ext/bz2/tests/003.phpt @@ -5,7 +5,7 @@ bzread() tests --FILE-- <?php -$fd = bzopen(dirname(__FILE__)."/003.txt.bz2","r"); +$fd = bzopen(__DIR__."/003.txt.bz2","r"); var_dump(bzread()); var_dump(bzread($fd, 1 ,0)); var_dump(bzread($fd, 0)); diff --git a/ext/bz2/tests/004.phpt b/ext/bz2/tests/004.phpt index 1c12f4f9f7..8ddefe7404 100644 --- a/ext/bz2/tests/004.phpt +++ b/ext/bz2/tests/004.phpt @@ -5,12 +5,12 @@ bzread() tests with invalid files --FILE-- <?php -$fd = bzopen(dirname(__FILE__)."/004_1.txt.bz2","r"); +$fd = bzopen(__DIR__."/004_1.txt.bz2","r"); var_dump(bzerror($fd)); var_dump(bzerrstr($fd)); var_dump(bzerrno($fd)); -$fd2 = bzopen(dirname(__FILE__)."/004_2.txt.bz2","r"); +$fd2 = bzopen(__DIR__."/004_2.txt.bz2","r"); var_dump(bzerror($fd2)); var_dump(bzerrstr($fd2)); var_dump(bzerrno($fd2)); diff --git a/ext/bz2/tests/with_strings.phpt b/ext/bz2/tests/with_strings.phpt index 2b6813a9ea..65db76beea 100644 --- a/ext/bz2/tests/with_strings.phpt +++ b/ext/bz2/tests/with_strings.phpt @@ -21,6 +21,6 @@ $tests = <<<TESTS \$blaat === \$blaat2 TESTS; -include(dirname(__FILE__) . '/../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../tests/quicktester.inc'); --EXPECT-- OK diff --git a/ext/com_dotnet/tests/bug66431_0.phpt b/ext/com_dotnet/tests/bug66431_0.phpt index daac328538..e022c18e12 100644 --- a/ext/com_dotnet/tests/bug66431_0.phpt +++ b/ext/com_dotnet/tests/bug66431_0.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; <?php $text= "Xin chào cộng đồng PHP"; -$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt"); +$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.txt"); $fso = new COM("Scripting.FileSystemObject"); $fh = $fso->OpenTextFile($fpath, 2, true); @@ -31,7 +31,7 @@ if (!$result) { --CLEAN-- <?php -$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.txt"); +$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.txt"); if (file_exists($fpath)) { unlink($fpath); diff --git a/ext/com_dotnet/tests/bug66431_1.phpt b/ext/com_dotnet/tests/bug66431_1.phpt index 11b76a1546..e68e411125 100644 --- a/ext/com_dotnet/tests/bug66431_1.phpt +++ b/ext/com_dotnet/tests/bug66431_1.phpt @@ -15,7 +15,7 @@ try { <?php $text= "Xin chào cộng đồng PHP"; -$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.docx"); +$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.docx"); com_load_typelib('Word.Application'); @@ -49,7 +49,7 @@ if (!$result) { --CLEAN-- <?php -$fpath = str_replace("/", "\\", dirname(__FILE__) . "/bug66431.docx"); +$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.docx"); if (file_exists($fpath)) { unlink($fpath); diff --git a/ext/curl/tests/bug48203.phpt b/ext/curl/tests/bug48203.phpt index 5973d8a390..185b75ed3d 100644 --- a/ext/curl/tests/bug48203.phpt +++ b/ext/curl/tests/bug48203.phpt @@ -5,7 +5,7 @@ Bug #48203 (Crash when CURLOPT_STDERR is set to regular file) --FILE-- <?php include 'server.inc'; -$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w'); +$fp = fopen(__DIR__ . '/bug48203.tmp', 'w'); $ch = curl_init(); @@ -22,7 +22,7 @@ echo "Ok\n"; ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?> +<?php @unlink(__DIR__ . '/bug48203.tmp'); ?> --EXPECTF-- Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d %A diff --git a/ext/curl/tests/bug48203_multi.phpt b/ext/curl/tests/bug48203_multi.phpt index 5f9e2ba6b2..21eb1fb14f 100644 --- a/ext/curl/tests/bug48203_multi.phpt +++ b/ext/curl/tests/bug48203_multi.phpt @@ -8,7 +8,7 @@ include 'skipif.inc'; <?php include 'server.inc'; function checkForClosedFilePointer($target_url, $curl_option, $description) { - $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w'); + $fp = fopen(__DIR__ . '/bug48203.tmp', 'w'); $ch1 = curl_init(); $ch2 = curl_init(); @@ -65,7 +65,7 @@ foreach($options_to_check as $option) { ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?> +<?php @unlink(__DIR__ . '/bug48203.tmp'); ?> --EXPECTF-- Warning: curl_multi_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d diff --git a/ext/curl/tests/bug54798-unix.phpt b/ext/curl/tests/bug54798-unix.phpt index c6040a68e2..dc5aad7525 100644 --- a/ext/curl/tests/bug54798-unix.phpt +++ b/ext/curl/tests/bug54798-unix.phpt @@ -11,7 +11,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN' ) { <?php function checkForClosedFilePointer($host, $curl_option, $description) { - $fp = fopen(dirname(__FILE__) . '/bug54798.tmp', 'w+'); + $fp = fopen(__DIR__ . '/bug54798.tmp', 'w+'); $ch = curl_init(); @@ -54,7 +54,7 @@ foreach($options_to_check as $option) { ?> ===DONE=== --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?> +<?php @unlink(__DIR__ . '/bug54798.tmp'); ?> --EXPECTF-- %a %aOk for CURLOPT_STDERR diff --git a/ext/curl/tests/bug54798.phpt b/ext/curl/tests/bug54798.phpt index 35af8d0750..d76674318a 100644 --- a/ext/curl/tests/bug54798.phpt +++ b/ext/curl/tests/bug54798.phpt @@ -8,7 +8,7 @@ include 'skipif.inc'; <?php function checkForClosedFilePointer($host, $curl_option, $description) { - $fp = fopen(dirname(__FILE__) . '/bug54798.tmp', 'w+'); + $fp = fopen(__DIR__ . '/bug54798.tmp', 'w+'); $ch = curl_init(); @@ -51,7 +51,7 @@ foreach($options_to_check as $option) { ?> ===DONE=== --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?> +<?php @unlink(__DIR__ . '/bug54798.tmp'); ?> --EXPECTF-- %AOk for CURLOPT_STDERR diff --git a/ext/curl/tests/bug61948.phpt b/ext/curl/tests/bug61948.phpt index b8fda6d83c..316fa4d0e7 100644 --- a/ext/curl/tests/bug61948.phpt +++ b/ext/curl/tests/bug61948.phpt @@ -5,7 +5,7 @@ Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) ?> --FILE-- <?php - $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948"; + $base_dir = __DIR__ . DIRECTORY_SEPARATOR . "bug61948"; mkdir($base_dir . DIRECTORY_SEPARATOR . "foo", 0755, true); ini_set("open_basedir", $base_dir); @@ -18,7 +18,7 @@ Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) ?> --CLEAN-- <?php - $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948"; + $base_dir = __DIR__ . DIRECTORY_SEPARATOR . "bug61948"; rmdir("$base_dir/foo"); rmdir($base_dir); ?> diff --git a/ext/curl/tests/bug67643.phpt b/ext/curl/tests/bug67643.phpt index ad59f2c12c..24cdb86a28 100644 --- a/ext/curl/tests/bug67643.phpt +++ b/ext/curl/tests/bug67643.phpt @@ -7,7 +7,7 @@ if (!extension_loaded('curl')) print 'skip'; --FILE-- <?php $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, 'file://'. dirname(__FILE__) . DIRECTORY_SEPARATOR .'curl_testdata1.txt'); + curl_setopt($ch, CURLOPT_URL, 'file://'. __DIR__ . DIRECTORY_SEPARATOR .'curl_testdata1.txt'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); $mh = curl_multi_init(); diff --git a/ext/curl/tests/bug69316.phpt b/ext/curl/tests/bug69316.phpt index 082b565d45..38ff8bb9b6 100644 --- a/ext/curl/tests/bug69316.phpt +++ b/ext/curl/tests/bug69316.phpt @@ -18,7 +18,7 @@ Bug #69316: Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEA include 'server.inc'; $host = curl_cli_server_start(); - $temp_file = dirname(__FILE__) . '/body.tmp'; + $temp_file = __DIR__ . '/body.tmp'; $url = "{$host}/get.inc?test=getpost"; $ch = curl_init(); $f_file = fopen($temp_file, "w") or die("failed to open file\n"); @@ -32,7 +32,7 @@ Bug #69316: Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEA ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/body.tmp'); +unlink(__DIR__ . '/body.tmp'); ?> --EXPECTF-- Warning: curl_exec(): CURLOPT_FILE resource has gone away, resetting to default in %s on line %d diff --git a/ext/curl/tests/curl_file_deleted_before_curl_close.phpt b/ext/curl/tests/curl_file_deleted_before_curl_close.phpt index 5e806add08..92eba5e8c3 100644 --- a/ext/curl/tests/curl_file_deleted_before_curl_close.phpt +++ b/ext/curl/tests/curl_file_deleted_before_curl_close.phpt @@ -11,7 +11,7 @@ include 'server.inc'; $host = curl_cli_server_start(); $ch = curl_init($host); -$temp_file = dirname(__FILE__) . '/curl_file_deleted_before_curl_close.tmp'; +$temp_file = __DIR__ . '/curl_file_deleted_before_curl_close.tmp'; if (file_exists($temp_file)) { unlink($temp_file); // file should not exist before test } @@ -33,7 +33,7 @@ echo "Closed correctly\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__) . '/curl_file_deleted_before_curl_close.tmp'); +unlink(__DIR__ . '/curl_file_deleted_before_curl_close.tmp'); ?> --EXPECT-- Closed correctly diff --git a/ext/curl/tests/curl_multi_getcontent_basic3.phpt b/ext/curl/tests/curl_multi_getcontent_basic3.phpt index 357f503a03..f67196d7e7 100644 --- a/ext/curl/tests/curl_multi_getcontent_basic3.phpt +++ b/ext/curl/tests/curl_multi_getcontent_basic3.phpt @@ -17,7 +17,7 @@ Rein Velt (rein@velt.org) include 'server.inc'; $host = curl_cli_server_start(); curl_setopt($ch1, CURLOPT_URL, "{$host}/get.inc?test=getpost&get_param=Hello%20World"); - curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); + curl_setopt($ch2, CURLOPT_URL, "file://".__DIR__. DIRECTORY_SEPARATOR . "curl_testdata2.txt"); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); diff --git a/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt b/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt index 92c80d1732..32af88fb20 100644 --- a/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt +++ b/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt @@ -19,7 +19,7 @@ function custom_readfunction($oCurl, $hReadHandle, $iMaxOut) return $sData; } -$sFileBase = dirname(__FILE__).DIRECTORY_SEPARATOR.'curl_opt_CURLOPT_READFUNCTION'; +$sFileBase = __DIR__.DIRECTORY_SEPARATOR.'curl_opt_CURLOPT_READFUNCTION'; $sReadFile = $sFileBase.'_in.tmp'; $sWriteFile = $sFileBase.'_out.tmp'; $sWriteUrl = 'file://'.$sWriteFile; @@ -43,7 +43,7 @@ var_dump($sOutput); ===DONE=== --CLEAN-- <?php -$sFileBase = dirname(__FILE__).DIRECTORY_SEPARATOR.'curl_opt_CURLOPT_READFUNCTION'; +$sFileBase = __DIR__.DIRECTORY_SEPARATOR.'curl_opt_CURLOPT_READFUNCTION'; $sReadFile = $sFileBase.'_in.tmp'; $sWriteFile = $sFileBase.'_out.tmp'; unlink($sReadFile); diff --git a/ext/dba/tests/bug36436.phpt b/ext/dba/tests/bug36436.phpt index 40cc5283cd..fa1d6140f6 100644 --- a/ext/dba/tests/bug36436.phpt +++ b/ext/dba/tests/bug36436.phpt @@ -3,13 +3,13 @@ Bug #36436 (DBA problem with Berkeley DB4) --SKIPIF-- <?php $handler = 'db4'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_popen($db_filename, 'c', 'db4'); @@ -27,7 +27,7 @@ dba_close($db); ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- resource(%d) of type (dba persistent) diff --git a/ext/dba/tests/bug38698.phpt b/ext/dba/tests/bug38698.phpt index 254d3e37c6..6ace7c02aa 100644 --- a/ext/dba/tests/bug38698.phpt +++ b/ext/dba/tests/bug38698.phpt @@ -3,7 +3,7 @@ Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't --SKIPIF-- <?php $handler = 'cdb_make'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php @@ -12,7 +12,7 @@ function isLittleEndian() { return 0x00FF === current(unpack('v', pack('S',0x00FF))); } -$db_file = dirname(__FILE__) .'/129php.cdb'; +$db_file = __DIR__ .'/129php.cdb'; if (($db_make=dba_open($db_file, "n", 'cdb_make'))!==FALSE) { if (isLittleEndian() === FALSE) { diff --git a/ext/dba/tests/bug48240.phpt b/ext/dba/tests/bug48240.phpt index 547c7a9ccc..75e70da965 100644 --- a/ext/dba/tests/bug48240.phpt +++ b/ext/dba/tests/bug48240.phpt @@ -3,13 +3,13 @@ Bug #48240 (DBA Segmentation fault dba_nextkey) --SKIPIF-- <?php $handler = 'db4'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_open($db_filename, 'c', 'db4'); @@ -21,7 +21,7 @@ dba_close($db); ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- bool(false) diff --git a/ext/dba/tests/bug49125.phpt b/ext/dba/tests/bug49125.phpt index c1ecc50846..70f59c97c9 100644 --- a/ext/dba/tests/bug49125.phpt +++ b/ext/dba/tests/bug49125.phpt @@ -3,7 +3,7 @@ Bug #49125 (Error in dba_exists C code) --SKIPIF-- <?php $handler = 'db4'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php @@ -11,7 +11,7 @@ Bug #49125 (Error in dba_exists C code) error_reporting(E_ALL); $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_popen($db_filename, 'c', 'db4'); @@ -24,7 +24,7 @@ dba_close($db); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- bool(true) diff --git a/ext/dba/tests/bug65708.phpt b/ext/dba/tests/bug65708.phpt index ede2511c9e..8bec60a543 100644 --- a/ext/dba/tests/bug65708.phpt +++ b/ext/dba/tests/bug65708.phpt @@ -2,14 +2,14 @@ Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write) --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php error_reporting(E_ALL); -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_popen($db_filename, 'c'); @@ -29,7 +29,7 @@ dba_close($db); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- integer diff --git a/ext/dba/tests/bug72157.phpt b/ext/dba/tests/bug72157.phpt index 3443f4bb40..71fa8730b8 100644 --- a/ext/dba/tests/bug72157.phpt +++ b/ext/dba/tests/bug72157.phpt @@ -2,7 +2,7 @@ Bug #72157 (use-after-free caused by dba_open) --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/dba/tests/bug72885.phpt b/ext/dba/tests/bug72885.phpt index bef95fd5c8..f8bcc7e7ab 100644 --- a/ext/dba/tests/bug72885.phpt +++ b/ext/dba/tests/bug72885.phpt @@ -3,12 +3,12 @@ Bug #72885 flatfile: dba_fetch() fails to read replaced entry --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); $db = dba_open($db_filename, 'c', 'flatfile'); dba_insert('foo', 'bar', $db); @@ -20,7 +20,7 @@ dba_close($db); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__) .'/clean.inc'); +require_once(__DIR__ .'/clean.inc'); ?> --EXPECT-- bool(true) diff --git a/ext/dba/tests/dba001.phpt b/ext/dba/tests/dba001.phpt index e5a8f58f85..836d03da74 100644 --- a/ext/dba/tests/dba001.phpt +++ b/ext/dba/tests/dba001.phpt @@ -2,12 +2,12 @@ DBA File Creation Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; @@ -18,7 +18,7 @@ DBA File Creation Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba002.phpt b/ext/dba/tests/dba002.phpt index 051c51b9b5..73b2d42df9 100644 --- a/ext/dba/tests/dba002.phpt +++ b/ext/dba/tests/dba002.phpt @@ -2,12 +2,12 @@ DBA Insert/Fetch Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "This is a test insert", $db_file); @@ -19,7 +19,7 @@ DBA Insert/Fetch Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba003.phpt b/ext/dba/tests/dba003.phpt index 6d1e26bfac..af73282c9f 100644 --- a/ext/dba/tests/dba003.phpt +++ b/ext/dba/tests/dba003.phpt @@ -2,12 +2,12 @@ DBA Insert/Replace/Fetch Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "This is a test insert", $db_file); @@ -21,7 +21,7 @@ DBA Insert/Replace/Fetch Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba004.phpt b/ext/dba/tests/dba004.phpt index 69bc717ea4..c197d761d4 100644 --- a/ext/dba/tests/dba004.phpt +++ b/ext/dba/tests/dba004.phpt @@ -2,12 +2,12 @@ DBA Multiple Insert/Fetch Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -25,7 +25,7 @@ DBA Multiple Insert/Fetch Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba005.phpt b/ext/dba/tests/dba005.phpt index 4e43beab19..5173283755 100644 --- a/ext/dba/tests/dba005.phpt +++ b/ext/dba/tests/dba005.phpt @@ -2,12 +2,12 @@ DBA FirstKey/NextKey Loop Test With 5 Items --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -32,7 +32,7 @@ DBA FirstKey/NextKey Loop Test With 5 Items ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba006.phpt b/ext/dba/tests/dba006.phpt index 7f359a2fd8..84814f2bcf 100644 --- a/ext/dba/tests/dba006.phpt +++ b/ext/dba/tests/dba006.phpt @@ -2,12 +2,12 @@ DBA FirstKey/NextKey with 2 deletes --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -34,7 +34,7 @@ DBA FirstKey/NextKey with 2 deletes ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba007.phpt b/ext/dba/tests/dba007.phpt index fbd78212f2..7c8e2b0bd4 100644 --- a/ext/dba/tests/dba007.phpt +++ b/ext/dba/tests/dba007.phpt @@ -2,16 +2,16 @@ DBA Multiple File Creation Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); if (!function_exists('dba_list')) die('skip dba_list() not available'); die("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; - $db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm'; - $db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm'; + $db_file1 = $db_filename1 = __DIR__.'/test1.dbm'; + $db_file2 = $db_filename2 = __DIR__.'/test2.dbm'; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; } else { @@ -35,7 +35,7 @@ DBA Multiple File Creation Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba009.phpt b/ext/dba/tests/dba009.phpt index 3da48b0cc7..d1d612243b 100644 --- a/ext/dba/tests/dba009.phpt +++ b/ext/dba/tests/dba009.phpt @@ -2,12 +2,12 @@ DBA dba_popen Test --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); print("info $HND handler used"); ?> --FILE-- <?php - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db=dba_popen($db_file, "n", $handler))!==FALSE) { echo "Opened\n"; @@ -26,7 +26,7 @@ DBA dba_popen Test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba010.phpt b/ext/dba/tests/dba010.phpt index d411c56adb..f5cb08871a 100644 --- a/ext/dba/tests/dba010.phpt +++ b/ext/dba/tests/dba010.phpt @@ -2,12 +2,12 @@ DBA with array keys --SKIPIF-- <?php - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert(array("", "name0") , "Content String 1", $db_file); @@ -37,7 +37,7 @@ if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba011.phpt b/ext/dba/tests/dba011.phpt index 0891a30f48..087233667c 100644 --- a/ext/dba/tests/dba011.phpt +++ b/ext/dba/tests/dba011.phpt @@ -2,12 +2,12 @@ DBA argument tests --SKIPIF-- <?php -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(dba_open($db_file)); var_dump(dba_open($db_file, 'n')); @@ -18,7 +18,7 @@ var_dump(dba_open($db_file, 'n', $handler, 2, 3, 4, 5, 6, 7, 8)); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba012.phpt b/ext/dba/tests/dba012.phpt index 612d543249..022ca03fc3 100644 --- a/ext/dba/tests/dba012.phpt +++ b/ext/dba/tests/dba012.phpt @@ -3,14 +3,14 @@ DBA dba.default_handler tests --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --INI-- dba.default_handler=flatfile --FILE-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; echo "Test 1\n"; @@ -28,7 +28,7 @@ var_dump(dba_open($db_filename, 'n')); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba013.phpt b/ext/dba/tests/dba013.phpt index 661275c07d..8a446cf9a8 100644 --- a/ext/dba/tests/dba013.phpt +++ b/ext/dba/tests/dba013.phpt @@ -2,12 +2,12 @@ DBA with array key with empty array --SKIPIF-- <?php -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { @@ -19,7 +19,7 @@ if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba014.phpt b/ext/dba/tests/dba014.phpt index 799fe830a5..410c3af3c1 100644 --- a/ext/dba/tests/dba014.phpt +++ b/ext/dba/tests/dba014.phpt @@ -2,12 +2,12 @@ DBA with array key with array containing too many elements --SKIPIF-- <?php -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { @@ -19,7 +19,7 @@ if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba015.phpt b/ext/dba/tests/dba015.phpt index 4cd0ea101a..7d268cbe20 100644 --- a/ext/dba/tests/dba015.phpt +++ b/ext/dba/tests/dba015.phpt @@ -3,14 +3,14 @@ DBA with persistent connections --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; echo "Test 1\n"; @@ -51,7 +51,7 @@ echo dba_fetch("key2", $db_file1), "\n"; ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba016.phpt b/ext/dba/tests/dba016.phpt index 4b0052352a..60bf4da4bf 100644 --- a/ext/dba/tests/dba016.phpt +++ b/ext/dba/tests/dba016.phpt @@ -3,13 +3,13 @@ DBA lock modifier error message test --SKIPIF-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = "flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; $db_file1 = dba_popen($db_filename, 'n-t', 'flatfile'); @@ -18,7 +18,7 @@ $db_file1 = dba_popen($db_filename, 'n-t', 'flatfile'); ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_cdb.phpt b/ext/dba/tests/dba_cdb.phpt index 998fc41638..87e9992179 100644 --- a/ext/dba/tests/dba_cdb.phpt +++ b/ext/dba/tests/dba_cdb.phpt @@ -3,19 +3,19 @@ DBA CDB handler test --SKIPIF-- <?php $handler = 'cdb'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die('info CDB does not support replace or delete'); ?> --FILE-- <?php $handler = 'cdb'; - require_once(dirname(__FILE__) .'/test.inc'); - require_once(dirname(__FILE__) .'/dba_handler.inc'); + require_once(__DIR__ .'/test.inc'); + require_once(__DIR__ .'/dba_handler.inc'); ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: cdb diff --git a/ext/dba/tests/dba_cdb_001.phpt b/ext/dba/tests/dba_cdb_001.phpt index a0dc438636..82a1c0b585 100644 --- a/ext/dba/tests/dba_cdb_001.phpt +++ b/ext/dba/tests/dba_cdb_001.phpt @@ -3,14 +3,14 @@ DBA CDB handler test --SKIPIF-- <?php $handler = 'cdb'; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die('info CDB does not support replace or delete'); ?> --FILE-- <?php $handler = 'cdb'; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "Test 0\n"; @@ -64,7 +64,7 @@ else { ===DONE=== --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- Test 0 diff --git a/ext/dba/tests/dba_cdb_make.phpt b/ext/dba/tests/dba_cdb_make.phpt index 0a1fd79b36..33fcd6ea47 100644 --- a/ext/dba/tests/dba_cdb_make.phpt +++ b/ext/dba/tests/dba_cdb_make.phpt @@ -3,16 +3,16 @@ DBA CDB_MAKE handler test --SKIPIF-- <?php $handler = 'cdb_make'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); die('info CDB_MAKE does not support reading'); ?> --FILE-- <?php $handler = 'cdb_make'; - require_once(dirname(__FILE__) .'/test.inc'); + require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; // print md5 checksum of test.cdb which is generated by cdb_make program - var_dump(md5_file(dirname(__FILE__).'/test.cdb')); + var_dump(md5_file(__DIR__.'/test.cdb')); if (($db_make=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("1", "1", $db_make); dba_insert("2", "2", $db_make); @@ -32,7 +32,7 @@ DBA CDB_MAKE handler test ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: cdb_make diff --git a/ext/dba/tests/dba_cdb_read.phpt b/ext/dba/tests/dba_cdb_read.phpt index 9d65f8b732..91ca6e9853 100644 --- a/ext/dba/tests/dba_cdb_read.phpt +++ b/ext/dba/tests/dba_cdb_read.phpt @@ -3,13 +3,13 @@ DBA CDB handler test (read only) --SKIPIF-- <?php $handler = 'cdb_make'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "database handler: cdb\n"; $handler = 'cdb'; - $db_file = dirname(__FILE__).'/test.cdb'; + $db_file = __DIR__.'/test.cdb'; if (($db_file=dba_open($db_file, "r", $handler))!==FALSE) { // read key sequence $a = dba_firstkey($db_file); diff --git a/ext/dba/tests/dba_db1.phpt b/ext/dba/tests/dba_db1.phpt index 01d96feec5..c378aaf3c2 100644 --- a/ext/dba/tests/dba_db1.phpt +++ b/ext/dba/tests/dba_db1.phpt @@ -3,13 +3,13 @@ DBA DB1 handler test --SKIPIF-- <?php $handler = 'db1'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'db1'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_db2.phpt b/ext/dba/tests/dba_db2.phpt index 09fefb581e..8662189cbd 100644 --- a/ext/dba/tests/dba_db2.phpt +++ b/ext/dba/tests/dba_db2.phpt @@ -3,13 +3,13 @@ DBA DB2 handler test --SKIPIF-- <?php $handler = 'db2'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'db2'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_db3.phpt b/ext/dba/tests/dba_db3.phpt index 9c78eb3726..670680cb8a 100644 --- a/ext/dba/tests/dba_db3.phpt +++ b/ext/dba/tests/dba_db3.phpt @@ -3,13 +3,13 @@ DBA DB3 handler test --SKIPIF-- <?php $handler = 'db3'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'db3'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_db4_000.phpt b/ext/dba/tests/dba_db4_000.phpt index 21e4a18394..afeedff47c 100644 --- a/ext/dba/tests/dba_db4_000.phpt +++ b/ext/dba/tests/dba_db4_000.phpt @@ -3,18 +3,18 @@ DBA DB4 handler test --SKIPIF-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once(dirname(__FILE__) .'/test.inc'); -require_once(dirname(__FILE__) .'/dba_handler.inc'); +require_once(__DIR__ .'/test.inc'); +require_once(__DIR__ .'/dba_handler.inc'); ?> ===DONE=== --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_001.phpt b/ext/dba/tests/dba_db4_001.phpt index 73b5da75c3..c7a851f3ef 100644 --- a/ext/dba/tests/dba_db4_001.phpt +++ b/ext/dba/tests/dba_db4_001.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation open("c") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_002.phpt b/ext/dba/tests/dba_db4_002.phpt index 1ab3117b6e..d37e55b855 100644 --- a/ext/dba/tests/dba_db4_002.phpt +++ b/ext/dba/tests/dba_db4_002.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation open("n") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_003.phpt b/ext/dba/tests/dba_db4_003.phpt index 5690bd9250..7bb664a9dc 100644 --- a/ext/dba/tests/dba_db4_003.phpt +++ b/ext/dba/tests/dba_db4_003.phpt @@ -3,14 +3,14 @@ DBA DB4 File Creation open("c") with existing file --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -33,7 +33,7 @@ echo "$s\n"; ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_004.phpt b/ext/dba/tests/dba_db4_004.phpt index dd89f2d062..7e0445fb74 100644 --- a/ext/dba/tests/dba_db4_004.phpt +++ b/ext/dba/tests/dba_db4_004.phpt @@ -3,14 +3,14 @@ DBA DB4 Truncate Existing File open("n") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -31,7 +31,7 @@ if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_005.phpt b/ext/dba/tests/dba_db4_005.phpt index f0cf858e9a..7240e6e56a 100644 --- a/ext/dba/tests/dba_db4_005.phpt +++ b/ext/dba/tests/dba_db4_005.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation popen("c") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_006.phpt b/ext/dba/tests/dba_db4_006.phpt index 7823922a9f..75694141d4 100644 --- a/ext/dba/tests/dba_db4_006.phpt +++ b/ext/dba/tests/dba_db4_006.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation popen("n") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { echo "database file created\n"; @@ -24,7 +24,7 @@ if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_007.phpt b/ext/dba/tests/dba_db4_007.phpt index 193d2ed341..bfa67dd5d6 100644 --- a/ext/dba/tests/dba_db4_007.phpt +++ b/ext/dba/tests/dba_db4_007.phpt @@ -3,14 +3,14 @@ DBA DB4 File Creation popen("c") with existing invalid file --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -29,7 +29,7 @@ if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_008.phpt b/ext/dba/tests/dba_db4_008.phpt index e5a9467555..457818c929 100644 --- a/ext/dba/tests/dba_db4_008.phpt +++ b/ext/dba/tests/dba_db4_008.phpt @@ -3,14 +3,14 @@ DBA DB4 Truncate Existing File popen("n") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; var_dump(file_put_contents($db_filename, "Dummy contents")); @@ -31,7 +31,7 @@ if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_009.phpt b/ext/dba/tests/dba_db4_009.phpt index 8069c84bf8..48d7f3a30f 100644 --- a/ext/dba/tests/dba_db4_009.phpt +++ b/ext/dba/tests/dba_db4_009.phpt @@ -3,16 +3,16 @@ DBA DB4 Multiple File Creation Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; -$db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm'; -$db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm'; +$db_file1 = $db_filename1 = __DIR__.'/test1.dbm'; +$db_file2 = $db_filename2 = __DIR__.'/test2.dbm'; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; } else { @@ -36,7 +36,7 @@ dba_close($db_file); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_011.phpt b/ext/dba/tests/dba_db4_011.phpt index cdd57bc5ca..311bdf29f1 100644 --- a/ext/dba/tests/dba_db4_011.phpt +++ b/ext/dba/tests/dba_db4_011.phpt @@ -3,13 +3,13 @@ DBA DB4 with repeated key --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "c", $handler))!==FALSE) { var_dump(dba_insert("key1", "Content String 1", $db_file)); @@ -25,7 +25,7 @@ if (($db_file=dba_open($db_filename, "c", $handler))!==FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_012.phpt b/ext/dba/tests/dba_db4_012.phpt index e626ba0c11..09a9b0da1c 100644 --- a/ext/dba/tests/dba_db4_012.phpt +++ b/ext/dba/tests/dba_db4_012.phpt @@ -3,14 +3,14 @@ DBA DB4 New File Creation open("rl") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "rl", $handler)) !== FALSE) { echo "database file created\n"; @@ -22,7 +22,7 @@ if (($db_file = dba_open($db_filename, "rl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_013.phpt b/ext/dba/tests/dba_db4_013.phpt index 133f90f88a..f107dd8574 100644 --- a/ext/dba/tests/dba_db4_013.phpt +++ b/ext/dba/tests/dba_db4_013.phpt @@ -3,14 +3,14 @@ DBA DB4 File open("rl") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { @@ -30,7 +30,7 @@ if (($db_file = dba_popen($db_filename, "rl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_014.phpt b/ext/dba/tests/dba_db4_014.phpt index 38d272dd28..6b6b9b2ed3 100644 --- a/ext/dba/tests/dba_db4_014.phpt +++ b/ext/dba/tests/dba_db4_014.phpt @@ -3,14 +3,14 @@ DBA DB4 File open("wl") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "wl", $handler)) !== FALSE) { @@ -23,7 +23,7 @@ if (($db_file = dba_open($db_filename, "wl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_015.phpt b/ext/dba/tests/dba_db4_015.phpt index 0bd79ed7f5..a99b984cde 100644 --- a/ext/dba/tests/dba_db4_015.phpt +++ b/ext/dba/tests/dba_db4_015.phpt @@ -3,14 +3,14 @@ DBA DB4 File open("wl") & Insert Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { @@ -30,7 +30,7 @@ if (($db_file = dba_popen($db_filename, "wl", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_016.phpt b/ext/dba/tests/dba_db4_016.phpt index 618fc868e5..3e1eb87262 100644 --- a/ext/dba/tests/dba_db4_016.phpt +++ b/ext/dba/tests/dba_db4_016.phpt @@ -3,14 +3,14 @@ DBA DB4 File Creation popen("c") with existing valid file --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { @@ -45,7 +45,7 @@ if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_017.phpt b/ext/dba/tests/dba_db4_017.phpt index 8a2dbdd9ff..04ad544a78 100644 --- a/ext/dba/tests/dba_db4_017.phpt +++ b/ext/dba/tests/dba_db4_017.phpt @@ -3,13 +3,13 @@ DBA DB4 file creation dba_open("cd") --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file = dba_open($db_filename, "cd", $handler)) !== FALSE) { @@ -28,7 +28,7 @@ if (($db_file = dba_open($db_filename, "cd", $handler)) !== FALSE) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_018.phpt b/ext/dba/tests/dba_db4_018.phpt index fb696e9f5f..e4b4cfcf27 100644 --- a/ext/dba/tests/dba_db4_018.phpt +++ b/ext/dba/tests/dba_db4_018.phpt @@ -3,14 +3,14 @@ DBA DB4 with persistent connections --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; echo "Test 1\n"; @@ -51,7 +51,7 @@ echo dba_fetch("key2", $db_file1), "\n"; ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --XFAIL-- Test 6 crashes with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278 diff --git a/ext/dba/tests/dba_db4_handlers.phpt b/ext/dba/tests/dba_db4_handlers.phpt index 41c397bdf4..92f93ad4a6 100644 --- a/ext/dba/tests/dba_db4_handlers.phpt +++ b/ext/dba/tests/dba_db4_handlers.phpt @@ -3,13 +3,13 @@ DBA DB4 Handler Test --SKIPIF-- <?php $handler="db4"; -require(dirname(__FILE__) .'/skipif.inc'); +require(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler="db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; function check($h) @@ -40,7 +40,7 @@ foreach ($h as $key => $val) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTREGEX-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_optimize.phpt b/ext/dba/tests/dba_db4_optimize.phpt index e8b5d6bb65..8a039b7152 100644 --- a/ext/dba/tests/dba_db4_optimize.phpt +++ b/ext/dba/tests/dba_db4_optimize.phpt @@ -3,13 +3,13 @@ DBA DB4 Optimize Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -29,7 +29,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_db4_sync.phpt b/ext/dba/tests/dba_db4_sync.phpt index a72aed4e71..e659333907 100644 --- a/ext/dba/tests/dba_db4_sync.phpt +++ b/ext/dba/tests/dba_db4_sync.phpt @@ -3,13 +3,13 @@ DBA DB4 Sync Test --SKIPIF-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/skipif.inc'); +require_once(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler = "db4"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -29,7 +29,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: db4 diff --git a/ext/dba/tests/dba_dbm.phpt b/ext/dba/tests/dba_dbm.phpt index 26ea91f9f2..39f0a99fae 100644 --- a/ext/dba/tests/dba_dbm.phpt +++ b/ext/dba/tests/dba_dbm.phpt @@ -3,18 +3,18 @@ DBA DBM handler test --SKIPIF-- <?php $handler = 'dbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'dbm'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: dbm diff --git a/ext/dba/tests/dba_flatfile.phpt b/ext/dba/tests/dba_flatfile.phpt index c6064239c6..4fcaafe32d 100644 --- a/ext/dba/tests/dba_flatfile.phpt +++ b/ext/dba/tests/dba_flatfile.phpt @@ -3,18 +3,18 @@ DBA FlatFile handler test --SKIPIF-- <?php $handler = 'flatfile'; - require_once(dirname(__FILE__) .'/skipif.inc'); + require_once(__DIR__ .'/skipif.inc'); ?> --FILE-- <?php $handler = 'flatfile'; - require_once(dirname(__FILE__) .'/test.inc'); - require_once(dirname(__FILE__) .'/dba_handler.inc'); + require_once(__DIR__ .'/test.inc'); + require_once(__DIR__ .'/dba_handler.inc'); ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: flatfile diff --git a/ext/dba/tests/dba_gdbm.phpt b/ext/dba/tests/dba_gdbm.phpt index 18ee455e4d..8ca2adfe04 100644 --- a/ext/dba/tests/dba_gdbm.phpt +++ b/ext/dba/tests/dba_gdbm.phpt @@ -3,14 +3,14 @@ DBA GDBM handler test --SKIPIF-- <?php $handler = 'gdbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'gdbm'; - require_once dirname(__FILE__) .'/test.inc'; + require_once __DIR__ .'/test.inc'; $lock_flag = ''; // lock in library - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; // Read during write is system dependent. Important is that there is no deadlock ?> diff --git a/ext/dba/tests/dba_handlers.phpt b/ext/dba/tests/dba_handlers.phpt index 41c23b5cf6..a6f104f16a 100644 --- a/ext/dba/tests/dba_handlers.phpt +++ b/ext/dba/tests/dba_handlers.phpt @@ -3,13 +3,13 @@ DBA Handler Test --SKIPIF-- <?php $handler="flatfile"; -require(dirname(__FILE__) .'/skipif.inc'); +require(__DIR__ .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php $handler="flatfile"; -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; function check($h) @@ -52,7 +52,7 @@ foreach ($h as $key => $val) { ?> --CLEAN-- <?php -require(dirname(__FILE__) .'/clean.inc'); +require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_inifile.phpt b/ext/dba/tests/dba_inifile.phpt index ad7b72a82d..c21413f1ac 100644 --- a/ext/dba/tests/dba_inifile.phpt +++ b/ext/dba/tests/dba_inifile.phpt @@ -3,18 +3,18 @@ DBA INIFILE handler test --SKIPIF-- <?php $handler = 'inifile'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'inifile'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECT-- database handler: inifile diff --git a/ext/dba/tests/dba_lmdb.phpt b/ext/dba/tests/dba_lmdb.phpt index b32cd58bbd..3ca8bfeb07 100644 --- a/ext/dba/tests/dba_lmdb.phpt +++ b/ext/dba/tests/dba_lmdb.phpt @@ -3,19 +3,19 @@ DBA LMDB handler test --SKIPIF-- <?php $handler = 'lmdb'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'lmdb'; - require_once dirname(__FILE__) .'/test.inc'; + require_once __DIR__ .'/test.inc'; $lock_flag = ''; // lock in library - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require_once dirname(__FILE__) .'/clean.inc'; + require_once __DIR__ .'/clean.inc'; ?> --EXPECTF-- database handler: lmdb diff --git a/ext/dba/tests/dba_ndbm.phpt b/ext/dba/tests/dba_ndbm.phpt index a3478862eb..616bcb2c6b 100644 --- a/ext/dba/tests/dba_ndbm.phpt +++ b/ext/dba/tests/dba_ndbm.phpt @@ -3,13 +3,13 @@ DBA NDBM handler test --SKIPIF-- <?php $handler = 'ndbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'ndbm'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/test.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --EXPECT-- diff --git a/ext/dba/tests/dba_optimize.phpt b/ext/dba/tests/dba_optimize.phpt index 6347d4983c..db258f5ff7 100644 --- a/ext/dba/tests/dba_optimize.phpt +++ b/ext/dba/tests/dba_optimize.phpt @@ -2,12 +2,12 @@ DBA Optimize Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -36,7 +36,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_qdbm.phpt b/ext/dba/tests/dba_qdbm.phpt index 45fed53824..4f2a097c38 100644 --- a/ext/dba/tests/dba_qdbm.phpt +++ b/ext/dba/tests/dba_qdbm.phpt @@ -3,19 +3,19 @@ DBA QDBM handler test --SKIPIF-- <?php $handler = 'qdbm'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $handler = 'qdbm'; - require_once dirname(__FILE__) .'/test.inc'; + require_once __DIR__ .'/test.inc'; $lock_flag = ''; // lock in library - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: qdbm diff --git a/ext/dba/tests/dba_split.phpt b/ext/dba/tests/dba_split.phpt index 0989f09feb..37a2157666 100644 --- a/ext/dba/tests/dba_split.phpt +++ b/ext/dba/tests/dba_split.phpt @@ -2,7 +2,7 @@ DBA Split Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; die("info $HND handler used"); ?> --FILE-- diff --git a/ext/dba/tests/dba_sync.phpt b/ext/dba/tests/dba_sync.phpt index 0e64ea2905..7210469cd5 100644 --- a/ext/dba/tests/dba_sync.phpt +++ b/ext/dba/tests/dba_sync.phpt @@ -2,12 +2,12 @@ DBA Sync Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; die("info $HND handler used"); ?> --FILE-- <?php -require_once(dirname(__FILE__) .'/test.inc'); +require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -36,7 +36,7 @@ if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { <?php exit(0); ?> --CLEAN-- <?php - require(dirname(__FILE__) .'/clean.inc'); + require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_tcadb.phpt b/ext/dba/tests/dba_tcadb.phpt index bc21ee189a..04246a29f3 100644 --- a/ext/dba/tests/dba_tcadb.phpt +++ b/ext/dba/tests/dba_tcadb.phpt @@ -3,20 +3,20 @@ DBA TCADB handler test --SKIPIF-- <?php $handler = 'tcadb'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $lock_flag = 'l'; - $db_filename = $db_file = dirname(__FILE__) .'/test0.tch'; + $db_filename = $db_file = __DIR__ .'/test0.tch'; @unlink($db_filename); @unlink($db_filename.'.lck'); - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once __DIR__ .'/dba_handler.inc'; ?> ===DONE=== --CLEAN-- <?php -$db_filename = $db_file = dirname(__FILE__) .'/test0.tch'; +$db_filename = $db_file = __DIR__ .'/test0.tch'; @unlink($db_filename); @unlink($db_filename.'.lck'); ?> diff --git a/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt b/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt index 2a3316ecc8..dd036b1bb4 100644 --- a/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt +++ b/ext/dom/tests/DOMDocument_createEntityReference_basic.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_implementationRead_basic.phpt b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt index 9482780b21..98da11ca2d 100644 --- a/ext/dom/tests/DOMDocument_implementationRead_basic.phpt +++ b/ext/dom/tests/DOMDocument_implementationRead_basic.phpt @@ -9,7 +9,7 @@ Lev Radin <prokurator@gmail.com> <?php $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); var_dump($doc->implementation); diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile.phpt index 0431695737..dfbf8ec487 100644 --- a/ext/dom/tests/DOMDocument_loadHTMLfile.phpt +++ b/ext/dom/tests/DOMDocument_loadHTMLfile.phpt @@ -11,7 +11,7 @@ assert.bail=true --FILE-- <?php $doc = new DOMDocument(); -$result = $doc->loadHTMLFile(dirname(__FILE__) . "/test.html"); +$result = $doc->loadHTMLFile(__DIR__ . "/test.html"); assert($result === true); ?> --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt index 9542b69e84..cfb41686e8 100644 --- a/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt +++ b/ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt @@ -11,7 +11,7 @@ assert.bail=true --FILE-- <?php $doc = new DOMDocument(); -$result = $doc->loadHTMLFile(dirname(__FILE__) . "/ffff/test.html"); +$result = $doc->loadHTMLFile(__DIR__ . "/ffff/test.html"); assert($result === false); ?> --EXPECTF-- diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt index 991103649e..cb071594fa 100644 --- a/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt +++ b/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt @@ -11,7 +11,7 @@ assert.bail=true --FILE-- <?php $doc = new DOMDocument(); -$result = $doc->loadHTMLFile(dirname(__FILE__) . "/empty.html"); +$result = $doc->loadHTMLFile(__DIR__ . "/empty.html"); assert($result === true); ?> --EXPECTF-- diff --git a/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt b/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt index 28533bf8af..2cbb1ed60d 100644 --- a/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt +++ b/ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt @@ -11,7 +11,7 @@ assert.bail=true --FILE-- <?php $doc = new DOMDocument(); -$result = $doc->loadHTMLFile(dirname(__FILE__) . "/not_well.html"); +$result = $doc->loadHTMLFile(__DIR__ . "/not_well.html"); assert($result === true); ?> --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt index 17430d0770..5ae5f341d8 100644 --- a/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt +++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_basic.phpt @@ -9,7 +9,7 @@ Lev Radin <prokurator@gmail.com> <?php $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); var_dump($doc->preserveWhiteSpace); diff --git a/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt index e467f56aa3..92a74a8390 100644 --- a/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt +++ b/ext/dom/tests/DOMDocument_preserveWhiteSpace_variations.phpt @@ -10,14 +10,14 @@ Lev Radin <prokurator@gmail.com> echo "Load document with preserveWhiteSpace on\n"; $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); echo $doc->saveXML(); echo "\nLoad document with preserveWhiteSpace off\n"; $doc = new DOMDocument; $doc->preserveWhiteSpace = false; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); echo $doc->saveXML(); ?> diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt index 3e4d003ba4..e4b784e376 100644 --- a/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt +++ b/ext/dom/tests/DOMDocument_relaxNGValidate_basic.phpt @@ -8,7 +8,7 @@ require_once('skipif.inc'); ?> --FILE-- <?php -$rng = dirname(__FILE__).'/DOMDocument_relaxNGValidate_basic.rng'; +$rng = __DIR__.'/DOMDocument_relaxNGValidate_basic.rng'; $xml = <<< XML <?xml version="1.0"?> <apple> diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt index 53c773b221..ab6befa3b1 100644 --- a/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt +++ b/ext/dom/tests/DOMDocument_relaxNGValidate_error1.phpt @@ -8,7 +8,7 @@ require_once('skipif.inc'); ?> --FILE-- <?php -$rng = dirname(__FILE__).'/DOMDocument_relaxNGValidate_basic.rng'; +$rng = __DIR__.'/DOMDocument_relaxNGValidate_basic.rng'; $xml = <<< XML <?xml version="1.0"?> <apple> diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt index 3eb6bec21d..cdd6e64194 100644 --- a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt +++ b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt @@ -8,7 +8,7 @@ require_once('skipif.inc'); ?> --FILE-- <?php -$rng = dirname(__FILE__).'/foo.rng'; +$rng = __DIR__.'/foo.rng'; $xml = <<< XML <?xml version="1.0"?> <apple> diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt index c38ea89633..30c090679c 100644 --- a/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt +++ b/ext/dom/tests/DOMDocument_saveHTMLFile_basic.phpt @@ -5,11 +5,11 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php -$filename = dirname(__FILE__)."/tmp_savehtmlfile".time().".html"; +$filename = __DIR__."/tmp_savehtmlfile".time().".html"; $doc = new DOMDocument('1.0'); $root = $doc->createElement('html'); $root = $doc->appendChild($root); diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt index af0965c1c9..aa25bb16e7 100644 --- a/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTMLFile_error2.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt index 7471a6e60c..02ced08282 100644 --- a/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt +++ b/ext/dom/tests/DOMDocument_saveHTMLFile_formatOutput.phpt @@ -5,11 +5,11 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php -$filename = dirname(__FILE__)."/tmp_savehtmlfile".time().".html"; +$filename = __DIR__."/tmp_savehtmlfile".time().".html"; $doc = new DOMDocument('1.0'); $doc->formatOutput = true; $root = $doc->createElement('html'); diff --git a/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt index d5c6a797ef..6ca66730eb 100644 --- a/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt +++ b/ext/dom/tests/DOMDocument_saveHTMLFile_invalid_filename.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_saveHTML_basic.phpt b/ext/dom/tests/DOMDocument_saveHTML_basic.phpt index 8675b957a1..79d65f5b11 100644 --- a/ext/dom/tests/DOMDocument_saveHTML_basic.phpt +++ b/ext/dom/tests/DOMDocument_saveHTML_basic.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt index e32e277803..83aefd5ba8 100644 --- a/ext/dom/tests/DOMDocument_saveHTML_error2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTML_error2.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt b/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt index ef51e7f126..12502e8a9a 100644 --- a/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt +++ b/ext/dom/tests/DOMDocument_saveHTML_variant1.phpt @@ -2,7 +2,7 @@ DOMDocument::saveHTML() optional parameters --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt b/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt index 9c02e13adc..09ff24b391 100644 --- a/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt +++ b/ext/dom/tests/DOMDocument_saveHTML_variant2.phpt @@ -2,7 +2,7 @@ DOMDocument::saveHTML() vs DOMDocumet::saveXML() --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_save_basic.phpt b/ext/dom/tests/DOMDocument_save_basic.phpt index bcad72dce5..2fe9cdac75 100644 --- a/ext/dom/tests/DOMDocument_save_basic.phpt +++ b/ext/dom/tests/DOMDocument_save_basic.phpt @@ -19,13 +19,13 @@ $title = $root->appendChild($title); $text = $doc->createTextNode('This is the title'); $text = $title->appendChild($text); -$temp_filename = dirname(__FILE__)."/DomDocument_save_basic.tmp"; +$temp_filename = __DIR__."/DomDocument_save_basic.tmp"; echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes ?> --CLEAN-- <?php - $temp_filename = dirname(__FILE__)."/DomDocument_save_basic.tmp"; + $temp_filename = __DIR__."/DomDocument_save_basic.tmp"; unlink($temp_filename); ?> --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_savexml_basic.phpt b/ext/dom/tests/DOMDocument_savexml_basic.phpt index a0978ebb82..f08fc4e582 100644 --- a/ext/dom/tests/DOMDocument_savexml_basic.phpt +++ b/ext/dom/tests/DOMDocument_savexml_basic.phpt @@ -25,7 +25,7 @@ EOXML; $dom = new DOMDocument(); $dom->loadXML($xml); $root = $dom->documentElement; -$directory = dirname(__FILE__); +$directory = __DIR__; $filename = $directory."/tmp_dom_savexml".time(); var_dump($dom->save($filename)); diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt index 994b94d0c8..6140dc75b7 100644 --- a/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_addAttrs.phpt @@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book-attr.xml"); +$doc->load(__DIR__."/book-attr.xml"); -$xsd = file_get_contents(dirname(__FILE__)."/book.xsd"); +$xsd = file_get_contents(__DIR__."/book.xsd"); $doc->schemaValidateSource($xsd, LIBXML_SCHEMA_CREATE); diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt index 38bc3fa3cc..aaf2ba865a 100644 --- a/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_basic.phpt @@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); -$xsd = file_get_contents(dirname(__FILE__)."/book.xsd"); +$xsd = file_get_contents(__DIR__."/book.xsd"); $result = $doc->schemaValidateSource($xsd); var_dump($result); diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt index 51eb82e32f..8c63ec6146 100644 --- a/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error1.phpt @@ -10,7 +10,7 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); $result = $doc->schemaValidateSource('string that is not a schema'); var_dump($result); diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt index 41a833b5aa..12295beade 100644 --- a/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error2.phpt @@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); -$xsd = file_get_contents(dirname(__FILE__)."/book-non-conforming-schema.xsd"); +$xsd = file_get_contents(__DIR__."/book-non-conforming-schema.xsd"); $result = $doc->schemaValidateSource($xsd); var_dump($result); diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt index 93dd792609..41f9015b92 100644 --- a/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_error3.phpt @@ -10,7 +10,7 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); $result = $doc->schemaValidateSource(''); var_dump($result); diff --git a/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt index 7c98a74b1d..1f6761f768 100644 --- a/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidateSource_missingAttrs.phpt @@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book-attr.xml"); +$doc->load(__DIR__."/book-attr.xml"); -$xsd = file_get_contents(dirname(__FILE__)."/book.xsd"); +$xsd = file_get_contents(__DIR__."/book.xsd"); $doc->schemaValidateSource($xsd); diff --git a/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt index e0b5251b23..93058df27a 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_addAttrs.phpt @@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book-attr.xml"); +$doc->load(__DIR__."/book-attr.xml"); -$doc->schemaValidate(dirname(__FILE__)."/book.xsd", LIBXML_SCHEMA_CREATE); +$doc->schemaValidate(__DIR__."/book.xsd", LIBXML_SCHEMA_CREATE); foreach ($doc->getElementsByTagName('book') as $book) { var_dump($book->getAttribute('is-hardback')); diff --git a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt index eec790de6f..5f3ed67937 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_basic.phpt @@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); -$result = $doc->schemaValidate(dirname(__FILE__)."/book.xsd"); +$result = $doc->schemaValidate(__DIR__."/book.xsd"); var_dump($result); ?> diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt index 594c3c4291..d3ac5f5183 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_error1.phpt @@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); -$result = $doc->schemaValidate(dirname(__FILE__)."/book-not-a-schema.xsd"); +$result = $doc->schemaValidate(__DIR__."/book-not-a-schema.xsd"); var_dump($result); ?> diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt index 5ffd533652..302fcc6665 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_error2.phpt @@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); -$result = $doc->schemaValidate(dirname(__FILE__)."/book-non-conforming-schema.xsd"); +$result = $doc->schemaValidate(__DIR__."/book-non-conforming-schema.xsd"); var_dump($result); ?> diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt index 275204f920..2ff2ce9487 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_error3.phpt @@ -10,7 +10,7 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); $result = $doc->schemaValidate(''); var_dump($result); diff --git a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt index d5743bc6cf..cb57b55b41 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_error5.phpt @@ -10,9 +10,9 @@ Daniel Convissor <danielc@php.net> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); -$result = $doc->schemaValidate(dirname(__FILE__)."/non-existent-file"); +$result = $doc->schemaValidate(__DIR__."/non-existent-file"); var_dump($result); ?> diff --git a/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt b/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt index d253ad9690..f286379286 100644 --- a/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt +++ b/ext/dom/tests/DOMDocument_schemaValidate_missingAttrs.phpt @@ -9,9 +9,9 @@ Chris Wright <info@daverandom.com> $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book-attr.xml"); +$doc->load(__DIR__."/book-attr.xml"); -$doc->schemaValidate(dirname(__FILE__)."/book.xsd"); +$doc->schemaValidate(__DIR__."/book.xsd"); foreach ($doc->getElementsByTagName('book') as $book) { var_dump($book->getAttribute('is-hardback')); diff --git a/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt index 33aecf4925..5a82aa5e24 100644 --- a/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt +++ b/ext/dom/tests/DOMDocument_strictErrorChecking_basic.phpt @@ -9,7 +9,7 @@ Vincent Tsao <notes4vincent@gmail.com> <?php $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); var_dump($doc->strictErrorChecking); diff --git a/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt b/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt index b6d94f9de7..3d99e0eb70 100644 --- a/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt +++ b/ext/dom/tests/DOMDocument_strictErrorChecking_variation.phpt @@ -11,7 +11,7 @@ Vincent Tsao <notes4vincent@gmail.com> echo "Load document\n"; $doc = new DOMDocument; -$doc->load(dirname(__FILE__)."/book.xml"); +$doc->load(__DIR__."/book.xml"); echo "See if strictErrorChecking is on\n"; var_dump($doc->strictErrorChecking); diff --git a/ext/dom/tests/DOMDocument_validate_basic.phpt b/ext/dom/tests/DOMDocument_validate_basic.phpt index 21979b0bbe..092ff7cfe9 100644 --- a/ext/dom/tests/DOMDocument_validate_basic.phpt +++ b/ext/dom/tests/DOMDocument_validate_basic.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_validate_error2.phpt b/ext/dom/tests/DOMDocument_validate_error2.phpt index 08ec083fbb..c6d03bf02d 100644 --- a/ext/dom/tests/DOMDocument_validate_error2.phpt +++ b/ext/dom/tests/DOMDocument_validate_error2.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php diff --git a/ext/dom/tests/DOMDocument_validate_external_dtd.phpt b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt index 39dd70ee88..5f85b14fc4 100644 --- a/ext/dom/tests/DOMDocument_validate_external_dtd.phpt +++ b/ext/dom/tests/DOMDocument_validate_external_dtd.phpt @@ -5,7 +5,7 @@ Knut Urdalen <knut@php.net> #PHPTestFest2009 Norway 2009-06-09 \o/ --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php @@ -13,7 +13,7 @@ require_once dirname(__FILE__) .'/skipif.inc'; // reusing existing dtd: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.ent?view=co&content-type=text%2Fplain $dom = new DOMDocument('1.0'); $dom->substituteEntities = true; -$dom->load(dirname(__FILE__).'/dom.xml'); +$dom->load(__DIR__.'/dom.xml'); var_dump($dom->validate()); ?> --EXPECT-- diff --git a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt index cdf36319b3..5eb42a9907 100644 --- a/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt +++ b/ext/dom/tests/DOMDocument_validate_on_parse_variation.phpt @@ -13,7 +13,7 @@ require_once('skipif.inc'); require_once('dom_test.inc'); chdir(__DIR__); -$XMLStringGood = file_get_contents(dirname(__FILE__).'/note.xml'); +$XMLStringGood = file_get_contents(__DIR__.'/note.xml'); $dom = new DOMDocument; $dom->resolveExternals = TRUE; diff --git a/ext/dom/tests/DOMNode_C14NFile_basic.phpt b/ext/dom/tests/DOMNode_C14NFile_basic.phpt index 69edc860e4..b006e47deb 100644 --- a/ext/dom/tests/DOMNode_C14NFile_basic.phpt +++ b/ext/dom/tests/DOMNode_C14NFile_basic.phpt @@ -20,7 +20,7 @@ $xml = <<< XML </books> XML; -$output = dirname(__FILE__).'/DOMNode_C14NFile_basic.tmp'; +$output = __DIR__.'/DOMNode_C14NFile_basic.tmp'; $doc = new DOMDocument(); $doc->loadXML($xml); $node = $doc->getElementsByTagName('title')->item(0); @@ -30,7 +30,7 @@ var_dump($content); ?> --CLEAN-- <?php -$output = dirname(__FILE__).'/DOMNode_C14NFile_basic.tmp'; +$output = __DIR__.'/DOMNode_C14NFile_basic.tmp'; unlink($output); ?> --EXPECT-- diff --git a/ext/dom/tests/DOMNode_getLineNo_basic.phpt b/ext/dom/tests/DOMNode_getLineNo_basic.phpt index f74d5d7cc9..655b751355 100644 --- a/ext/dom/tests/DOMNode_getLineNo_basic.phpt +++ b/ext/dom/tests/DOMNode_getLineNo_basic.phpt @@ -6,7 +6,7 @@ include('skipif.inc'); ?> --FILE-- <?php -$file = dirname(__FILE__).'/book.xml'; +$file = __DIR__.'/book.xml'; $doc = new DOMDocument(); $doc->load($file); $nodes = $doc->getElementsByTagName('title'); diff --git a/ext/dom/tests/DOMNode_getNodePath_basic.phpt b/ext/dom/tests/DOMNode_getNodePath_basic.phpt index b422a5dbef..c490e0941f 100644 --- a/ext/dom/tests/DOMNode_getNodePath_basic.phpt +++ b/ext/dom/tests/DOMNode_getNodePath_basic.phpt @@ -6,7 +6,7 @@ include('skipif.inc'); ?> --FILE-- <?php -$file = dirname(__FILE__).'/book.xml'; +$file = __DIR__.'/book.xml'; $doc = new DOMDocument(); $doc->load($file); $nodes = $doc->getElementsByTagName('title'); diff --git a/ext/dom/tests/DOMNode_insertBefore_error2.phpt b/ext/dom/tests/DOMNode_insertBefore_error2.phpt index fbe212d4b9..e951cd237a 100644 --- a/ext/dom/tests/DOMNode_insertBefore_error2.phpt +++ b/ext/dom/tests/DOMNode_insertBefore_error2.phpt @@ -14,7 +14,7 @@ assert.bail=true <?php $dom = new DOMDocument(); -$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS); +$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS); assert($doc === true); $parent_node = $dom->getElementsByTagName("book")->item(0); diff --git a/ext/dom/tests/DOMNode_insertBefore_error3.phpt b/ext/dom/tests/DOMNode_insertBefore_error3.phpt index a8b4e45494..6e5137798c 100644 --- a/ext/dom/tests/DOMNode_insertBefore_error3.phpt +++ b/ext/dom/tests/DOMNode_insertBefore_error3.phpt @@ -14,7 +14,7 @@ assert.bail=true <?php $dom = new DOMDocument(); -$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS); +$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS); assert($doc === true); $parent_node = $dom->getElementsByTagName("book")->item(0); diff --git a/ext/dom/tests/DOMNode_insertBefore_error4.phpt b/ext/dom/tests/DOMNode_insertBefore_error4.phpt index 5b1fc3150a..84fbcd82dd 100644 --- a/ext/dom/tests/DOMNode_insertBefore_error4.phpt +++ b/ext/dom/tests/DOMNode_insertBefore_error4.phpt @@ -14,7 +14,7 @@ assert.bail=true <?php $dom = new DOMDocument(); -$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS); +$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS); assert($doc === true); $parent_node = $dom->getElementsByTagName("book")->item(0); diff --git a/ext/dom/tests/DOMNode_insertBefore_error5.phpt b/ext/dom/tests/DOMNode_insertBefore_error5.phpt index f5bcf098e7..e9dac3a459 100644 --- a/ext/dom/tests/DOMNode_insertBefore_error5.phpt +++ b/ext/dom/tests/DOMNode_insertBefore_error5.phpt @@ -14,7 +14,7 @@ assert.bail=true <?php $dom = new DOMDocument(); -$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS); +$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS); assert($doc === true); $parent_node = $dom->getElementsByTagName("book")->item(0); diff --git a/ext/dom/tests/DOMNode_insertBefore_error6.phpt b/ext/dom/tests/DOMNode_insertBefore_error6.phpt index 5afecafed7..6027d44140 100644 --- a/ext/dom/tests/DOMNode_insertBefore_error6.phpt +++ b/ext/dom/tests/DOMNode_insertBefore_error6.phpt @@ -14,7 +14,7 @@ assert.bail=true <?php $dom = new DOMDocument(); -$doc = $dom->load(dirname(__FILE__) . "/book.xml", LIBXML_NOBLANKS); +$doc = $dom->load(__DIR__ . "/book.xml", LIBXML_NOBLANKS); assert($doc === true); $parent_node = $dom->getElementsByTagName("book")->item(0); diff --git a/ext/dom/tests/bug37456.phpt b/ext/dom/tests/bug37456.phpt index d5a833413e..6d74a00308 100644 --- a/ext/dom/tests/bug37456.phpt +++ b/ext/dom/tests/bug37456.phpt @@ -7,7 +7,7 @@ Bug #37456 (DOMElement->setAttribute() loops forever) $doc = new DOMDocument(); $doc->resolveExternals = true; -$doc->load(dirname(__FILE__)."/dom.xml"); +$doc->load(__DIR__."/dom.xml"); $root = $doc->getElementsByTagName('foo')->item(0); $root->setAttribute('bar', '>'); diff --git a/ext/dom/tests/bug38949.phpt b/ext/dom/tests/bug38949.phpt index 4c81d9b731..47d0720ef4 100644 --- a/ext/dom/tests/bug38949.phpt +++ b/ext/dom/tests/bug38949.phpt @@ -6,7 +6,7 @@ Bug #38949 (Cannot get xmlns value attribute) <?php $doc = new DOMDocument(); -$doc->load(dirname(__FILE__)."/nsdoc.xml"); +$doc->load(__DIR__."/nsdoc.xml"); $root = $doc->documentElement; diff --git a/ext/dom/tests/bug41257.phpt b/ext/dom/tests/bug41257.phpt index edf62a53a3..71522617a3 100644 --- a/ext/dom/tests/bug41257.phpt +++ b/ext/dom/tests/bug41257.phpt @@ -6,7 +6,7 @@ Bug #41257 (lookupNamespaceURI does not work as expected) <?php $doc = new DOMDocument(); -$doc->load(dirname(__FILE__)."/nsdoc.xml"); +$doc->load(__DIR__."/nsdoc.xml"); $root = $doc->documentElement; diff --git a/ext/dom/tests/bug67081.phpt b/ext/dom/tests/bug67081.phpt index c6dc007d43..faf7f42b2c 100644 --- a/ext/dom/tests/bug67081.phpt +++ b/ext/dom/tests/bug67081.phpt @@ -8,22 +8,22 @@ require_once('skipif.inc'); <?php $domDocument = new DOMDocument(); $domDocument->substituteEntities = true; - $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_0.xml"); + $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "bug67081_0.xml"); var_dump($domDocument->doctype->internalSubset); $domDocument = new DOMDocument(); $domDocument->substituteEntities = true; - $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_1.xml"); + $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "bug67081_1.xml"); var_dump($domDocument->doctype->internalSubset); $domDocument = new DOMDocument(); $domDocument->substituteEntities = true; - $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_2.xml"); + $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "bug67081_2.xml"); var_dump($domDocument->doctype->internalSubset); $domDocument = new DOMDocument(); $domDocument->substituteEntities = true; - $domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "dom.xml"); + $domDocument->load(__DIR__ . DIRECTORY_SEPARATOR . "dom.xml"); var_dump($domDocument->doctype->internalSubset); ?> ===DONE=== diff --git a/ext/dom/tests/dom003.phpt b/ext/dom/tests/dom003.phpt index 4c9d5a979f..05d23cd792 100644 --- a/ext/dom/tests/dom003.phpt +++ b/ext/dom/tests/dom003.phpt @@ -6,7 +6,7 @@ Test 3: Exception Test <?php $dom = new domdocument; -$dom->load(dirname(__FILE__)."/book.xml"); +$dom->load(__DIR__."/book.xml"); $rootNode = $dom->documentElement; print "--- Catch exception with try/catch\n"; try { diff --git a/ext/dom/tests/dom004.phpt b/ext/dom/tests/dom004.phpt index 3a9295feb3..383b731a8c 100644 --- a/ext/dom/tests/dom004.phpt +++ b/ext/dom/tests/dom004.phpt @@ -8,7 +8,7 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap --FILE-- <?php $dom = new domdocument; -$dom->load("compress.zlib://".dirname(__FILE__)."/book.xml.gz"); +$dom->load("compress.zlib://".__DIR__."/book.xml.gz"); print $dom->saveXML(); --EXPECT-- <?xml version="1.0"?> diff --git a/ext/dom/tests/dom005.phpt b/ext/dom/tests/dom005.phpt index d7e828cc32..1006229997 100644 --- a/ext/dom/tests/dom005.phpt +++ b/ext/dom/tests/dom005.phpt @@ -5,7 +5,7 @@ Test 5: HTML Test --FILE-- <?php $dom = new domdocument; -$dom->loadHTMLFile(dirname(__FILE__)."/test.html", LIBXML_NOBLANKS); +$dom->loadHTMLFile(__DIR__."/test.html", LIBXML_NOBLANKS); print "--- save as XML\n"; print adjustDoctype($dom->saveXML()); diff --git a/ext/dom/tests/dom006.phpt b/ext/dom/tests/dom006.phpt index 6872a293ee..bd4b3922a9 100644 --- a/ext/dom/tests/dom006.phpt +++ b/ext/dom/tests/dom006.phpt @@ -23,7 +23,7 @@ Class books extends domDocument { $dom = new books; -$dom->load(dirname(__FILE__)."/book.xml"); +$dom->load(__DIR__."/book.xml"); $dom->addBook("PHP de Luxe", "Richard Samar, Christian Stocker"); print $dom->saveXML(); --EXPECT-- diff --git a/ext/dom/tests/dom_import_simplexml.phpt b/ext/dom/tests/dom_import_simplexml.phpt index 81744aa260..6b39234851 100644 --- a/ext/dom/tests/dom_import_simplexml.phpt +++ b/ext/dom/tests/dom_import_simplexml.phpt @@ -5,7 +5,7 @@ Interop Test: Import from SimpleXML <?php if (!extension_loaded('simplexml')) die('skip simplexml extension not available');?> --FILE-- <?php -$s = simplexml_load_file(dirname(__FILE__)."/book.xml"); +$s = simplexml_load_file(__DIR__."/book.xml"); if(!$s) { echo "Error while loading the document\n"; exit; diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt index 5d8906e316..a698895c60 100644 --- a/ext/dom/tests/dom_xinclude.phpt +++ b/ext/dom/tests/dom_xinclude.phpt @@ -9,8 +9,8 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap <?php $dom = new domdocument; -$data = file_get_contents(dirname(__FILE__)."/xinclude.xml"); -$reldir = str_replace(getcwd(),".",dirname(__FILE__)); +$data = file_get_contents(__DIR__."/xinclude.xml"); +$reldir = str_replace(getcwd(),".",__DIR__); if (DIRECTORY_SEPARATOR == '\\') { $reldir = str_replace('\\',"/", $reldir); } diff --git a/ext/exif/tests/bug34704-mb.phpt b/ext/exif/tests/bug34704-mb.phpt index 8185eb319c..4ca5d6af6b 100644 --- a/ext/exif/tests/bug34704-mb.phpt +++ b/ext/exif/tests/bug34704-mb.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/bug34704私はガラスを食べられます.jpg'; +$infile = __DIR__.'/bug34704私はガラスを食べられます.jpg'; var_dump(exif_read_data($infile)); ?> ===DONE=== diff --git a/ext/exif/tests/bug34704.phpt b/ext/exif/tests/bug34704.phpt index ebe05fb878..9925840d5a 100644 --- a/ext/exif/tests/bug34704.phpt +++ b/ext/exif/tests/bug34704.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/bug34704.jpg'; +$infile = __DIR__.'/bug34704.jpg'; var_dump(exif_read_data($infile)); ?> ===DONE=== diff --git a/ext/exif/tests/bug48378.phpt b/ext/exif/tests/bug48378.phpt index cd2e48a0d4..a830f226b1 100644 --- a/ext/exif/tests/bug48378.phpt +++ b/ext/exif/tests/bug48378.phpt @@ -5,7 +5,7 @@ Bug #48378 (Infinite recursion due to corrupt JPEG) --FILE-- <?php exif_read_data( -dirname(__FILE__) . "/bug48378.jpeg", +__DIR__ . "/bug48378.jpeg", "FILE,COMPUTED,ANY_TAG" ); ?> diff --git a/ext/exif/tests/bug50660/bug50660.phpt b/ext/exif/tests/bug50660/bug50660.phpt index e523921ebd..4b502a0a29 100644 --- a/ext/exif/tests/bug50660/bug50660.phpt +++ b/ext/exif/tests/bug50660/bug50660.phpt @@ -7,9 +7,9 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/bug50660-1.jpg'; +$infile = __DIR__.'/bug50660-1.jpg'; var_dump(exif_read_data($infile) !== false); -$infile = dirname(__FILE__).'/bug50660-2.jpg'; +$infile = __DIR__.'/bug50660-2.jpg'; var_dump(exif_read_data($infile) !== false); ?> ===DONE=== diff --git a/ext/exif/tests/bug50845.phpt b/ext/exif/tests/bug50845.phpt index 2c142236a4..277415cd73 100644 --- a/ext/exif/tests/bug50845.phpt +++ b/ext/exif/tests/bug50845.phpt @@ -4,7 +4,7 @@ Bug #50845 (exif_read_data() returns corrupted exif headers) <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php -$infile = dirname(__FILE__).'/bug50845.jpg'; +$infile = __DIR__.'/bug50845.jpg'; var_dump(exif_read_data($infile)); --EXPECTF-- array(44) { diff --git a/ext/exif/tests/bug60150.phpt b/ext/exif/tests/bug60150.phpt index 2f39c11511..17aafb0ca0 100644 --- a/ext/exif/tests/bug60150.phpt +++ b/ext/exif/tests/bug60150.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/bug60150.jpg'; +$infile = __DIR__.'/bug60150.jpg'; var_dump(exif_read_data($infile)); ?> ===DONE=== diff --git a/ext/exif/tests/bug72603.phpt b/ext/exif/tests/bug72603.phpt index 71d3943446..eacb6ee45a 100644 --- a/ext/exif/tests/bug72603.phpt +++ b/ext/exif/tests/bug72603.phpt @@ -4,7 +4,7 @@ Bug #72603 (Out of bound read in exif_process_IFD_in_MAKERNOTE) <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php -var_dump(count(exif_read_data(dirname(__FILE__) . "/bug72603.jpeg"))); +var_dump(count(exif_read_data(__DIR__ . "/bug72603.jpeg"))); ?> --EXPECTF-- Warning: exif_read_data(bug72603.jpeg): %s in %s%ebug72603.php on line %d diff --git a/ext/exif/tests/bug72618.phpt b/ext/exif/tests/bug72618.phpt index c4fe8e3f90..c76edb4c50 100644 --- a/ext/exif/tests/bug72618.phpt +++ b/ext/exif/tests/bug72618.phpt @@ -4,7 +4,7 @@ Bug 72618 (NULL Pointer Dereference in exif_process_user_comment) <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php -var_dump(count(exif_read_data(dirname(__FILE__) . "/bug72618.jpg"))); +var_dump(count(exif_read_data(__DIR__ . "/bug72618.jpg"))); ?> --EXPECTF-- Warning: exif_read_data(bug72618.jpg): %s in %s%ebug72618.php on line %d diff --git a/ext/exif/tests/bug72819/bug72819.phpt b/ext/exif/tests/bug72819/bug72819.phpt index d99a15c197..0813c8a5eb 100644 --- a/ext/exif/tests/bug72819/bug72819.phpt +++ b/ext/exif/tests/bug72819/bug72819.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/bug72819.jpg'; +$infile = __DIR__.'/bug72819.jpg'; var_dump(strlen(exif_thumbnail($infile))); ?> ===DONE=== diff --git a/ext/exif/tests/bug73115/bug73115.phpt b/ext/exif/tests/bug73115/bug73115.phpt index 9ce3818e59..86c99a63d0 100644 --- a/ext/exif/tests/bug73115/bug73115.phpt +++ b/ext/exif/tests/bug73115/bug73115.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/bug73115.jpg'; +$infile = __DIR__.'/bug73115.jpg'; var_dump(count(exif_read_data($infile))); ?> ===DONE=== diff --git a/ext/exif/tests/bug74428/bug74428.phpt b/ext/exif/tests/bug74428/bug74428.phpt index 24911084e4..881e6987c4 100644 --- a/ext/exif/tests/bug74428/bug74428.phpt +++ b/ext/exif/tests/bug74428/bug74428.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/bug74428.jpg'; +$infile = __DIR__.'/bug74428.jpg'; var_dump(exif_read_data($infile)); ?> ===DONE=== diff --git a/ext/exif/tests/bug76557.phpt b/ext/exif/tests/bug76557.phpt index 0b48b792ea..b036971f8b 100644 --- a/ext/exif/tests/bug76557.phpt +++ b/ext/exif/tests/bug76557.phpt @@ -4,7 +4,7 @@ Bug 76557 (heap-buffer-overflow (READ of size 48) while reading exif data) <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__) . "/bug76557.jpg")); +var_dump(exif_read_data(__DIR__ . "/bug76557.jpg")); ?> DONE --EXPECTF-- diff --git a/ext/exif/tests/bug77184/bug77184.phpt b/ext/exif/tests/bug77184/bug77184.phpt index e118d2f677..da2bbc048f 100644 --- a/ext/exif/tests/bug77184/bug77184.phpt +++ b/ext/exif/tests/bug77184/bug77184.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -$infile = dirname(__FILE__).'/DJI_0245_tiny.JPG'; +$infile = __DIR__.'/DJI_0245_tiny.JPG'; $tags = exif_read_data($infile); echo $tags['GPSLatitude'][2], PHP_EOL; echo $tags['GPSLongitude'][2], PHP_EOL; diff --git a/ext/exif/tests/bug77564/bug77564.phpt b/ext/exif/tests/bug77564/bug77564.phpt index 2f72b3c9ac..ec686958af 100644 --- a/ext/exif/tests/bug77564/bug77564.phpt +++ b/ext/exif/tests/bug77564/bug77564.phpt @@ -4,7 +4,7 @@ Bug 77564 (Memory leak in exif_process_IFD_TAG) <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__) . '/bug77564.jpg')); +var_dump(exif_read_data(__DIR__ . '/bug77564.jpg')); ?> DONE --EXPECTF-- diff --git a/ext/exif/tests/exif000.phpt b/ext/exif/tests/exif000.phpt index eea16438cf..2e6b94f7ad 100644 --- a/ext/exif/tests/exif000.phpt +++ b/ext/exif/tests/exif000.phpt @@ -12,7 +12,7 @@ zlib.output_compression=0 test2.jpg is the same image but contains Exif/Comment information and a copy of test1.jpg as a thumbnail. */ -print_r(exif_read_data(dirname(__FILE__).'/test2.jpg')); +print_r(exif_read_data(__DIR__.'/test2.jpg')); ?> --EXPECTF-- Array diff --git a/ext/exif/tests/exif001.phpt b/ext/exif/tests/exif001.phpt index 543a9bd4f5..75f423b461 100644 --- a/ext/exif/tests/exif001.phpt +++ b/ext/exif/tests/exif001.phpt @@ -12,7 +12,7 @@ zlib.output_compression=0 test2.jpg is the same image but contains Exif/Comment information and a copy of test1.jpg as a thumbnail. */ -var_dump(exif_read_data(dirname(__FILE__).'/test2.jpg','',true,false)); +var_dump(exif_read_data(__DIR__.'/test2.jpg','',true,false)); ?> --EXPECTF-- array(5) { diff --git a/ext/exif/tests/exif002.phpt b/ext/exif/tests/exif002.phpt index 7f78ef2813..95e51a9efe 100644 --- a/ext/exif/tests/exif002.phpt +++ b/ext/exif/tests/exif002.phpt @@ -12,9 +12,9 @@ zlib.output_compression=0 test2.jpg is the same image but contains Exif/Comment information and a copy of test1.jpg as a thumbnail. */ -$infile = dirname(__FILE__).'/test1.jpg'; +$infile = __DIR__.'/test1.jpg'; echo md5_file($infile).'_'.filesize($infile); -$thumb = exif_thumbnail(dirname(__FILE__).'/test2.jpg'); +$thumb = exif_thumbnail(__DIR__.'/test2.jpg'); echo " == "; echo md5($thumb).'_'.strlen($thumb); echo "\n"; diff --git a/ext/exif/tests/exif003.phpt b/ext/exif/tests/exif003.phpt index daaf77d83a..9d66e35ddc 100644 --- a/ext/exif/tests/exif003.phpt +++ b/ext/exif/tests/exif003.phpt @@ -19,7 +19,7 @@ exif.encode_unicode=ISO-8859-15 copy of test1.jpg as a thumbnail. test3.jpg is the same as test2.jpg but with a UNICODE UserComment: ÄÖ&Üßäöü */ -var_dump(exif_read_data(dirname(__FILE__).'/test3.jpg','',true,false)); +var_dump(exif_read_data(__DIR__.'/test3.jpg','',true,false)); ?> --EXPECTF-- array(5) { diff --git a/ext/exif/tests/exif004.phpt b/ext/exif/tests/exif004.phpt index fd941cc4d4..2b2e978d52 100644 --- a/ext/exif/tests/exif004.phpt +++ b/ext/exif/tests/exif004.phpt @@ -17,7 +17,7 @@ exif.encode_unicode=ISO-8859-1 /* test4.jpg is a 1*1 image that contains Exif tags written by WindowsXP */ -$image = exif_read_data(dirname(__FILE__).'/test4.jpg','',true,false); +$image = exif_read_data(__DIR__.'/test4.jpg','',true,false); var_dump($image['WINXP']); ?> --EXPECT-- diff --git a/ext/exif/tests/exif005.phpt b/ext/exif/tests/exif005.phpt index a2282aa1b0..6cfdf01f5f 100644 --- a/ext/exif/tests/exif005.phpt +++ b/ext/exif/tests/exif005.phpt @@ -8,7 +8,7 @@ zlib.output_compression=0 --FILE-- <?php // test5.jpg is a 1*1 image that contains an Exif section with ifd = 00000009h -$image = exif_read_data(dirname(__FILE__).'/test5.jpg','',true,false); +$image = exif_read_data(__DIR__.'/test5.jpg','',true,false); var_dump($image['IFD0']); ?> --EXPECT-- diff --git a/ext/exif/tests/exif007.phpt b/ext/exif/tests/exif007.phpt index 0e37ad0a18..58de488a8d 100644 --- a/ext/exif/tests/exif007.phpt +++ b/ext/exif/tests/exif007.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image007.jpg')); +var_dump(exif_read_data(__DIR__.'/image007.jpg')); ?> --EXPECTF-- array(7) { diff --git a/ext/exif/tests/exif008.phpt b/ext/exif/tests/exif008.phpt index 1936739b18..6744dbd8a0 100644 --- a/ext/exif/tests/exif008.phpt +++ b/ext/exif/tests/exif008.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image008.jpg')); +var_dump(exif_read_data(__DIR__.'/image008.jpg')); ?> --EXPECTF-- array(16) { diff --git a/ext/exif/tests/exif009.phpt b/ext/exif/tests/exif009.phpt index 1ce3658136..0424798df3 100644 --- a/ext/exif/tests/exif009.phpt +++ b/ext/exif/tests/exif009.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image009.jpg')); +var_dump(exif_read_data(__DIR__.'/image009.jpg')); ?> --EXPECTF-- array(16) { diff --git a/ext/exif/tests/exif010.phpt b/ext/exif/tests/exif010.phpt index 1e69610eb6..3104acd5c4 100644 --- a/ext/exif/tests/exif010.phpt +++ b/ext/exif/tests/exif010.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image010.jpg')); +var_dump(exif_read_data(__DIR__.'/image010.jpg')); ?> --EXPECTF-- array(28) { diff --git a/ext/exif/tests/exif011.phpt b/ext/exif/tests/exif011.phpt index 0dac68842b..3d70bd1b50 100644 --- a/ext/exif/tests/exif011.phpt +++ b/ext/exif/tests/exif011.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image011.jpg')); +var_dump(exif_read_data(__DIR__.'/image011.jpg')); ?> --EXPECTF-- array(28) { diff --git a/ext/exif/tests/exif012.phpt b/ext/exif/tests/exif012.phpt Binary files differindex 177bab8f43..d37a3611a5 100644 --- a/ext/exif/tests/exif012.phpt +++ b/ext/exif/tests/exif012.phpt diff --git a/ext/exif/tests/exif013.phpt b/ext/exif/tests/exif013.phpt Binary files differindex e1f67aa3b3..3882ba93f2 100644 --- a/ext/exif/tests/exif013.phpt +++ b/ext/exif/tests/exif013.phpt diff --git a/ext/exif/tests/exif014.phpt b/ext/exif/tests/exif014.phpt Binary files differindex 716a7bab1d..03dbd4a92f 100644 --- a/ext/exif/tests/exif014.phpt +++ b/ext/exif/tests/exif014.phpt diff --git a/ext/exif/tests/exif015.phpt b/ext/exif/tests/exif015.phpt Binary files differindex f5b38cb657..d60581c2e2 100644 --- a/ext/exif/tests/exif015.phpt +++ b/ext/exif/tests/exif015.phpt diff --git a/ext/exif/tests/exif016.phpt b/ext/exif/tests/exif016.phpt index cd5ab2d6be..e0123e8034 100644 --- a/ext/exif/tests/exif016.phpt +++ b/ext/exif/tests/exif016.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image016.tiff')); +var_dump(exif_read_data(__DIR__.'/image016.tiff')); ?> --EXPECTF-- array(26) { diff --git a/ext/exif/tests/exif017.phpt b/ext/exif/tests/exif017.phpt index 3f1e1b7a59..65e1c572db 100644 --- a/ext/exif/tests/exif017.phpt +++ b/ext/exif/tests/exif017.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image017.tiff')); +var_dump(exif_read_data(__DIR__.'/image017.tiff')); ?> --EXPECTF-- array(26) { diff --git a/ext/exif/tests/exif018.phpt b/ext/exif/tests/exif018.phpt index 516f409c04..5139ca62aa 100644 --- a/ext/exif/tests/exif018.phpt +++ b/ext/exif/tests/exif018.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image018.tiff')); +var_dump(exif_read_data(__DIR__.'/image018.tiff')); ?> --EXPECTF-- array(37) { diff --git a/ext/exif/tests/exif020.phpt b/ext/exif/tests/exif020.phpt index 1e5e216582..82f0b1e430 100644 --- a/ext/exif/tests/exif020.phpt +++ b/ext/exif/tests/exif020.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image020.tiff')); +var_dump(exif_read_data(__DIR__.'/image020.tiff')); ?> --EXPECTF-- array(34) { diff --git a/ext/exif/tests/exif021.phpt b/ext/exif/tests/exif021.phpt index e8dd93c04f..66f5d4c21c 100644 --- a/ext/exif/tests/exif021.phpt +++ b/ext/exif/tests/exif021.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image021.tiff')); +var_dump(exif_read_data(__DIR__.'/image021.tiff')); ?> --EXPECTF-- array(34) { diff --git a/ext/exif/tests/exif022.phpt b/ext/exif/tests/exif022.phpt index 6fffe50ddd..68c7b4765c 100644 --- a/ext/exif/tests/exif022.phpt +++ b/ext/exif/tests/exif022.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image022.tiff')); +var_dump(exif_read_data(__DIR__.'/image022.tiff')); ?> --EXPECTF-- array(45) { diff --git a/ext/exif/tests/exif023.phpt b/ext/exif/tests/exif023.phpt index 3c6803fc4c..f26a0fda01 100644 --- a/ext/exif/tests/exif023.phpt +++ b/ext/exif/tests/exif023.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image023.tiff')); +var_dump(exif_read_data(__DIR__.'/image023.tiff')); ?> --EXPECTF-- array(45) { diff --git a/ext/exif/tests/exif024.phpt b/ext/exif/tests/exif024.phpt index a1ee94b487..f1e9c66c54 100644 --- a/ext/exif/tests/exif024.phpt +++ b/ext/exif/tests/exif024.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image024.jpg')); +var_dump(exif_read_data(__DIR__.'/image024.jpg')); ?> --EXPECTF-- array(14) { diff --git a/ext/exif/tests/exif025.phpt b/ext/exif/tests/exif025.phpt index b224c91546..7ccbfd8875 100644 --- a/ext/exif/tests/exif025.phpt +++ b/ext/exif/tests/exif025.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image025.jpg')); +var_dump(exif_read_data(__DIR__.'/image025.jpg')); ?> --EXPECTF-- array(14) { diff --git a/ext/exif/tests/exif026.phpt b/ext/exif/tests/exif026.phpt index c0a8bc60ab..ff65cc10f4 100644 --- a/ext/exif/tests/exif026.phpt +++ b/ext/exif/tests/exif026.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image026.tiff')); +var_dump(exif_read_data(__DIR__.'/image026.tiff')); ?> --EXPECTF-- array(31) { diff --git a/ext/exif/tests/exif027.phpt b/ext/exif/tests/exif027.phpt index 58c94ccef3..79520c29b7 100644 --- a/ext/exif/tests/exif027.phpt +++ b/ext/exif/tests/exif027.phpt @@ -7,7 +7,7 @@ output_handler= zlib.output_compression=0 --FILE-- <?php -var_dump(exif_read_data(dirname(__FILE__).'/image027.tiff')); +var_dump(exif_read_data(__DIR__.'/image027.tiff')); ?> --EXPECTF-- array(31) { diff --git a/ext/exif/tests/exif_encoding_crash.phpt b/ext/exif/tests/exif_encoding_crash.phpt index 1c4ad63860..a1222b1582 100644 --- a/ext/exif/tests/exif_encoding_crash.phpt +++ b/ext/exif/tests/exif_encoding_crash.phpt @@ -4,7 +4,7 @@ PHP crash when zend_multibyte_encoding_converter returns (size_t)-1) <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php -$infile = dirname(__FILE__).'/exif_encoding_crash.jpg'; +$infile = __DIR__.'/exif_encoding_crash.jpg'; $exif_data = exif_read_data($infile); echo "*** no core dump ***\n"; ?> diff --git a/ext/exif/tests/exif_imagetype_basic-mb.phpt b/ext/exif/tests/exif_imagetype_basic-mb.phpt index a37090da41..11a5274615 100644 --- a/ext/exif/tests/exif_imagetype_basic-mb.phpt +++ b/ext/exif/tests/exif_imagetype_basic-mb.phpt @@ -14,7 +14,7 @@ zlib.output_compression=0 */ echo "*** Testing exif_imagetype() : basic functionality ***\n"; -var_dump(exif_imagetype(dirname(__FILE__).'/test2私はガラスを食べられます.jpg')); +var_dump(exif_imagetype(__DIR__.'/test2私はガラスを食べられます.jpg')); ?> ===Done=== --EXPECT-- diff --git a/ext/exif/tests/exif_imagetype_basic.phpt b/ext/exif/tests/exif_imagetype_basic.phpt index d04c1f7c50..dbb0c8a7a9 100644 --- a/ext/exif/tests/exif_imagetype_basic.phpt +++ b/ext/exif/tests/exif_imagetype_basic.phpt @@ -14,7 +14,7 @@ zlib.output_compression=0 */ echo "*** Testing exif_imagetype() : basic functionality ***\n"; -var_dump(exif_imagetype(dirname(__FILE__).'/test2.jpg')); +var_dump(exif_imagetype(__DIR__.'/test2.jpg')); ?> ===Done=== --EXPECT-- diff --git a/ext/exif/tests/exif_imagetype_error.phpt b/ext/exif/tests/exif_imagetype_error.phpt index 3627ad969d..80538a0f68 100644 --- a/ext/exif/tests/exif_imagetype_error.phpt +++ b/ext/exif/tests/exif_imagetype_error.phpt @@ -17,10 +17,10 @@ var_dump( exif_imagetype() ); echo "\n-- Testing exif_imagetype() function with more than expected no. of arguments --\n"; $extra_arg = 10; -var_dump( exif_imagetype(dirname(__FILE__).'/test2.jpg', $extra_arg) ); +var_dump( exif_imagetype(__DIR__.'/test2.jpg', $extra_arg) ); echo "\n-- Testing exif_imagetype() function with an unknown file --\n"; -var_dump( exif_imagetype(dirname(__FILE__).'/foo.jpg') ); +var_dump( exif_imagetype(__DIR__.'/foo.jpg') ); ?> diff --git a/ext/exif/tests/exif_read_data_0.phpt b/ext/exif/tests/exif_read_data_0.phpt index 79e92f488c..5421a14d2e 100644 --- a/ext/exif/tests/exif_read_data_0.phpt +++ b/ext/exif/tests/exif_read_data_0.phpt @@ -4,7 +4,7 @@ Test exif_read_data on unavailable file <?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> --FILE-- <?php -$infile = dirname(__FILE__).'/bug73115.JPG'; +$infile = __DIR__.'/bug73115.JPG'; exif_read_data($infile); ?> ===DONE=== diff --git a/ext/exif/tests/exif_read_exif_data_basic-mb.phpt b/ext/exif/tests/exif_read_exif_data_basic-mb.phpt index b70be24278..70e9ab0401 100644 --- a/ext/exif/tests/exif_read_exif_data_basic-mb.phpt +++ b/ext/exif/tests/exif_read_exif_data_basic-mb.phpt @@ -14,7 +14,7 @@ zlib.output_compression=0 */ echo "*** Testing read_exif_data() : basic functionality ***\n"; -print_r(read_exif_data(dirname(__FILE__).'/test2私はガラスを食べられます.jpg')); +print_r(read_exif_data(__DIR__.'/test2私はガラスを食べられます.jpg')); ?> ===Done=== --EXPECTF-- diff --git a/ext/exif/tests/exif_read_exif_data_basic.phpt b/ext/exif/tests/exif_read_exif_data_basic.phpt index b2799909d3..254cd1a164 100644 --- a/ext/exif/tests/exif_read_exif_data_basic.phpt +++ b/ext/exif/tests/exif_read_exif_data_basic.phpt @@ -14,7 +14,7 @@ zlib.output_compression=0 */ echo "*** Testing read_exif_data() : basic functionality ***\n"; -print_r(read_exif_data(dirname(__FILE__).'/test2.jpg')); +print_r(read_exif_data(__DIR__.'/test2.jpg')); ?> ===Done=== --EXPECTF-- diff --git a/ext/fileinfo/tests/bug61964-mb.phpt b/ext/fileinfo/tests/bug61964-mb.phpt index 6dc3b93f77..a0f198e682 100644 --- a/ext/fileinfo/tests/bug61964-mb.phpt +++ b/ext/fileinfo/tests/bug61964-mb.phpt @@ -1,11 +1,11 @@ --TEST-- Bug #61964 (finfo_open with directory cause invalid free) --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php -$magic_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; +$magic_file = __DIR__ . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; $ret = @finfo_open(FILEINFO_NONE, $magic_file . ".non-exits私はガラスを食べられます"); var_dump($ret); diff --git a/ext/fileinfo/tests/bug61964.phpt b/ext/fileinfo/tests/bug61964.phpt index 03f728721a..d6782a2072 100644 --- a/ext/fileinfo/tests/bug61964.phpt +++ b/ext/fileinfo/tests/bug61964.phpt @@ -1,11 +1,11 @@ --TEST-- Bug #61964 (finfo_open with directory cause invalid free) --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php -$magic_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magic_file = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $ret = @finfo_open(FILEINFO_NONE, $magic_file . ".non-exits"); var_dump($ret); diff --git a/ext/fileinfo/tests/bug67516.phpt b/ext/fileinfo/tests/bug67516.phpt index d4f72877e2..d077d2dcbc 100644 --- a/ext/fileinfo/tests/bug67516.phpt +++ b/ext/fileinfo/tests/bug67516.phpt @@ -8,8 +8,8 @@ if (!class_exists('finfo')) <?php $f = new finfo; -var_dump($f->file(dirname(__FILE__) . "/bug67516.gif", FILEINFO_MIME_TYPE)); -var_dump($f->file(dirname(__FILE__) . "/bug67516.gif", FILEINFO_MIME)); +var_dump($f->file(__DIR__ . "/bug67516.gif", FILEINFO_MIME_TYPE)); +var_dump($f->file(__DIR__ . "/bug67516.gif", FILEINFO_MIME)); ?> ===DONE=== --EXPECT-- diff --git a/ext/fileinfo/tests/bug67647-mb.phpt b/ext/fileinfo/tests/bug67647-mb.phpt index 3887d49cea..310b9f2fad 100644 --- a/ext/fileinfo/tests/bug67647-mb.phpt +++ b/ext/fileinfo/tests/bug67647-mb.phpt @@ -2,7 +2,7 @@ Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly --SKIPIF-- <?php - require_once(dirname(__FILE__) . '/skipif.inc'); + require_once(__DIR__ . '/skipif.inc'); if (ini_get("default_charset") != "UTF-8") { die("skip require default_charset == UTF-8"); @@ -11,10 +11,10 @@ Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly --FILE-- <?php -$src = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647.mov"; +$src = __DIR__ . DIRECTORY_SEPARATOR . "67647.mov"; $f_base = "67647私はガラスを食べられます.mov"; -$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base; +$f = __DIR__ . DIRECTORY_SEPARATOR . $f_base; /* Streams mb path support is tested a lot elsewhere. Copy the existing file therefore, avoid duplication in the repo. */ @@ -30,7 +30,7 @@ var_dump($fi->file($f)); --CLEAN-- <?php $f_base = "67647私はガラスを食べられます.mov"; - $f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base; + $f = __DIR__ . DIRECTORY_SEPARATOR . $f_base; unlink($f); ?> --EXPECT-- diff --git a/ext/fileinfo/tests/bug67647.phpt b/ext/fileinfo/tests/bug67647.phpt index 4682415649..de74b84c89 100644 --- a/ext/fileinfo/tests/bug67647.phpt +++ b/ext/fileinfo/tests/bug67647.phpt @@ -1,11 +1,11 @@ --TEST-- Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php -$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647.mov"; +$f = __DIR__ . DIRECTORY_SEPARATOR . "67647.mov"; $fi = new finfo(FILEINFO_MIME_TYPE); var_dump($fi->file($f)); diff --git a/ext/fileinfo/tests/bug68398.phpt b/ext/fileinfo/tests/bug68398.phpt index a761a755c1..16ad30ee56 100644 --- a/ext/fileinfo/tests/bug68398.phpt +++ b/ext/fileinfo/tests/bug68398.phpt @@ -1,12 +1,12 @@ --TEST-- Bug #68398: msooxml matches too many archives --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php $f = new finfo(FILEINFO_MIME); -var_dump($f->file(dirname(__FILE__) . DIRECTORY_SEPARATOR . '68398.zip')); +var_dump($f->file(__DIR__ . DIRECTORY_SEPARATOR . '68398.zip')); ?> +++DONE+++ --EXPECT-- diff --git a/ext/fileinfo/tests/bug68731.phpt b/ext/fileinfo/tests/bug68731.phpt index cba790925e..43083c9eec 100644 --- a/ext/fileinfo/tests/bug68731.phpt +++ b/ext/fileinfo/tests/bug68731.phpt @@ -6,7 +6,7 @@ if (!class_exists('finfo')) die('skip no fileinfo extension'); --FILE-- <?php - $buffer = file_get_contents(dirname(__FILE__) . '/68731.gif'); + $buffer = file_get_contents(__DIR__ . '/68731.gif'); $finfo = finfo_open(FILEINFO_MIME_TYPE); echo finfo_buffer($finfo, $buffer); ?> diff --git a/ext/fileinfo/tests/bug68735.phpt b/ext/fileinfo/tests/bug68735.phpt index 03e9a4285f..d43ceca40b 100644 --- a/ext/fileinfo/tests/bug68735.phpt +++ b/ext/fileinfo/tests/bug68735.phpt @@ -1,10 +1,10 @@ --TEST-- Bug #68735 fileinfo out-of-bounds memory access --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php - $test_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug68735.jpg"; + $test_file = __DIR__ . DIRECTORY_SEPARATOR . "bug68735.jpg"; $f = new finfo; var_dump($f->file($test_file)); diff --git a/ext/fileinfo/tests/bug68819_001.phpt b/ext/fileinfo/tests/bug68819_001.phpt index ce39ee61db..a7078bc3f2 100644 --- a/ext/fileinfo/tests/bug68819_001.phpt +++ b/ext/fileinfo/tests/bug68819_001.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #68819 Fileinfo on specific file causes spurious OOM and/or segfault, var 1 --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/bug68819_002.phpt b/ext/fileinfo/tests/bug68819_002.phpt index 7d5f6c642d..a657543f5c 100644 --- a/ext/fileinfo/tests/bug68819_002.phpt +++ b/ext/fileinfo/tests/bug68819_002.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #68819 Fileinfo on specific file causes spurious OOM and/or segfault, var 2 --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/bug68996.phpt b/ext/fileinfo/tests/bug68996.phpt index 214e52fa6f..a489e3c0de 100644 --- a/ext/fileinfo/tests/bug68996.phpt +++ b/ext/fileinfo/tests/bug68996.phpt @@ -6,7 +6,7 @@ if (getenv("USE_ZEND_ALLOC") !== "0") { print "skip Need Zend MM disabled"; } ?> -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --INI-- html_errors=1 --FILE-- diff --git a/ext/fileinfo/tests/bug69320.phpt b/ext/fileinfo/tests/bug69320.phpt index 388afc3ff6..9ab2bf2cb3 100644 --- a/ext/fileinfo/tests/bug69320.phpt +++ b/ext/fileinfo/tests/bug69320.phpt @@ -1,18 +1,18 @@ --TEST-- Bug #69320 libmagic crash when running laravel tests --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php -$fname = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug69320.txt"; +$fname = __DIR__ . DIRECTORY_SEPARATOR . "bug69320.txt"; file_put_contents($fname, "foo"); var_dump(finfo_file(finfo_open(FILEINFO_MIME_TYPE), $fname)); ?> --CLEAN-- <?php - $fname = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug69320.txt"; + $fname = __DIR__ . DIRECTORY_SEPARATOR . "bug69320.txt"; unlink($fname); ?> --EXPECT-- diff --git a/ext/fileinfo/tests/bug71434.phpt b/ext/fileinfo/tests/bug71434.phpt index d886b6607b..54bff18b32 100644 --- a/ext/fileinfo/tests/bug71434.phpt +++ b/ext/fileinfo/tests/bug71434.phpt @@ -1,7 +1,7 @@ --TEST-- Bug #68735 fileinfo out-of-bounds memory access --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php $a='#!env python diff --git a/ext/fileinfo/tests/bug71527-mb.phpt b/ext/fileinfo/tests/bug71527-mb.phpt index 60af049f4f..e04c708849 100644 --- a/ext/fileinfo/tests/bug71527-mb.phpt +++ b/ext/fileinfo/tests/bug71527-mb.phpt @@ -8,7 +8,7 @@ if (!class_exists('finfo')) USE_ZEND_ALLOC=0 --FILE-- <?php - $finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527私はガラスを食べられます.magic"); + $finfo = finfo_open(FILEINFO_NONE, __DIR__ . DIRECTORY_SEPARATOR . "bug71527私はガラスを食べられます.magic"); $info = finfo_file($finfo, __FILE__); var_dump($info); ?> diff --git a/ext/fileinfo/tests/bug71527.phpt b/ext/fileinfo/tests/bug71527.phpt index 1feb29dd73..4fa2b30755 100644 --- a/ext/fileinfo/tests/bug71527.phpt +++ b/ext/fileinfo/tests/bug71527.phpt @@ -8,7 +8,7 @@ if (!class_exists('finfo')) USE_ZEND_ALLOC=0 --FILE-- <?php - $finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527.magic"); + $finfo = finfo_open(FILEINFO_NONE, __DIR__ . DIRECTORY_SEPARATOR . "bug71527.magic"); $info = finfo_file($finfo, __FILE__); var_dump($info); ?> diff --git a/ext/fileinfo/tests/finfo_buffer_basic-mb.phpt b/ext/fileinfo/tests/finfo_buffer_basic-mb.phpt index 40e38eeaaa..ca9c10cb66 100644 --- a/ext/fileinfo/tests/finfo_buffer_basic-mb.phpt +++ b/ext/fileinfo/tests/finfo_buffer_basic-mb.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_buffer() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : string finfo_buffer(resource finfo, char *string [, int options [, resource context]]) @@ -10,7 +10,7 @@ Test finfo_buffer() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; $options = array( FILEINFO_NONE, diff --git a/ext/fileinfo/tests/finfo_buffer_basic.phpt b/ext/fileinfo/tests/finfo_buffer_basic.phpt index 42ae0dc1e0..07ee1b311e 100644 --- a/ext/fileinfo/tests/finfo_buffer_basic.phpt +++ b/ext/fileinfo/tests/finfo_buffer_basic.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_buffer() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : string finfo_buffer(resource finfo, char *string [, int options [, resource context]]) @@ -10,7 +10,7 @@ Test finfo_buffer() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $options = array( FILEINFO_NONE, diff --git a/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt b/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt index 5b2530361b..2637b15aee 100644 --- a/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt +++ b/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_buffer() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : string finfo_buffer(resource finfo, char *string [, int options [, resource context]]) @@ -10,7 +10,7 @@ Test finfo_buffer() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; $options = array( FILEINFO_NONE, diff --git a/ext/fileinfo/tests/finfo_buffer_variation1.phpt b/ext/fileinfo/tests/finfo_buffer_variation1.phpt index e6363d838d..a42c41d975 100644 --- a/ext/fileinfo/tests/finfo_buffer_variation1.phpt +++ b/ext/fileinfo/tests/finfo_buffer_variation1.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_buffer() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : string finfo_buffer(resource finfo, char *string [, int options [, resource context]]) @@ -10,7 +10,7 @@ Test finfo_buffer() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $options = array( FILEINFO_NONE, diff --git a/ext/fileinfo/tests/finfo_close_basic.phpt b/ext/fileinfo/tests/finfo_close_basic.phpt index b307b23bef..33d508a7c3 100644 --- a/ext/fileinfo/tests/finfo_close_basic.phpt +++ b/ext/fileinfo/tests/finfo_close_basic.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_close() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : resource finfo_close(resource finfo) @@ -12,7 +12,7 @@ Test finfo_close() function : basic functionality echo "*** Testing finfo_close() : basic functionality ***\n"; -$magicFile = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $finfo = finfo_open( FILEINFO_MIME, $magicFile ); var_dump( $finfo ); diff --git a/ext/fileinfo/tests/finfo_close_error.phpt b/ext/fileinfo/tests/finfo_close_error.phpt index 374787aa55..7d865ea4fb 100644 --- a/ext/fileinfo/tests/finfo_close_error.phpt +++ b/ext/fileinfo/tests/finfo_close_error.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_close() function : error conditions --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : resource finfo_close(resource finfo) @@ -12,7 +12,7 @@ Test finfo_close() function : error conditions echo "*** Testing finfo_close() : error conditions ***\n"; -$magicFile = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $finfo = finfo_open( FILEINFO_MIME, $magicFile ); $fp = fopen( __FILE__, 'r' ); diff --git a/ext/fileinfo/tests/finfo_extension_flag.phpt b/ext/fileinfo/tests/finfo_extension_flag.phpt index 2348558298..8841fc005d 100644 --- a/ext/fileinfo/tests/finfo_extension_flag.phpt +++ b/ext/fileinfo/tests/finfo_extension_flag.phpt @@ -8,7 +8,7 @@ if (!class_exists('finfo')) <?php $f = new finfo; -var_dump($f->file(dirname(__FILE__) . "/resources/test.jpg", FILEINFO_EXTENSION)); +var_dump($f->file(__DIR__ . "/resources/test.jpg", FILEINFO_EXTENSION)); ?> ===DONE=== diff --git a/ext/fileinfo/tests/finfo_file_001.phpt b/ext/fileinfo/tests/finfo_file_001.phpt index 263230321a..4650ff1c16 100644 --- a/ext/fileinfo/tests/finfo_file_001.phpt +++ b/ext/fileinfo/tests/finfo_file_001.phpt @@ -1,7 +1,7 @@ --TEST-- finfo_file(): Testing file names --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/finfo_file_002.phpt b/ext/fileinfo/tests/finfo_file_002.phpt index 814a8065bc..683be5b676 100644 --- a/ext/fileinfo/tests/finfo_file_002.phpt +++ b/ext/fileinfo/tests/finfo_file_002.phpt @@ -1,7 +1,7 @@ --TEST-- finfo_file(): Testing mime types --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/finfo_file_basic.phpt b/ext/fileinfo/tests/finfo_file_basic.phpt index ab39dea070..53b2ed7509 100644 --- a/ext/fileinfo/tests/finfo_file_basic.phpt +++ b/ext/fileinfo/tests/finfo_file_basic.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_file() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : string finfo_file(resource finfo, char *file_name [, int options [, resource context]]) @@ -10,7 +10,7 @@ Test finfo_file() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $finfo = finfo_open( FILEINFO_MIME ); echo "*** Testing finfo_file() : basic functionality ***\n"; diff --git a/ext/fileinfo/tests/finfo_file_regex.phpt b/ext/fileinfo/tests/finfo_file_regex.phpt index c7e562a79f..100998c411 100644 --- a/ext/fileinfo/tests/finfo_file_regex.phpt +++ b/ext/fileinfo/tests/finfo_file_regex.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_file() function : regex rules --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php @@ -10,7 +10,7 @@ Test finfo_file() function : regex rules * $ file -m magic resources/test.awk * resources/test.awk: awk script, ASCII text */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $finfo = finfo_open( FILEINFO_MIME, $magicFile ); echo "*** Testing finfo_file() : regex rules ***\n"; diff --git a/ext/fileinfo/tests/finfo_file_stream_001.phpt b/ext/fileinfo/tests/finfo_file_stream_001.phpt index 3d371b71bd..76a8f9a043 100644 --- a/ext/fileinfo/tests/finfo_file_stream_001.phpt +++ b/ext/fileinfo/tests/finfo_file_stream_001.phpt @@ -1,7 +1,7 @@ --TEST-- finfo_file(): Files and directories inside an stream --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> <?php if (!extension_loaded('zip')) { die("skip zip extension not loaded"); } ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt index 17935c3676..6089776aa1 100644 --- a/ext/fileinfo/tests/finfo_open_001.phpt +++ b/ext/fileinfo/tests/finfo_open_001.phpt @@ -1,7 +1,7 @@ --TEST-- finfo_open(): Testing magic_file names --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/finfo_open_002.phpt b/ext/fileinfo/tests/finfo_open_002.phpt index 744773b550..e39d462147 100644 --- a/ext/fileinfo/tests/finfo_open_002.phpt +++ b/ext/fileinfo/tests/finfo_open_002.phpt @@ -1,7 +1,7 @@ --TEST-- FileInfo - Calling the constructor twice --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/finfo_open_basic.phpt b/ext/fileinfo/tests/finfo_open_basic.phpt index 887ffb09af..748f45d4c4 100644 --- a/ext/fileinfo/tests/finfo_open_basic.phpt +++ b/ext/fileinfo/tests/finfo_open_basic.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_open() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : resource finfo_open([int options [, string arg]]) @@ -10,7 +10,7 @@ Test finfo_open() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; echo "*** Testing finfo_open() : basic functionality ***\n"; diff --git a/ext/fileinfo/tests/finfo_open_error.phpt b/ext/fileinfo/tests/finfo_open_error.phpt index 15202e5799..b4fc57c18c 100644 --- a/ext/fileinfo/tests/finfo_open_error.phpt +++ b/ext/fileinfo/tests/finfo_open_error.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_open() function : error functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); +<?php require_once(__DIR__ . '/skipif.inc'); --FILE-- <?php /* Prototype : resource finfo_open([int options [, string arg]]) @@ -10,7 +10,7 @@ Test finfo_open() function : error functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; echo "*** Testing finfo_open() : error functionality ***\n"; diff --git a/ext/fileinfo/tests/finfo_open_variation1.phpt b/ext/fileinfo/tests/finfo_open_variation1.phpt index caa6e4abe7..d788e50b9e 100644 --- a/ext/fileinfo/tests/finfo_open_variation1.phpt +++ b/ext/fileinfo/tests/finfo_open_variation1.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_open() function : variations in opening --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : resource finfo_open([int options [, string arg]]) @@ -10,7 +10,7 @@ Test finfo_open() function : variations in opening * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; echo "*** Testing finfo_open() : variations in opening ***\n"; diff --git a/ext/fileinfo/tests/finfo_phpinfo_basic.phpt b/ext/fileinfo/tests/finfo_phpinfo_basic.phpt index ff65b36b3d..14746a8f04 100644 --- a/ext/fileinfo/tests/finfo_phpinfo_basic.phpt +++ b/ext/fileinfo/tests/finfo_phpinfo_basic.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo extension : loading into phpinfo() --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt index 615afd40f8..412fe5b7f3 100644 --- a/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt +++ b/ext/fileinfo/tests/finfo_set_flags_basic-mb.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_set_flags() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : bool finfo_set_flags(resource finfo, int options) @@ -10,7 +10,7 @@ Test finfo_set_flags() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます'; $finfo = finfo_open( FILEINFO_MIME, $magicFile ); echo "*** Testing finfo_set_flags() : basic functionality ***\n"; diff --git a/ext/fileinfo/tests/finfo_set_flags_basic.phpt b/ext/fileinfo/tests/finfo_set_flags_basic.phpt index 3b7168a684..cd7f16c67e 100644 --- a/ext/fileinfo/tests/finfo_set_flags_basic.phpt +++ b/ext/fileinfo/tests/finfo_set_flags_basic.phpt @@ -1,7 +1,7 @@ --TEST-- Test finfo_set_flags() function : basic functionality --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php /* Prototype : bool finfo_set_flags(resource finfo, int options) @@ -10,7 +10,7 @@ Test finfo_set_flags() function : basic functionality * Alias to functions: */ -$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic'; +$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic'; $finfo = finfo_open( FILEINFO_MIME, $magicFile ); echo "*** Testing finfo_set_flags() : basic functionality ***\n"; diff --git a/ext/fileinfo/tests/mime_content_type_001.phpt b/ext/fileinfo/tests/mime_content_type_001.phpt index 72dd201007..8d18cb43ac 100644 --- a/ext/fileinfo/tests/mime_content_type_001.phpt +++ b/ext/fileinfo/tests/mime_content_type_001.phpt @@ -1,7 +1,7 @@ --TEST-- mime_content_type(): Testing wrong parameters --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/fileinfo/tests/mime_content_type_002.phpt b/ext/fileinfo/tests/mime_content_type_002.phpt index 4022a67077..ba4072c25a 100644 --- a/ext/fileinfo/tests/mime_content_type_002.phpt +++ b/ext/fileinfo/tests/mime_content_type_002.phpt @@ -1,7 +1,7 @@ --TEST-- mime_content_type(): Testing parameter --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php require_once(__DIR__ . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/filter/tests/033.phpt b/ext/filter/tests/033.phpt index da7f390983..affb878dbb 100644 --- a/ext/filter/tests/033.phpt +++ b/ext/filter/tests/033.phpt @@ -7,7 +7,7 @@ precision=14 default_charset=UTF-8 --FILE-- <?php -include dirname(__FILE__) . '/033_run.inc'; +include __DIR__ . '/033_run.inc'; ?> --EXPECT-- int 1 123 diff --git a/ext/ftp/tests/ftp_fget_basic1.phpt b/ext/ftp/tests/ftp_fget_basic1.phpt index 5909d35cef..d104a3a0c5 100644 --- a/ext/ftp/tests/ftp_fget_basic1.phpt +++ b/ext/ftp/tests/ftp_fget_basic1.phpt @@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); ftp_set_option($ftp, FTP_AUTOSEEK, false); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt"; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt"; $handle = fopen($local_file, 'w'); var_dump(ftp_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME)); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt"); ?> --EXPECT-- bool(true) diff --git a/ext/ftp/tests/ftp_fget_basic2.phpt b/ext/ftp/tests/ftp_fget_basic2.phpt index 622cea3683..39a9ce8f0c 100644 --- a/ext/ftp/tests/ftp_fget_basic2.phpt +++ b/ext/ftp/tests/ftp_fget_basic2.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt"; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt"); ?> --EXPECT-- bool(true) diff --git a/ext/ftp/tests/ftp_fget_basic3.phpt b/ext/ftp/tests/ftp_fget_basic3.phpt index 9485473b1c..88119b61f7 100644 --- a/ext/ftp/tests/ftp_fget_basic3.phpt +++ b/ext/ftp/tests/ftp_fget_basic3.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt"; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt"); ?> --EXPECT-- bool(true) diff --git a/ext/ftp/tests/ftp_get_basic.phpt b/ext/ftp/tests/ftp_get_basic.phpt index 60f1b1de79..2c5f6f58a6 100644 --- a/ext/ftp/tests/ftp_get_basic.phpt +++ b/ext/ftp/tests/ftp_get_basic.phpt @@ -16,13 +16,13 @@ if (!$ftp) die("Couldn't connect to the server"); var_dump(ftp_login($ftp, 'user', 'pass')); //test simple text transfer -$tmpfname = tempnam(dirname(__FILE__), "ftp_test"); +$tmpfname = tempnam(__DIR__, "ftp_test"); var_dump(ftp_get($ftp, $tmpfname ,'a story.txt', FTP_ASCII)); echo file_get_contents($tmpfname); unlink($tmpfname); //test binary data transfer -$tmpfname = tempnam(dirname(__FILE__), "ftp_test"); +$tmpfname = tempnam(__DIR__, "ftp_test"); var_dump(ftp_get($ftp, $tmpfname, 'binary data.bin', FTP_BINARY)); var_dump(urlencode(file_get_contents($tmpfname))); unlink($tmpfname); diff --git a/ext/ftp/tests/ftp_nb_continue.phpt b/ext/ftp/tests/ftp_nb_continue.phpt index 1f70339913..1275897919 100644 --- a/ext/ftp/tests/ftp_nb_continue.phpt +++ b/ext/ftp/tests/ftp_nb_continue.phpt @@ -14,7 +14,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . $file; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . $file; touch($local_file); $r = ftp_nb_get($ftp, $local_file, $file, FTP_BINARY); @@ -27,7 +27,7 @@ echo file_get_contents($local_file); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "mediumfile.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "mediumfile.txt"); ?> --EXPECT-- This is line 0 of the test data. diff --git a/ext/ftp/tests/ftp_nb_fget_basic1.phpt b/ext/ftp/tests/ftp_nb_fget_basic1.phpt index 5e6389ff13..d5576f3710 100644 --- a/ext/ftp/tests/ftp_nb_fget_basic1.phpt +++ b/ext/ftp/tests/ftp_nb_fget_basic1.phpt @@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); ftp_set_option($ftp, FTP_AUTOSEEK, false); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt"; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt"; $handle = fopen($local_file, 'w'); var_dump(ftp_nb_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME)); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt"); ?> --EXPECT-- int(2) diff --git a/ext/ftp/tests/ftp_nb_fget_basic2.phpt b/ext/ftp/tests/ftp_nb_fget_basic2.phpt index 215b79ac4a..830e991c46 100644 --- a/ext/ftp/tests/ftp_nb_fget_basic2.phpt +++ b/ext/ftp/tests/ftp_nb_fget_basic2.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt"; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt"); ?> --EXPECT-- int(2) diff --git a/ext/ftp/tests/ftp_nb_fget_basic3.phpt b/ext/ftp/tests/ftp_nb_fget_basic3.phpt index 66daf2ba0a..d62eb43644 100644 --- a/ext/ftp/tests/ftp_nb_fget_basic3.phpt +++ b/ext/ftp/tests/ftp_nb_fget_basic3.phpt @@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt"; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt"; file_put_contents($local_file, 'ASCIIFoo'); $handle = fopen($local_file, 'a'); @@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file)); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt"); ?> --EXPECT-- int(2) diff --git a/ext/ftp/tests/ftp_nb_get_large.phpt b/ext/ftp/tests/ftp_nb_get_large.phpt index 4ac5fa37f1..8163677a4e 100644 --- a/ext/ftp/tests/ftp_nb_get_large.phpt +++ b/ext/ftp/tests/ftp_nb_get_large.phpt @@ -18,7 +18,7 @@ $ftp = ftp_connect('127.0.0.1', $port); ftp_login($ftp, 'user', 'pass'); if (!$ftp) die("Couldn't connect to the server"); -$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt"; +$local_file = __DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt"; touch($local_file); ftp_nb_get($ftp, $local_file, 'fget_large.txt', FTP_BINARY, 5368709119); $fp = fopen($local_file, 'r'); @@ -29,7 +29,7 @@ fclose($fp); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt"); +@unlink(__DIR__ . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt"); ?> --EXPECT-- string(1) "X" diff --git a/ext/gd/tests/001-mb.phpt b/ext/gd/tests/001-mb.phpt index 9307450f5b..8ee2e9a415 100644 --- a/ext/gd/tests/001-mb.phpt +++ b/ext/gd/tests/001-mb.phpt @@ -5,7 +5,7 @@ imagecreatefrompng() and empty/missing file --FILE-- <?php -$file = dirname(__FILE__)."/001私はガラスを食べられます.test"; +$file = __DIR__."/001私はガラスを食べられます.test"; @unlink($file); var_dump(imagecreatefrompng($file)); diff --git a/ext/gd/tests/001.phpt b/ext/gd/tests/001.phpt index 039511a558..b820ac1cc0 100644 --- a/ext/gd/tests/001.phpt +++ b/ext/gd/tests/001.phpt @@ -5,7 +5,7 @@ imagecreatefrompng() and empty/missing file --FILE-- <?php -$file = dirname(__FILE__)."/001.test"; +$file = __DIR__."/001.test"; @unlink($file); var_dump(imagecreatefrompng($file)); diff --git a/ext/gd/tests/bug36697-mb.phpt b/ext/gd/tests/bug36697-mb.phpt index b0b69a394f..371c8e48be 100644 --- a/ext/gd/tests/bug36697-mb.phpt +++ b/ext/gd/tests/bug36697-mb.phpt @@ -8,7 +8,7 @@ Bug #36697 (TrueColor transparency with GIF palette output). ?> --FILE-- <?php -$dest = dirname(__FILE__) . "/36697私はガラスを食べられます.gif"; +$dest = __DIR__ . "/36697私はガラスを食べられます.gif"; $im = imagecreatetruecolor(192, 36); $trans_color = imagecolorallocate($im, 255, 0, 0); diff --git a/ext/gd/tests/bug36697.phpt b/ext/gd/tests/bug36697.phpt index 9335e5f58d..262b881ca0 100644 --- a/ext/gd/tests/bug36697.phpt +++ b/ext/gd/tests/bug36697.phpt @@ -8,7 +8,7 @@ Bug #36697 (TrueColor transparency with GIF palette output). ?> --FILE-- <?php -$dest = dirname(__FILE__) . "/36697.gif"; +$dest = __DIR__ . "/36697.gif"; $im = imagecreatetruecolor(192, 36); $trans_color = imagecolorallocate($im, 255, 0, 0); diff --git a/ext/gd/tests/bug37346-mb.phpt b/ext/gd/tests/bug37346-mb.phpt index 90efc6391b..4ec5734fc7 100644 --- a/ext/gd/tests/bug37346-mb.phpt +++ b/ext/gd/tests/bug37346-mb.phpt @@ -6,7 +6,7 @@ Bug #37346 (gdimagecreatefromgif, bad colormap) ?> --FILE-- <?php -$im = imagecreatefromgif(dirname(__FILE__) . '/bug37346私はガラスを食べられます.gif'); +$im = imagecreatefromgif(__DIR__ . '/bug37346私はガラスを食べられます.gif'); ?> --EXPECTF-- Warning: imagecreatefromgif(): '%sbug37346私はガラスを食べられます.gif' is not a valid GIF file in %sbug37346-mb.php on line %d diff --git a/ext/gd/tests/bug37346.phpt b/ext/gd/tests/bug37346.phpt index 36d9c0a04a..57701a7ad7 100644 --- a/ext/gd/tests/bug37346.phpt +++ b/ext/gd/tests/bug37346.phpt @@ -6,7 +6,7 @@ Bug #37346 (gdimagecreatefromgif, bad colormap) ?> --FILE-- <?php -$im = imagecreatefromgif(dirname(__FILE__) . '/bug37346.gif'); +$im = imagecreatefromgif(__DIR__ . '/bug37346.gif'); ?> --EXPECTF-- Warning: imagecreatefromgif(): '%sbug37346.gif' is not a valid GIF file in %sbug37346.php on line %d diff --git a/ext/gd/tests/bug37360.phpt b/ext/gd/tests/bug37360.phpt index 44bbd96b88..c2b8b9592d 100644 --- a/ext/gd/tests/bug37360.phpt +++ b/ext/gd/tests/bug37360.phpt @@ -6,7 +6,7 @@ Bug #37360 (gdimagecreatefromgif, bad image sizes) ?> --FILE-- <?php -$im = imagecreatefromgif(dirname(__FILE__) . '/bug37360.gif'); +$im = imagecreatefromgif(__DIR__ . '/bug37360.gif'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/bug38112.phpt b/ext/gd/tests/bug38112.phpt index 0e4b8afd3f..8a6911ad9d 100644 --- a/ext/gd/tests/bug38112.phpt +++ b/ext/gd/tests/bug38112.phpt @@ -8,7 +8,7 @@ Bug #38112 (GIF Invalid Code size ). ?> --FILE-- <?php -$im = imagecreatefromgif(dirname(__FILE__) . '/bug38112.gif'); +$im = imagecreatefromgif(__DIR__ . '/bug38112.gif'); ?> --EXPECTF-- Warning: imagecreatefromgif(): '%sbug38112.gif' is not a valid GIF file in %sbug38112.php on line %d diff --git a/ext/gd/tests/bug38212-mb.phpt b/ext/gd/tests/bug38212-mb.phpt index 266e470de0..a7a3d65f13 100644 --- a/ext/gd/tests/bug38212-mb.phpt +++ b/ext/gd/tests/bug38212-mb.phpt @@ -6,7 +6,7 @@ Bug #38212 (Seg Fault on invalid imagecreatefromgd2part() parameters) ?> --FILE-- <?php -$file = dirname(__FILE__) . '/bug38212私はガラスを食べられます.gd2'; +$file = __DIR__ . '/bug38212私はガラスを食べられます.gd2'; $im1 = imagecreatetruecolor(10,100); imagefill($im1, 0,0, 0xffffff); imagegd2($im1, $file); diff --git a/ext/gd/tests/bug38212.phpt b/ext/gd/tests/bug38212.phpt index 1459bb000d..039c6f971b 100644 --- a/ext/gd/tests/bug38212.phpt +++ b/ext/gd/tests/bug38212.phpt @@ -6,7 +6,7 @@ Bug #38212 (Seg Fault on invalid imagecreatefromgd2part() parameters) ?> --FILE-- <?php -$file = dirname(__FILE__) . '/bug38212.gd2'; +$file = __DIR__ . '/bug38212.gd2'; $im1 = imagecreatetruecolor(10,100); imagefill($im1, 0,0, 0xffffff); imagegd2($im1, $file); diff --git a/ext/gd/tests/bug39780.phpt b/ext/gd/tests/bug39780.phpt index 7bf9f56cb0..2a7af3e0f4 100644 --- a/ext/gd/tests/bug39780.phpt +++ b/ext/gd/tests/bug39780.phpt @@ -8,7 +8,7 @@ Bug #39780 (PNG image with CRC/data error raises a fatal error) --FILE-- <?php -$im = imagecreatefrompng(dirname(__FILE__) . '/bug39780.png'); +$im = imagecreatefrompng(__DIR__ . '/bug39780.png'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/bug39780_extern.phpt b/ext/gd/tests/bug39780_extern.phpt index 65c3859c6a..0656e52fc7 100644 --- a/ext/gd/tests/bug39780_extern.phpt +++ b/ext/gd/tests/bug39780_extern.phpt @@ -8,7 +8,7 @@ Bug #39780 (PNG image with CRC/data error raises a fatal error) --FILE-- <?php -$im = imagecreatefrompng(dirname(__FILE__) . '/bug39780.png'); +$im = imagecreatefrompng(__DIR__ . '/bug39780.png'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/bug41442.phpt b/ext/gd/tests/bug41442.phpt index ba5950dd15..5c590deb77 100644 --- a/ext/gd/tests/bug41442.phpt +++ b/ext/gd/tests/bug41442.phpt @@ -12,7 +12,7 @@ Bug #41442 (imagegd2() under output control) --FILE-- <?php -$str = file_get_contents(dirname(__FILE__).'/src.gd2'); +$str = file_get_contents(__DIR__.'/src.gd2'); $res = imagecreatefromstring($str); /* string */ @@ -22,7 +22,7 @@ $str2 = ob_get_clean(); var_dump(imagecreatefromstring($str2)); /* file */ -$file = dirname(__FILE__)."/bug41442.gd2"; +$file = __DIR__."/bug41442.gd2"; imagegd2($res, $file); $str2 = file_get_contents($file); var_dump(imagecreatefromstring($str2)); diff --git a/ext/gd/tests/bug43073.phpt b/ext/gd/tests/bug43073.phpt index 8b58e511cc..a8027338ef 100644 --- a/ext/gd/tests/bug43073.phpt +++ b/ext/gd/tests/bug43073.phpt @@ -25,7 +25,7 @@ $exp = [ [470,470, 548,549, 566,532, 488,453], [492,439, 595,481, 604,458, 502,416] ]; -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy.ttf"; $delta_t = 360.0 / 16; # Make 16 steps around $g = imagecreate(800, 800); @@ -55,7 +55,7 @@ for ($angle = 0.0, $i = 0; $angle < 360.0; $angle += $delta_t, $i++) { imagepng($g, "$cwd/bug43073.png"); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug43073.png'); ?> +<?php @unlink(__DIR__ . '/bug43073.png'); ?> --EXPECT-- 0: ........ 1: ........ diff --git a/ext/gd/tests/bug43121.phpt b/ext/gd/tests/bug43121.phpt index 08348d0012..1c3a7e5bc7 100644 --- a/ext/gd/tests/bug43121.phpt +++ b/ext/gd/tests/bug43121.phpt @@ -12,7 +12,7 @@ Bug #43121 (gdImageFill with IMG_COLOR_TILED crashes httpd) $im = ImageCreate( 200, 100 ); $black = ImageColorAllocate( $im, 0, 0, 0 ); -$im_tile = ImageCreateFromGif(dirname(__FILE__) . "/bug43121.gif" ); +$im_tile = ImageCreateFromGif(__DIR__ . "/bug43121.gif" ); ImageSetTile( $im, $im_tile ); ImageFill( $im, 0, 0, IMG_COLOR_TILED ); diff --git a/ext/gd/tests/bug48555.phpt b/ext/gd/tests/bug48555.phpt index 43e14db05f..03ee5a2b94 100644 --- a/ext/gd/tests/bug48555.phpt +++ b/ext/gd/tests/bug48555.phpt @@ -7,7 +7,7 @@ Bug #48555 (ImageFTBBox() differs from previous versions for texts with new line ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy.ttf"; $box = ImageFTBBox(14, 0, $font, "Text without line-break"); //echo 'Top without line-break: ' . $box[7] . "\n"; diff --git a/ext/gd/tests/bug48732-mb.phpt b/ext/gd/tests/bug48732-mb.phpt index 8e937bfe8e..437731bb4b 100644 --- a/ext/gd/tests/bug48732-mb.phpt +++ b/ext/gd/tests/bug48732-mb.phpt @@ -8,7 +8,7 @@ Bug #48732 (TTF Bounding box wrong for letters below baseline) ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy私はガラスを食べられます.ttf"; $g = imagecreate(100, 50); $bgnd = imagecolorallocate($g, 255, 255, 255); @@ -18,6 +18,6 @@ imagepng($g, "$cwd/bug48732私はガラスを食べられます.png"); echo 'Left Bottom: (' . $bbox[0] . ', ' . $bbox[1] . ')'; ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48732私はガラスを食べられます.png'); ?> +<?php @unlink(__DIR__ . '/bug48732私はガラスを食べられます.png'); ?> --EXPECT-- Left Bottom: (0, 46) diff --git a/ext/gd/tests/bug48732.phpt b/ext/gd/tests/bug48732.phpt index 5e77e06103..b2be6a47f1 100644 --- a/ext/gd/tests/bug48732.phpt +++ b/ext/gd/tests/bug48732.phpt @@ -7,7 +7,7 @@ Bug #48732 (TTF Bounding box wrong for letters below baseline) ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy.ttf"; $g = imagecreate(100, 50); $bgnd = imagecolorallocate($g, 255, 255, 255); @@ -17,6 +17,6 @@ imagepng($g, "$cwd/bug48732.png"); echo 'Left Bottom: (' . $bbox[0] . ', ' . $bbox[1] . ')'; ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48732.png'); ?> +<?php @unlink(__DIR__ . '/bug48732.png'); ?> --EXPECT-- Left Bottom: (0, 46) diff --git a/ext/gd/tests/bug48801-mb.phpt b/ext/gd/tests/bug48801-mb.phpt index a2f6d28a82..1793ac3386 100644 --- a/ext/gd/tests/bug48801-mb.phpt +++ b/ext/gd/tests/bug48801-mb.phpt @@ -8,7 +8,7 @@ Bug #48801 (Problem with imagettfbbox) ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy私はガラスを食べられます.ttf"; $bbox = imageftbbox(50, 0, $font, "image"); echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n"; diff --git a/ext/gd/tests/bug48801.phpt b/ext/gd/tests/bug48801.phpt index f55ed55844..b5e32af480 100644 --- a/ext/gd/tests/bug48801.phpt +++ b/ext/gd/tests/bug48801.phpt @@ -7,7 +7,7 @@ Bug #48801 (Problem with imagettfbbox) ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy.ttf"; $bbox = imageftbbox(50, 0, $font, "image"); echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n"; diff --git a/ext/gd/tests/bug49600.phpt b/ext/gd/tests/bug49600.phpt index 1fb84f28bd..25fae3ca37 100644 --- a/ext/gd/tests/bug49600.phpt +++ b/ext/gd/tests/bug49600.phpt @@ -8,7 +8,7 @@ Bug #49600 (imageTTFText text shifted right) ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy.ttf"; $image = imagecreatetruecolor(50, 50); $color = imagecolorallocate($image, 255, 255, 255); diff --git a/ext/gd/tests/bug51263.phpt b/ext/gd/tests/bug51263.phpt index 69496e011b..6f14cd3c98 100644 --- a/ext/gd/tests/bug51263.phpt +++ b/ext/gd/tests/bug51263.phpt @@ -7,7 +7,7 @@ Bug #51263 (imagettftext and rotated text uses wrong baseline) ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $ttf = "$cwd/Tuffy.ttf"; $w = 23; $h = 70; diff --git a/ext/gd/tests/bug53504.phpt b/ext/gd/tests/bug53504.phpt index bb6cc7a93f..3b2ce4c7eb 100644 --- a/ext/gd/tests/bug53504.phpt +++ b/ext/gd/tests/bug53504.phpt @@ -7,7 +7,7 @@ Bug #53504 imagettfbbox/imageftbbox gives incorrect values for bounding box ?> --FILE-- <?php -$cwd = dirname(__FILE__); +$cwd = __DIR__; $font = "$cwd/Tuffy.ttf"; $g = imagecreate(800, 800); @@ -84,7 +84,7 @@ foreach ($tests as $testnum => $test) { imagepng($g, "$cwd/bug53504.png"); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug53504.png'); ?> +<?php @unlink(__DIR__ . '/bug53504.png'); ?> --EXPECT-- 0: ........ 1: ........ diff --git a/ext/gd/tests/bug72339.phpt b/ext/gd/tests/bug72339.phpt index eac5b630b2..d63ce67c55 100644 --- a/ext/gd/tests/bug72339.phpt +++ b/ext/gd/tests/bug72339.phpt @@ -9,7 +9,7 @@ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) { ?> --FILE-- <?php -$fname = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug72339.gd"; +$fname = __DIR__ . DIRECTORY_SEPARATOR . "bug72339.gd"; $fh = fopen($fname, "w"); fwrite($fh, "gd2\x00"); diff --git a/ext/gd/tests/colorat.phpt b/ext/gd/tests/colorat.phpt index be14873886..e8c1a5fb46 100644 --- a/ext/gd/tests/colorat.phpt +++ b/ext/gd/tests/colorat.phpt @@ -6,7 +6,7 @@ imagecolorat ?> --FILE-- <?php -$file = dirname(__FILE__) . '/im.wbmp'; +$file = __DIR__ . '/im.wbmp'; $im = imagecreatetruecolor(6,6); imagefill($im, 0,0, 0xffffff); diff --git a/ext/gd/tests/crafted_gd2.phpt b/ext/gd/tests/crafted_gd2.phpt index 3fb7c2e004..60687dfa3c 100644 --- a/ext/gd/tests/crafted_gd2.phpt +++ b/ext/gd/tests/crafted_gd2.phpt @@ -8,7 +8,7 @@ Test max colors for a gd image. ?> --FILE-- <?php -imagecreatefromgd(dirname(__FILE__) . '/crafted.gd2'); +imagecreatefromgd(__DIR__ . '/crafted.gd2'); ?> --EXPECTF-- Warning: imagecreatefromgd(): '%scrafted.gd2' is not a valid GD file in %s on line %d diff --git a/ext/gd/tests/createfromgd2.phpt b/ext/gd/tests/createfromgd2.phpt index e43d1b865b..d6229d4f7e 100644 --- a/ext/gd/tests/createfromgd2.phpt +++ b/ext/gd/tests/createfromgd2.phpt @@ -6,7 +6,7 @@ imagecreatefromgd2 ?> --FILE-- <?php -$file = dirname(__FILE__) . '/src.gd2'; +$file = __DIR__ . '/src.gd2'; $im2 = imagecreatefromgd2($file); echo 'test create from gd2: '; diff --git a/ext/gd/tests/createfromstring.phpt b/ext/gd/tests/createfromstring.phpt index 7828725db5..6a4b1a7e11 100644 --- a/ext/gd/tests/createfromstring.phpt +++ b/ext/gd/tests/createfromstring.phpt @@ -7,14 +7,14 @@ imagecreatefromstring ?> --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $im = imagecreatetruecolor(5,5); imagefill($im, 0,0, 0xffffff); imagesetpixel($im, 3,3, 0x0); imagepng($im, $dir . '/tc.png'); -$im_string = file_get_contents(dirname(__FILE__) . '/tc.png'); +$im_string = file_get_contents(__DIR__ . '/tc.png'); $im = imagecreatefromstring($im_string); echo 'createfromstring truecolor png: '; if (imagecolorat($im, 3,3) != 0x0) { @@ -34,7 +34,7 @@ imagefill($im, 0,0, $c1); imagesetpixel($im, 3,3, $c2); imagepng($im, $dir . '/p.png'); -$im_string = file_get_contents(dirname(__FILE__) . '/p.png'); +$im_string = file_get_contents(__DIR__ . '/p.png'); $im = imagecreatefromstring($im_string); echo'createfromstring palette png: '; diff --git a/ext/gd/tests/createfromwbmp-mb.phpt b/ext/gd/tests/createfromwbmp-mb.phpt index 50e8a18780..f9dc9fe8bf 100644 --- a/ext/gd/tests/createfromwbmp-mb.phpt +++ b/ext/gd/tests/createfromwbmp-mb.phpt @@ -6,7 +6,7 @@ imagecreatefromwbmp ?> --FILE-- <?php -$file = dirname(__FILE__) . '/src私はガラスを食べられます.wbmp'; +$file = __DIR__ . '/src私はガラスを食べられます.wbmp'; $im2 = imagecreatefromwbmp($file); echo 'test create from wbmp: '; diff --git a/ext/gd/tests/createfromwbmp.phpt b/ext/gd/tests/createfromwbmp.phpt index 589bbaf855..d58188b801 100644 --- a/ext/gd/tests/createfromwbmp.phpt +++ b/ext/gd/tests/createfromwbmp.phpt @@ -6,7 +6,7 @@ imagecreatefromwbmp ?> --FILE-- <?php -$file = dirname(__FILE__) . '/src.wbmp'; +$file = __DIR__ . '/src.wbmp'; $im2 = imagecreatefromwbmp($file); echo 'test create from wbmp: '; diff --git a/ext/gd/tests/createfromwbmp2.phpt b/ext/gd/tests/createfromwbmp2.phpt index bbb475c423..e083b74c19 100644 --- a/ext/gd/tests/createfromwbmp2.phpt +++ b/ext/gd/tests/createfromwbmp2.phpt @@ -7,7 +7,7 @@ imagecreatefromwbmp with invalid wbmp ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/_tmp.wbmp'; +$filename = __DIR__ . '/_tmp.wbmp'; $fp = fopen($filename,"wb"); if (!$fp) { exit("Failed to create <$filename>"); diff --git a/ext/gd/tests/createfromwbmp2_extern.phpt b/ext/gd/tests/createfromwbmp2_extern.phpt index 7be46f78f1..ed739461c4 100644 --- a/ext/gd/tests/createfromwbmp2_extern.phpt +++ b/ext/gd/tests/createfromwbmp2_extern.phpt @@ -7,7 +7,7 @@ imagecreatefromwbmp with invalid wbmp ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/_tmp.wbmp'; +$filename = __DIR__ . '/_tmp.wbmp'; $fp = fopen($filename,"wb"); if (!$fp) { exit("Failed to create <$filename>"); diff --git a/ext/gd/tests/gif.phpt b/ext/gd/tests/gif.phpt index a28fadf9a8..218ef50fa4 100644 --- a/ext/gd/tests/gif.phpt +++ b/ext/gd/tests/gif.phpt @@ -13,7 +13,7 @@ gif in/out <?php function check_box($r,$g,$b, $error=0) { - $cwd = dirname(__FILE__); + $cwd = __DIR__; $im2 = imagecreatefromgif($cwd . '/test_gif.gif'); $c = imagecolorsforindex($im2, imagecolorat($im2, 8,8)); @@ -42,7 +42,7 @@ function check_box($r,$g,$b, $error=0) { } } } -$cwd = dirname(__FILE__); +$cwd = __DIR__; $im = imagecreate(10,10); $c = imagecolorallocate($im, 255,255,255); diff --git a/ext/gd/tests/gif2gd.phpt b/ext/gd/tests/gif2gd.phpt index 54a9601fb5..3fe9397fb6 100644 --- a/ext/gd/tests/gif2gd.phpt +++ b/ext/gd/tests/gif2gd.phpt @@ -12,7 +12,7 @@ gif --> gd1/gd2 conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "GIF to GD1 conversion: "; echo imagegd(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.gd1") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/gif2jpg.phpt b/ext/gd/tests/gif2jpg.phpt index 5f32c35960..38d8963271 100644 --- a/ext/gd/tests/gif2jpg.phpt +++ b/ext/gd/tests/gif2jpg.phpt @@ -15,7 +15,7 @@ gif --> jpeg conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "GIF to JPEG conversion: "; echo imagejpeg(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.jpeg") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/gif2png.phpt b/ext/gd/tests/gif2png.phpt index 3b8beca249..27aac9cdd8 100644 --- a/ext/gd/tests/gif2png.phpt +++ b/ext/gd/tests/gif2png.phpt @@ -15,7 +15,7 @@ gif --> png conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "GIF to PNG conversion: "; echo imagepng(imagecreatefromgif($cwd . "/conv_test.gif"), $cwd . "/test_gif.png") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/imagecolorstotal_basic.phpt b/ext/gd/tests/imagecolorstotal_basic.phpt index 9ae79d2224..22eb022fc2 100644 --- a/ext/gd/tests/imagecolorstotal_basic.phpt +++ b/ext/gd/tests/imagecolorstotal_basic.phpt @@ -20,7 +20,7 @@ if(!function_exists('imagecolorstotal') || !function_exists('imagecreatefromgif' echo "*** Testing imagecolorstotal() : basic functionality ***\n"; // Get an image -$gif = dirname(__FILE__)."/php.gif"; +$gif = __DIR__."/php.gif"; $im = imagecreatefromgif($gif); echo 'Total colors in image: ' . imagecolorstotal($im); diff --git a/ext/gd/tests/imagefilter.phpt b/ext/gd/tests/imagefilter.phpt index 04a2395b8b..87efb1591e 100644 --- a/ext/gd/tests/imagefilter.phpt +++ b/ext/gd/tests/imagefilter.phpt @@ -19,7 +19,7 @@ $no_arg_filters = array( "IMG_FILTER_MEAN_REMOVAL" ); -$SAVE_DIR = dirname(__FILE__); +$SAVE_DIR = __DIR__; $SOURCE_IMG = $SAVE_DIR . "/test.png"; foreach ($no_arg_filters as $filt) { diff --git a/ext/gd/tests/imagefttext.phpt b/ext/gd/tests/imagefttext.phpt index 2a516cb6c5..85bca4d545 100644 --- a/ext/gd/tests/imagefttext.phpt +++ b/ext/gd/tests/imagefttext.phpt @@ -11,7 +11,7 @@ imagefttext() function test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; $fontfile_8859 = "$cwd/test8859.ttf"; function testrun($im, $fontfile) { diff --git a/ext/gd/tests/imageloadfont_end_of_file_while_reading_header.phpt b/ext/gd/tests/imageloadfont_end_of_file_while_reading_header.phpt index ef13bb179d..18f806d5b0 100644 --- a/ext/gd/tests/imageloadfont_end_of_file_while_reading_header.phpt +++ b/ext/gd/tests/imageloadfont_end_of_file_while_reading_header.phpt @@ -9,7 +9,7 @@ if (!extension_loaded('gd')) die("skip gd extension not available\n"); ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/font.gdf'; +$filename = __DIR__ . '/font.gdf'; // End of file while reading header $bin = "\x41\x41\x41\x41\x00\x00\x00\x00\x00\x00"; diff --git a/ext/gd/tests/imageloadfont_invalid.phpt b/ext/gd/tests/imageloadfont_invalid.phpt index 5246a0713d..ed9d9e3a30 100644 --- a/ext/gd/tests/imageloadfont_invalid.phpt +++ b/ext/gd/tests/imageloadfont_invalid.phpt @@ -6,7 +6,7 @@ imageloadfont() function crashes ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/font.gdf'; +$filename = __DIR__ . '/font.gdf'; $bin = "\x41\x41\x41\x41\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00"; $fp = fopen($filename, 'wb'); fwrite($fp, $bin); diff --git a/ext/gd/tests/imagewbmp-mb.phpt b/ext/gd/tests/imagewbmp-mb.phpt index bb6cfdc655..fefbb066c7 100644 --- a/ext/gd/tests/imagewbmp-mb.phpt +++ b/ext/gd/tests/imagewbmp-mb.phpt @@ -6,7 +6,7 @@ imagewbmp ?> --FILE-- <?php -$file = dirname(__FILE__) . '/im私はガラスを食べられます.wbmp'; +$file = __DIR__ . '/im私はガラスを食べられます.wbmp'; $im = imagecreatetruecolor(6,6); imagefill($im, 0,0, 0xffffff); diff --git a/ext/gd/tests/imagewbmp.phpt b/ext/gd/tests/imagewbmp.phpt index a10dbdb5f7..27491bb42e 100644 --- a/ext/gd/tests/imagewbmp.phpt +++ b/ext/gd/tests/imagewbmp.phpt @@ -6,7 +6,7 @@ imagewbmp ?> --FILE-- <?php -$file = dirname(__FILE__) . '/im.wbmp'; +$file = __DIR__ . '/im.wbmp'; $im = imagecreatetruecolor(6,6); imagefill($im, 0,0, 0xffffff); diff --git a/ext/gd/tests/jpeg2png.phpt b/ext/gd/tests/jpeg2png.phpt index 0a170eeeed..6e136514a8 100644 --- a/ext/gd/tests/jpeg2png.phpt +++ b/ext/gd/tests/jpeg2png.phpt @@ -15,7 +15,7 @@ jpeg <--> png conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "PNG to JPEG conversion: "; echo imagejpeg(imagecreatefrompng($cwd . "/conv_test.png"), $cwd . "/test_jpeg.jpeg") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/jpeg2wbmp_error1.phpt b/ext/gd/tests/jpeg2wbmp_error1.phpt index fcdef0bcb1..e8e0a7cf2e 100644 --- a/ext/gd/tests/jpeg2wbmp_error1.phpt +++ b/ext/gd/tests/jpeg2wbmp_error1.phpt @@ -19,8 +19,8 @@ $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 255, 255, 255); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); -$file = dirname(__FILE__) .'/simpletext.jpg'; -$file2 = dirname(__FILE__) .'/simpletext.wbmp'; +$file = __DIR__ .'/simpletext.jpg'; +$file2 = __DIR__ .'/simpletext.wbmp'; // Save the image as 'simpletext.jpg' imagejpeg($im, $file); @@ -41,6 +41,6 @@ Deprecated: Function jpeg2wbmp() is deprecated in %s on line %d Warning: jpeg2wbmp(): Invalid threshold value '-1' in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext.jpg'); -unlink(dirname(__FILE__) .'/simpletext.wbmp'); +unlink(__DIR__ .'/simpletext.jpg'); +unlink(__DIR__ .'/simpletext.wbmp'); ?> diff --git a/ext/gd/tests/jpeg2wbmp_error2-mb.phpt b/ext/gd/tests/jpeg2wbmp_error2-mb.phpt index 4eeac126a4..6c4019a935 100644 --- a/ext/gd/tests/jpeg2wbmp_error2-mb.phpt +++ b/ext/gd/tests/jpeg2wbmp_error2-mb.phpt @@ -14,7 +14,7 @@ if(!function_exists('jpeg2wbmp')) { ?> --FILE-- <?php -$file = dirname(__FILE__) .'/simpletext私はガラスを食べられます.wbmp'; +$file = __DIR__ .'/simpletext私はガラスを食べられます.wbmp'; jpeg2wbmp('', $file, 20, 120, 8); jpeg2wbmp(null, $file, 20, 120, 8); jpeg2wbmp(false, $file, 20, 120, 8); @@ -33,5 +33,5 @@ Deprecated: Function jpeg2wbmp() is deprecated in %s on line %d Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext私はガラスを食べられます.wbmp'); +unlink(__DIR__ .'/simpletext私はガラスを食べられます.wbmp'); ?> diff --git a/ext/gd/tests/jpeg2wbmp_error2.phpt b/ext/gd/tests/jpeg2wbmp_error2.phpt index 405eb83129..7ddc151d78 100644 --- a/ext/gd/tests/jpeg2wbmp_error2.phpt +++ b/ext/gd/tests/jpeg2wbmp_error2.phpt @@ -14,7 +14,7 @@ if(!function_exists('jpeg2wbmp')) { ?> --FILE-- <?php -$file = dirname(__FILE__) .'/simpletext.wbmp'; +$file = __DIR__ .'/simpletext.wbmp'; jpeg2wbmp('', $file, 20, 120, 8); jpeg2wbmp(null, $file, 20, 120, 8); jpeg2wbmp(false, $file, 20, 120, 8); @@ -33,5 +33,5 @@ Deprecated: Function jpeg2wbmp() is deprecated in %s on line %d Warning: jpeg2wbmp(): Unable to open '' for reading in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext.wbmp'); +unlink(__DIR__ .'/simpletext.wbmp'); ?> diff --git a/ext/gd/tests/jpeg2wbmp_error3.phpt b/ext/gd/tests/jpeg2wbmp_error3.phpt index 2662b7a86b..1d4c82b06e 100644 --- a/ext/gd/tests/jpeg2wbmp_error3.phpt +++ b/ext/gd/tests/jpeg2wbmp_error3.phpt @@ -19,7 +19,7 @@ $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 255, 255, 255); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); -$file = dirname(__FILE__) .'/simpletext.jpg'; +$file = __DIR__ .'/simpletext.jpg'; // Save the image as 'simpletext.jpg' imagejpeg($im, $file); @@ -45,5 +45,5 @@ Deprecated: Function jpeg2wbmp() is deprecated in %s on line %d Warning: jpeg2wbmp(): Unable to open '' for writing in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext.jpg'); +unlink(__DIR__ .'/simpletext.jpg'); ?> diff --git a/ext/gd/tests/jpg2gd-mb.phpt b/ext/gd/tests/jpg2gd-mb.phpt index 8dee6b3bd5..85959b4271 100644 --- a/ext/gd/tests/jpg2gd-mb.phpt +++ b/ext/gd/tests/jpg2gd-mb.phpt @@ -12,7 +12,7 @@ jpeg <--> gd1/gd2 conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "JPEG to GD1 conversion: "; echo imagegd(imagecreatefromjpeg($cwd . "/conv_test私はガラスを食べられます.jpeg"), $cwd . "/test私はガラスを食べられます.gd1") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/jpg2gd.phpt b/ext/gd/tests/jpg2gd.phpt index c68bddd1a8..672a392df0 100644 --- a/ext/gd/tests/jpg2gd.phpt +++ b/ext/gd/tests/jpg2gd.phpt @@ -12,7 +12,7 @@ jpeg <--> gd1/gd2 conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "JPEG to GD1 conversion: "; echo imagegd(imagecreatefromjpeg($cwd . "/conv_test.jpeg"), $cwd . "/test_jpeg.gd1") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/libgd00086.phpt b/ext/gd/tests/libgd00086.phpt index 7756b34d5a..c7954a0a00 100644 --- a/ext/gd/tests/libgd00086.phpt +++ b/ext/gd/tests/libgd00086.phpt @@ -8,7 +8,7 @@ libgd #86 (Possible infinite loop in imagecreatefrompng) --FILE-- <?php -$im = imagecreatefrompng(dirname(__FILE__) . '/libgd00086.png'); +$im = imagecreatefrompng(__DIR__ . '/libgd00086.png'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/libgd00086_extern.phpt b/ext/gd/tests/libgd00086_extern.phpt index 0c8d18092e..36b79b4835 100644 --- a/ext/gd/tests/libgd00086_extern.phpt +++ b/ext/gd/tests/libgd00086_extern.phpt @@ -8,7 +8,7 @@ libgd #86 (Possible infinite loop in imagecreatefrompng) --FILE-- <?php -$im = imagecreatefrompng(dirname(__FILE__) . '/libgd00086.png'); +$im = imagecreatefrompng(__DIR__ . '/libgd00086.png'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/libgd00094-mb.phpt b/ext/gd/tests/libgd00094-mb.phpt index 8a14ceba1e..76b6bcd566 100644 --- a/ext/gd/tests/libgd00094-mb.phpt +++ b/ext/gd/tests/libgd00094-mb.phpt @@ -7,7 +7,7 @@ libgd #94 (imagecreatefromxbm can crash if gdImageCreate fails) ?> --FILE-- <?php -$im = imagecreatefromxbm(dirname(__FILE__) . '/libgd00094私はガラスを食べられます.xbm'); +$im = imagecreatefromxbm(__DIR__ . '/libgd00094私はガラスを食べられます.xbm'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/libgd00094.phpt b/ext/gd/tests/libgd00094.phpt index f658fc64cf..17c4df70d5 100644 --- a/ext/gd/tests/libgd00094.phpt +++ b/ext/gd/tests/libgd00094.phpt @@ -7,7 +7,7 @@ libgd #94 (imagecreatefromxbm can crash if gdImageCreate fails) ?> --FILE-- <?php -$im = imagecreatefromxbm(dirname(__FILE__) . '/libgd00094.xbm'); +$im = imagecreatefromxbm(__DIR__ . '/libgd00094.xbm'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/libgd00101.phpt b/ext/gd/tests/libgd00101.phpt index 4154012fbd..dbb1886171 100644 --- a/ext/gd/tests/libgd00101.phpt +++ b/ext/gd/tests/libgd00101.phpt @@ -7,7 +7,7 @@ libgd #101 (imagecreatefromgd can crash if gdImageCreate fails) ?> --FILE-- <?php -$im = imagecreatefromgd(dirname(__FILE__) . '/libgd00101.gd'); +$im = imagecreatefromgd(__DIR__ . '/libgd00101.gd'); var_dump($im); ?> --EXPECTF-- diff --git a/ext/gd/tests/png2gd.phpt b/ext/gd/tests/png2gd.phpt index 07148a9ab3..ea70298292 100644 --- a/ext/gd/tests/png2gd.phpt +++ b/ext/gd/tests/png2gd.phpt @@ -12,7 +12,7 @@ png <--> gd1/gd2 conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "PNG to GD1 conversion: "; echo imagegd(imagecreatefrompng($cwd . "/conv_test.png"), $cwd . "/test_png.gd1") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/png2wbmp_error1-mb.phpt b/ext/gd/tests/png2wbmp_error1-mb.phpt index 8c779d36d9..ac0753fb6c 100644 --- a/ext/gd/tests/png2wbmp_error1-mb.phpt +++ b/ext/gd/tests/png2wbmp_error1-mb.phpt @@ -19,8 +19,8 @@ $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 255, 255, 255); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); -$file = dirname(__FILE__) .'/simpletext私はガラスを食べられます.png'; -$file2 = dirname(__FILE__) .'/simpletext私はガラスを食べられます.wbmp'; +$file = __DIR__ .'/simpletext私はガラスを食べられます.png'; +$file2 = __DIR__ .'/simpletext私はガラスを食べられます.wbmp'; // Save the image as 'simpletext.png' imagepng($im, $file); @@ -41,6 +41,6 @@ Deprecated: Function png2wbmp() is deprecated in %s on line %d Warning: png2wbmp(): Invalid threshold value '-1' in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext私はガラスを食べられます.png'); -unlink(dirname(__FILE__) .'/simpletext私はガラスを食べられます.wbmp'); +unlink(__DIR__ .'/simpletext私はガラスを食べられます.png'); +unlink(__DIR__ .'/simpletext私はガラスを食べられます.wbmp'); ?> diff --git a/ext/gd/tests/png2wbmp_error1.phpt b/ext/gd/tests/png2wbmp_error1.phpt index 543013b4bc..5805dfa7a0 100644 --- a/ext/gd/tests/png2wbmp_error1.phpt +++ b/ext/gd/tests/png2wbmp_error1.phpt @@ -19,8 +19,8 @@ $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 255, 255, 255); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); -$file = dirname(__FILE__) .'/simpletext.png'; -$file2 = dirname(__FILE__) .'/simpletext.wbmp'; +$file = __DIR__ .'/simpletext.png'; +$file2 = __DIR__ .'/simpletext.wbmp'; // Save the image as 'simpletext.png' imagepng($im, $file); @@ -41,6 +41,6 @@ Deprecated: Function png2wbmp() is deprecated in %s on line %d Warning: png2wbmp(): Invalid threshold value '-1' in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext.png'); -unlink(dirname(__FILE__) .'/simpletext.wbmp'); +unlink(__DIR__ .'/simpletext.png'); +unlink(__DIR__ .'/simpletext.wbmp'); ?> diff --git a/ext/gd/tests/png2wbmp_error2.phpt b/ext/gd/tests/png2wbmp_error2.phpt index a674e0d6cc..3bfff05891 100644 --- a/ext/gd/tests/png2wbmp_error2.phpt +++ b/ext/gd/tests/png2wbmp_error2.phpt @@ -14,7 +14,7 @@ if(!function_exists('png2wbmp')) { ?> --FILE-- <?php -$file = dirname(__FILE__) .'/simpletext.wbmp'; +$file = __DIR__ .'/simpletext.wbmp'; png2wbmp('', $file, 20, 120, 8); png2wbmp(null, $file, 20, 120, 8); png2wbmp(false, $file, 20, 120, 8); @@ -33,5 +33,5 @@ Deprecated: Function png2wbmp() is deprecated in %s on line %d Warning: png2wbmp(): Unable to open '' for reading in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext.wbmp'); +unlink(__DIR__ .'/simpletext.wbmp'); ?> diff --git a/ext/gd/tests/png2wbmp_error3.phpt b/ext/gd/tests/png2wbmp_error3.phpt index 3cab3ccb98..8bf0aa25bb 100644 --- a/ext/gd/tests/png2wbmp_error3.phpt +++ b/ext/gd/tests/png2wbmp_error3.phpt @@ -19,7 +19,7 @@ $im = imagecreatetruecolor(120, 20); $text_color = imagecolorallocate($im, 255, 255, 255); imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); -$file = dirname(__FILE__) .'/simpletext.png'; +$file = __DIR__ .'/simpletext.png'; // Save the image as 'simpletext.png' imagepng($im, $file); @@ -45,5 +45,5 @@ Deprecated: Function png2wbmp() is deprecated in %s on line %d Warning: png2wbmp(): Unable to open '' for writing in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) .'/simpletext.png'); +unlink(__DIR__ .'/simpletext.png'); ?> diff --git a/ext/gd/tests/pngcomp.phpt b/ext/gd/tests/pngcomp.phpt index 3fd7b57055..aa663a6dd2 100644 --- a/ext/gd/tests/pngcomp.phpt +++ b/ext/gd/tests/pngcomp.phpt @@ -12,7 +12,7 @@ png compression test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "PNG compression test: "; diff --git a/ext/gd/tests/xbm2png.phpt b/ext/gd/tests/xbm2png.phpt index 7eaabc410b..8dcd07bc4a 100644 --- a/ext/gd/tests/xbm2png.phpt +++ b/ext/gd/tests/xbm2png.phpt @@ -14,7 +14,7 @@ xbm --> png conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "XBM to PNG conversion: "; echo imagepng(imagecreatefromxbm($cwd . "/conv_test.xbm"), $cwd . "/test_xbm.png") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/xpm2gd.phpt b/ext/gd/tests/xpm2gd.phpt index 42df3f6213..f48dcb2b3b 100644 --- a/ext/gd/tests/xpm2gd.phpt +++ b/ext/gd/tests/xpm2gd.phpt @@ -12,7 +12,7 @@ xpm --> gd1/gd2 conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "XPM to GD1 conversion: "; echo imagegd(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test_xpm.gd1") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/xpm2jpg.phpt b/ext/gd/tests/xpm2jpg.phpt index d412b074a7..92cab3e5fa 100644 --- a/ext/gd/tests/xpm2jpg.phpt +++ b/ext/gd/tests/xpm2jpg.phpt @@ -15,7 +15,7 @@ xpm --> jpeg conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "XPM to JPEG conversion: "; echo imagejpeg(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test_xpm.jpeg") ? 'ok' : 'failed'; diff --git a/ext/gd/tests/xpm2png.phpt b/ext/gd/tests/xpm2png.phpt index a5eadffd81..e473cfb31c 100644 --- a/ext/gd/tests/xpm2png.phpt +++ b/ext/gd/tests/xpm2png.phpt @@ -15,7 +15,7 @@ xpm --> png conversion test ?> --FILE-- <?php - $cwd = dirname(__FILE__); + $cwd = __DIR__; echo "XPM to PNG conversion: "; echo imagepng(imagecreatefromxpm($cwd . "/conv_test.xpm"), $cwd . "/test_xpm.png") ? 'ok' : 'failed'; diff --git a/ext/gettext/tests/bug66267.phpt b/ext/gettext/tests/bug66267.phpt index 17d7d58d39..e5a2041109 100644 --- a/ext/gettext/tests/bug66267.phpt +++ b/ext/gettext/tests/bug66267.phpt @@ -30,7 +30,7 @@ foreach ($loc as $l) { putenv("LC_ALL=$l"); setlocale(LC_ALL, $l); - $path = realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . "66265"); + $path = realpath(__DIR__ . DIRECTORY_SEPARATOR . "66265"); bindtextdomain($domain, $path); bind_textdomain_codeset($domain, "UTF-8"); textdomain($domain); diff --git a/ext/gettext/tests/gettext_basic-enus.phpt b/ext/gettext/tests/gettext_basic-enus.phpt index aa6ede3abd..edbd31cc48 100644 --- a/ext/gettext/tests/gettext_basic-enus.phpt +++ b/ext/gettext/tests/gettext_basic-enus.phpt @@ -12,7 +12,7 @@ Gettext basic test with en_US locale that should be on nearly every system --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain ("messages", "./locale"); diff --git a/ext/gettext/tests/gettext_basic.phpt b/ext/gettext/tests/gettext_basic.phpt index 4d300835b3..26e7b7017e 100644 --- a/ext/gettext/tests/gettext_basic.phpt +++ b/ext/gettext/tests/gettext_basic.phpt @@ -12,7 +12,7 @@ Gettext basic test --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=fi_FI'); setlocale(LC_ALL, 'fi_FI'); bindtextdomain ("messages", "./locale"); diff --git a/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt b/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt index f88917f3c1..e9bc37b410 100644 --- a/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt +++ b/ext/gettext/tests/gettext_bindtextdomain-cwd.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; chdir($base_dir); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); diff --git a/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt b/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt index d8b8794e5a..83511d71e2 100644 --- a/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt +++ b/ext/gettext/tests/gettext_bindtextdomain-emptydomain.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("gettext")) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); bindtextdomain('', 'foobar'); --EXPECTF-- Warning: The first parameter of bindtextdomain must not be empty in %s on line %d diff --git a/ext/gettext/tests/gettext_bindtextdomain-path.phpt b/ext/gettext/tests/gettext_bindtextdomain-path.phpt index 97c9fbb39c..e69f6f9c58 100644 --- a/ext/gettext/tests/gettext_bindtextdomain-path.phpt +++ b/ext/gettext/tests/gettext_bindtextdomain-path.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("gettext")) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); var_dump(bindtextdomain('example.org', 'foobar')); --EXPECT-- bool(false) diff --git a/ext/gettext/tests/gettext_dcgettext.phpt b/ext/gettext/tests/gettext_dcgettext.phpt index fcfb5b1fbd..2510727c87 100644 --- a/ext/gettext/tests/gettext_dcgettext.phpt +++ b/ext/gettext/tests/gettext_dcgettext.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_MESSAGES=en_US.UTF-8'); setlocale(LC_MESSAGES, 'en_US.UTF-8'); putenv('LC_ALL=en_US.UTF-8'); diff --git a/ext/gettext/tests/gettext_dgettext.phpt b/ext/gettext/tests/gettext_dgettext.phpt index 8effa6e501..57a05faa48 100644 --- a/ext/gettext/tests/gettext_dgettext.phpt +++ b/ext/gettext/tests/gettext_dgettext.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_MESSAGES=en_US.UTF-8'); setlocale(LC_MESSAGES, 'en_US.UTF-8'); putenv('LC_ALL=en_US.UTF-8'); diff --git a/ext/gettext/tests/gettext_dngettext-plural.phpt b/ext/gettext/tests/gettext_dngettext-plural.phpt index 0380785bf1..50bddc9a93 100644 --- a/ext/gettext/tests/gettext_dngettext-plural.phpt +++ b/ext/gettext/tests/gettext_dngettext-plural.phpt @@ -10,7 +10,7 @@ if (!setlocale(LC_ALL, 'en_US.UTF-8')) { } --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain('dngettextTest', './locale'); diff --git a/ext/gettext/tests/gettext_ngettext.phpt b/ext/gettext/tests/gettext_ngettext.phpt index 16d02afe20..e9a7de7e73 100644 --- a/ext/gettext/tests/gettext_ngettext.phpt +++ b/ext/gettext/tests/gettext_ngettext.phpt @@ -11,7 +11,7 @@ Test ngettext() functionality ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); putenv('LC_ALL=en_US.UTF-8'); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain('dngettextTest', './locale'); diff --git a/ext/gettext/tests/gettext_textdomain-retval.phpt b/ext/gettext/tests/gettext_textdomain-retval.phpt index 5795556046..c5326a99df 100644 --- a/ext/gettext/tests/gettext_textdomain-retval.phpt +++ b/ext/gettext/tests/gettext_textdomain-retval.phpt @@ -12,7 +12,7 @@ Check if textdomain() returns the new domain --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); setlocale(LC_ALL, 'en_US.UTF-8'); bindtextdomain ("messages", "./locale"); echo textdomain('test'), "\n"; diff --git a/ext/hash/tests/hash_file_basic1.phpt b/ext/hash/tests/hash_file_basic1.phpt index 3984fbcb21..0c4197e393 100644 --- a/ext/hash/tests/hash_file_basic1.phpt +++ b/ext/hash/tests/hash_file_basic1.phpt @@ -11,7 +11,7 @@ Hash: hash_file() function : basic functionality echo "*** Testing hash_file() : basic functionality ***\n"; -$file = dirname(__FILE__) . "hash_file.txt"; +$file = __DIR__ . "hash_file.txt"; /* Creating a temporary file file */ if (($fp = fopen( $file, "w+")) == FALSE) { echo "Cannot create file ($file)"; diff --git a/ext/hash/tests/hash_hmac_file_basic.phpt b/ext/hash/tests/hash_hmac_file_basic.phpt index 9135825008..6e4b4da078 100644 --- a/ext/hash/tests/hash_hmac_file_basic.phpt +++ b/ext/hash/tests/hash_hmac_file_basic.phpt @@ -12,7 +12,7 @@ Hash: hash_hmac_file() function : basic functionality echo "*** Testing hash_hmac_file() : basic functionality ***\n"; -$file = dirname(__FILE__) . "hash_hmac_file.txt"; +$file = __DIR__ . "hash_hmac_file.txt"; /* Creating a temporary file file */ if (($fp = fopen( $file, "w+")) == FALSE) { echo "Cannot create file ($file)"; diff --git a/ext/hash/tests/hash_hmac_file_error.phpt b/ext/hash/tests/hash_hmac_file_error.phpt index 5b82c288ec..a3718ebb85 100644 --- a/ext/hash/tests/hash_hmac_file_error.phpt +++ b/ext/hash/tests/hash_hmac_file_error.phpt @@ -11,7 +11,7 @@ Hash: hash_hmac_file() function : basic functionality echo "*** Testing hash() : error conditions ***\n"; -$file = dirname(__FILE__) . "hash_file.txt"; +$file = __DIR__ . "hash_file.txt"; $key = 'secret'; echo "\n-- Testing hash_hmac_file() function with less than expected no. of arguments --\n"; diff --git a/ext/iconv/tests/iconv_stream_filter.phpt b/ext/iconv/tests/iconv_stream_filter.phpt index afa6d67446..69ec699d71 100644 --- a/ext/iconv/tests/iconv_stream_filter.phpt +++ b/ext/iconv/tests/iconv_stream_filter.phpt @@ -6,20 +6,20 @@ iconv stream filter iconv.internal_charset=iso-8859-1 --FILE-- <?php -$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); +$fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); var_dump(bin2hex(fread($fp, 10))); var_dump(bin2hex(fread($fp, 5))); var_dump(bin2hex(fread($fp, 1))); fclose($fp); -$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); +$fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP'); var_dump(bin2hex(fread($fp, 10))); var_dump(bin2hex(fread($fp, 5))); var_dump(bin2hex(fread($fp, 1))); fclose($fp); -$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); +$fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); stream_filter_append($fp, 'string.rot13'); // this will make conversion fail. stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP'); var_dump(bin2hex(@fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf"); diff --git a/ext/iconv/tests/iconv_stream_filter_delimiter.phpt b/ext/iconv/tests/iconv_stream_filter_delimiter.phpt index 895f614ef8..968cfcb606 100644 --- a/ext/iconv/tests/iconv_stream_filter_delimiter.phpt +++ b/ext/iconv/tests/iconv_stream_filter_delimiter.phpt @@ -6,27 +6,27 @@ iconv stream filter iconv.internal_charset=iso-8859-1 --FILE-- <?php -$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); +$fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); var_dump(bin2hex(fread($fp, 10))); var_dump(bin2hex(fread($fp, 5))); var_dump(bin2hex(fread($fp, 1))); fclose($fp); -$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); +$fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP'); var_dump(bin2hex(fread($fp, 10))); var_dump(bin2hex(fread($fp, 5))); var_dump(bin2hex(fread($fp, 1))); fclose($fp); -$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); +$fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); stream_filter_append($fp, 'convert.iconv.ISO-2022-JP.EUC-JP'); var_dump(bin2hex(fread($fp, 10))); var_dump(bin2hex(fread($fp, 5))); var_dump(bin2hex(fread($fp, 1))); fclose($fp); -$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); +$fp = fopen(__DIR__.'/iconv_stream_filter.txt', 'rb'); stream_filter_append($fp, 'convert.iconv.ISO-2022-JP\0EUC-JP'); var_dump(bin2hex(fread($fp, 10))); var_dump(bin2hex(fread($fp, 5))); diff --git a/ext/iconv/tests/translit-utf8.phpt b/ext/iconv/tests/translit-utf8.phpt index 68b1982779..e8924349de 100644 --- a/ext/iconv/tests/translit-utf8.phpt +++ b/ext/iconv/tests/translit-utf8.phpt @@ -10,7 +10,7 @@ error_reporting=2047 --FILE-- <?php //error_reporting(E_ALL); -$utf = implode('', file(dirname(__FILE__).'/Quotes.UTF-8')); +$utf = implode('', file(__DIR__.'/Quotes.UTF-8')); print(iconv("UTF-8", "ISO-8859-1//TRANSLIT", $utf)); print(iconv("UTF-8", "ASCII//TRANSLIT", $utf)); diff --git a/ext/imap/tests/bug63126.phpt b/ext/imap/tests/bug63126.phpt index b046c46b55..94c618730c 100644 --- a/ext/imap/tests/bug63126.phpt +++ b/ext/imap/tests/bug63126.phpt @@ -4,7 +4,7 @@ imap_open() DISABLE_AUTHENTICATOR ignores array param <?php extension_loaded('imap') or die('skip imap extension not available in this build'); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $in = imap_open($default_mailbox, $username, $password, OP_HALFOPEN, 1); if (!$in) { @@ -28,7 +28,7 @@ $tests = array( 'Array' => array('DISABLE_AUTHENTICATOR' => array('GSSAPI','NTLM')), 'String' => array('DISABLE_AUTHENTICATOR' => 'GSSAPI'), ); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); foreach ($tests as $name => $testparams) { echo "Test for $name\n"; $in = imap_open($default_mailbox, $username, $password, OP_HALFOPEN, 1, $testparams); diff --git a/ext/imap/tests/imap_alerts_error.phpt b/ext/imap/tests/imap_alerts_error.phpt index 2baefc3da1..546d193c8f 100644 --- a/ext/imap/tests/imap_alerts_error.phpt +++ b/ext/imap/tests/imap_alerts_error.phpt @@ -2,7 +2,7 @@ Test imap_alerts() function : error conditions --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/imap/tests/imap_append_basic.phpt b/ext/imap/tests/imap_append_basic.phpt index 06b0c1d4a4..500d3afb69 100644 --- a/ext/imap/tests/imap_append_basic.phpt +++ b/ext/imap/tests/imap_append_basic.phpt @@ -2,7 +2,7 @@ Test imap_append() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -13,7 +13,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_append() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Create a new mailbox for test\n"; $imap_stream = setup_test_mailbox("", 0); diff --git a/ext/imap/tests/imap_body.phpt b/ext/imap/tests/imap_body.phpt index 77747c8d8a..a9b3bcd6e5 100644 --- a/ext/imap/tests/imap_body.phpt +++ b/ext/imap/tests/imap_body.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ imap_body(); echo "Checking with incorrect parameter type\n"; imap_body(''); imap_body(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); imap_body($stream_id); diff --git a/ext/imap/tests/imap_body_basic.phpt b/ext/imap/tests/imap_body_basic.phpt index 3cfe3e3d6b..bc9f789c6a 100644 --- a/ext/imap/tests/imap_body_basic.phpt +++ b/ext/imap/tests/imap_body_basic.phpt @@ -2,7 +2,7 @@ Test imap_body() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -13,7 +13,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_body() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Create a new mailbox for test\n"; $imap_stream = setup_test_mailbox("", 1); diff --git a/ext/imap/tests/imap_bodystruct_basic.phpt b/ext/imap/tests/imap_bodystruct_basic.phpt index a5db378c00..07b552de96 100644 --- a/ext/imap/tests/imap_bodystruct_basic.phpt +++ b/ext/imap/tests/imap_bodystruct_basic.phpt @@ -2,7 +2,7 @@ Test imap_bodystruct() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -12,7 +12,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing string imap_bodystruct : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Create a new mailbox for test and add a multipart msgs\n"; $imap_stream = setup_test_mailbox("", 1, $mailbox, "multipart"); diff --git a/ext/imap/tests/imap_clearflag_full_basic.phpt b/ext/imap/tests/imap_clearflag_full_basic.phpt index 359c3af28c..017ca1b71e 100644 --- a/ext/imap/tests/imap_clearflag_full_basic.phpt +++ b/ext/imap/tests/imap_clearflag_full_basic.phpt @@ -2,7 +2,7 @@ Test imap_clearflag_full() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -13,7 +13,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_clearflag_full() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Create a new mailbox for test\n"; $imap_stream = setup_test_mailbox("", 10); diff --git a/ext/imap/tests/imap_close_basic.phpt b/ext/imap/tests/imap_close_basic.phpt index bbb78bfbf9..4a3f5d683f 100644 --- a/ext/imap/tests/imap_close_basic.phpt +++ b/ext/imap/tests/imap_close_basic.phpt @@ -2,7 +2,7 @@ Test imap_close() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -14,7 +14,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_close() : basic functionality ***\n"; // include file for required variables in imap_open() -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // Initialize required variables $stream_id = setup_test_mailbox('', 3, $mailbox); // set up temp mailbox with 3 messages @@ -40,7 +40,7 @@ var_dump( imap_close($stream_id) ); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_close() : basic functionality *** diff --git a/ext/imap/tests/imap_close_error.phpt b/ext/imap/tests/imap_close_error.phpt index 89cafab3ba..8bb43e6a3b 100644 --- a/ext/imap/tests/imap_close_error.phpt +++ b/ext/imap/tests/imap_close_error.phpt @@ -2,7 +2,7 @@ Test imap_close() function : error conditions - incorrect number of args --SKIPIF-- <?php -require_once (dirname(__FILE__).'/skipif.inc'); +require_once (__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -16,7 +16,7 @@ require_once (dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_close() : error conditions ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // Zero arguments echo "\n-- Testing imap_close() function with Zero arguments --\n"; diff --git a/ext/imap/tests/imap_close_variation3.phpt b/ext/imap/tests/imap_close_variation3.phpt index 777ca07124..d282ba1dfd 100644 --- a/ext/imap/tests/imap_close_variation3.phpt +++ b/ext/imap/tests/imap_close_variation3.phpt @@ -23,7 +23,7 @@ var_dump(imap_close($file_handle)); var_dump($file_handle); echo "\n-- Directory Resource opened with opendir() --\n"; -var_dump($dir_handle = opendir(dirname(__FILE__))); +var_dump($dir_handle = opendir(__DIR__)); var_dump(imap_close($dir_handle)); var_dump($dir_handle); ?> diff --git a/ext/imap/tests/imap_close_variation4.phpt b/ext/imap/tests/imap_close_variation4.phpt index 7a2d59b9b1..d71113ca85 100644 --- a/ext/imap/tests/imap_close_variation4.phpt +++ b/ext/imap/tests/imap_close_variation4.phpt @@ -2,7 +2,7 @@ Test imap_close() function : usage variations - different ints as $options arg --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_close() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $inputs = array (0, 3.2768e4, -32768, PHP_INT_MAX, -PHP_INT_MAX); @@ -61,7 +61,7 @@ foreach($inputs as $input) { ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_close() : usage variations *** diff --git a/ext/imap/tests/imap_createmailbox_basic.phpt b/ext/imap/tests/imap_createmailbox_basic.phpt index e827af5960..9d3cb83058 100644 --- a/ext/imap/tests/imap_createmailbox_basic.phpt +++ b/ext/imap/tests/imap_createmailbox_basic.phpt @@ -2,7 +2,7 @@ Test imap_createmailbox() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -13,7 +13,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_createmailbox() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $imap_stream = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); diff --git a/ext/imap/tests/imap_errors_basic.phpt b/ext/imap/tests/imap_errors_basic.phpt index e4c7721393..0a42e95e1f 100644 --- a/ext/imap/tests/imap_errors_basic.phpt +++ b/ext/imap/tests/imap_errors_basic.phpt @@ -2,7 +2,7 @@ Test imap_errors() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -12,7 +12,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_errors() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $password = "bogus"; // invalid password to use in this test echo "Issue open with invalid password with normal default number of retries, i.e 3\n"; diff --git a/ext/imap/tests/imap_expunge_error.phpt b/ext/imap/tests/imap_expunge_error.phpt index f844cdcf11..f1298843bb 100644 --- a/ext/imap/tests/imap_expunge_error.phpt +++ b/ext/imap/tests/imap_expunge_error.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/imap/tests/imap_fetch_overview_basic.phpt b/ext/imap/tests/imap_fetch_overview_basic.phpt index 152eaae9da..03aa9ae0a5 100644 --- a/ext/imap/tests/imap_fetch_overview_basic.phpt +++ b/ext/imap/tests/imap_fetch_overview_basic.phpt @@ -2,7 +2,7 @@ Test imap_fetch_overview() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -14,7 +14,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_fetch_overview() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // create a new mailbox and add two new messages to it $stream_id = setup_test_mailbox('', 2, $mailbox, 'notSimple'); @@ -47,7 +47,7 @@ imap_close($stream_id); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetch_overview() : basic functionality *** diff --git a/ext/imap/tests/imap_fetch_overview_error.phpt b/ext/imap/tests/imap_fetch_overview_error.phpt index 78510d6bd1..629535b0bf 100644 --- a/ext/imap/tests/imap_fetch_overview_error.phpt +++ b/ext/imap/tests/imap_fetch_overview_error.phpt @@ -2,7 +2,7 @@ Test imap_fetch_overview() function : error conditions - incorrect number of args --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_fetch_overview() : error conditions ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); //Test imap_fetch_overview with one more than the expected number of arguments echo "\n-- Testing imap_fetch_overview() function with more than expected no. of arguments --\n"; @@ -35,7 +35,7 @@ var_dump( imap_fetch_overview($stream_id) ); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetch_overview() : error conditions *** diff --git a/ext/imap/tests/imap_fetch_overview_variation3.phpt b/ext/imap/tests/imap_fetch_overview_variation3.phpt index a73845d1d6..3c52c73d90 100644 --- a/ext/imap/tests/imap_fetch_overview_variation3.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation3.phpt @@ -2,7 +2,7 @@ Test imap_fetch_overview() function : usage variations - FT_UID option --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -19,7 +19,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_fetch_overview() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // Initialise required variables $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one simple message @@ -51,7 +51,7 @@ foreach($options as $option) { ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetch_overview() : usage variations *** diff --git a/ext/imap/tests/imap_fetch_overview_variation4.phpt b/ext/imap/tests/imap_fetch_overview_variation4.phpt index 4798344830..2aa89b75b6 100644 --- a/ext/imap/tests/imap_fetch_overview_variation4.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation4.phpt @@ -24,7 +24,7 @@ var_dump(imap_fetch_overview($file_pointer, 1)); fclose($file_pointer); echo "\n-- Directory Resource opened with opendir() --\n"; -var_dump($dir_handle = opendir(dirname(__FILE__))); +var_dump($dir_handle = opendir(__DIR__)); var_dump(imap_fetch_overview($dir_handle, 1)); closedir($dir_handle); ?> diff --git a/ext/imap/tests/imap_fetch_overview_variation5.phpt b/ext/imap/tests/imap_fetch_overview_variation5.phpt index d713a33934..c052b39384 100644 --- a/ext/imap/tests/imap_fetch_overview_variation5.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation5.phpt @@ -2,7 +2,7 @@ Test imap_fetch_overview() function : usage variations - $msg_no argument --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_fetch_overview() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp mailbox with 3 msgs @@ -45,7 +45,7 @@ imap_errors(); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetch_overview() : usage variations *** diff --git a/ext/imap/tests/imap_fetch_overview_variation6.phpt b/ext/imap/tests/imap_fetch_overview_variation6.phpt index 4c2d3234f7..d284f9bf94 100644 --- a/ext/imap/tests/imap_fetch_overview_variation6.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation6.phpt @@ -2,7 +2,7 @@ Test imap_fetch_overview() function : usage variations - multipart message --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -17,7 +17,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_fetch_overview() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 0, $mailbox); // setup temp mailbox create_multipart_message($stream_id, $mailbox); @@ -88,7 +88,7 @@ function create_multipart_message($imap_stream, $mailbox) { ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetch_overview() : usage variations *** diff --git a/ext/imap/tests/imap_fetchbody_basic.phpt b/ext/imap/tests/imap_fetchbody_basic.phpt index 2986f0e89e..66fa345535 100644 --- a/ext/imap/tests/imap_fetchbody_basic.phpt +++ b/ext/imap/tests/imap_fetchbody_basic.phpt @@ -2,7 +2,7 @@ Test imap_fetchbody() function : basic functionality --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -13,7 +13,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_fetchbody() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // Initialise all required variables @@ -59,7 +59,7 @@ var_dump( $overview[0]->seen ); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchbody() : basic functionality *** diff --git a/ext/imap/tests/imap_fetchbody_error.phpt b/ext/imap/tests/imap_fetchbody_error.phpt index a91599a305..c45371a813 100644 --- a/ext/imap/tests/imap_fetchbody_error.phpt +++ b/ext/imap/tests/imap_fetchbody_error.phpt @@ -2,7 +2,7 @@ Test imap_fetchbody() function : error conditions - incorrect number of args --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -17,7 +17,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_fetchbody() : error conditions ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); //Test imap_fetchbody with one more than the expected number of arguments echo "\n-- Testing imap_fetchbody() function with more than expected no. of arguments --\n"; @@ -38,7 +38,7 @@ var_dump( imap_fetchbody($stream_id, $msg_no) ); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchbody() : error conditions *** diff --git a/ext/imap/tests/imap_fetchbody_variation4.phpt b/ext/imap/tests/imap_fetchbody_variation4.phpt index de336e4d50..3259ed9321 100644 --- a/ext/imap/tests/imap_fetchbody_variation4.phpt +++ b/ext/imap/tests/imap_fetchbody_variation4.phpt @@ -2,7 +2,7 @@ Test imap_fetchbody() function : usage variations - FT_UID option --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_fetchbody() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // Initialise required variables $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one simple message @@ -48,7 +48,7 @@ foreach($options as $option) { ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchbody() : usage variations *** diff --git a/ext/imap/tests/imap_fetchbody_variation5.phpt b/ext/imap/tests/imap_fetchbody_variation5.phpt index 50589e4d0b..fa32d0e995 100644 --- a/ext/imap/tests/imap_fetchbody_variation5.phpt +++ b/ext/imap/tests/imap_fetchbody_variation5.phpt @@ -24,7 +24,7 @@ var_dump(imap_fetchbody($file_pointer, 1)); fclose($file_pointer); echo "\n-- Directory Resource opened with opendir() --\n"; -var_dump($dir_handle = opendir(dirname(__FILE__))); +var_dump($dir_handle = opendir(__DIR__)); var_dump(imap_fetchbody($dir_handle, 1)); closedir($dir_handle); ?> diff --git a/ext/imap/tests/imap_fetchbody_variation6.phpt b/ext/imap/tests/imap_fetchbody_variation6.phpt index ba3f788935..18f7d3a40d 100644 --- a/ext/imap/tests/imap_fetchbody_variation6.phpt +++ b/ext/imap/tests/imap_fetchbody_variation6.phpt @@ -2,7 +2,7 @@ Test imap_fetchbody() function : usage variations - $msg_no arg --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_fetchbody() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); //Initialise required variables $stream_id = setup_test_mailbox('', 3); // set up temp mailbox with simple msgs @@ -39,7 +39,7 @@ foreach($sequences as $msg_no) { ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchbody() : usage variations *** diff --git a/ext/imap/tests/imap_fetchheader_basic.phpt b/ext/imap/tests/imap_fetchheader_basic.phpt index 70bb66b2bd..4ffa34c09e 100644 --- a/ext/imap/tests/imap_fetchheader_basic.phpt +++ b/ext/imap/tests/imap_fetchheader_basic.phpt @@ -2,7 +2,7 @@ Test imap_fetchheader() function : basic function --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -12,7 +12,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_fetchheader() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // Initialise all required variables $stream_id = setup_test_mailbox('', 1, $mailbox, 'multiPart'); // setup temp mailbox with 1 msg @@ -39,7 +39,7 @@ var_dump( imap_fetchheader($stream_id, $msg_no) ); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchheader() : basic functionality *** diff --git a/ext/imap/tests/imap_fetchheader_error.phpt b/ext/imap/tests/imap_fetchheader_error.phpt index 77f6002eb5..82a47b64f1 100644 --- a/ext/imap/tests/imap_fetchheader_error.phpt +++ b/ext/imap/tests/imap_fetchheader_error.phpt @@ -2,7 +2,7 @@ Test imap_fetchheader() function : error conditions - incorrect number of args --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -16,7 +16,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); */ echo "*** Testing imap_fetchheader() : error conditions ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); //Test imap_fetchheader with one more than the expected number of arguments echo "\n-- Testing imap_fetchheader() function with more than expected no. of arguments --\n"; diff --git a/ext/imap/tests/imap_fetchheader_variation3.phpt b/ext/imap/tests/imap_fetchheader_variation3.phpt index 728f8c3899..8230fdcf3e 100644 --- a/ext/imap/tests/imap_fetchheader_variation3.phpt +++ b/ext/imap/tests/imap_fetchheader_variation3.phpt @@ -2,7 +2,7 @@ Test imap_fetchheader() function : usage variations - FT_UID option --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -19,7 +19,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_fetchheader() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); // Initialise required variables $stream_id = setup_test_mailbox('', 1); // set up temporary mailbox with one simple message @@ -46,7 +46,7 @@ foreach($options as $option) { ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchheader() : usage variations *** diff --git a/ext/imap/tests/imap_fetchheader_variation4.phpt b/ext/imap/tests/imap_fetchheader_variation4.phpt index 67c63077f4..05322f1527 100644 --- a/ext/imap/tests/imap_fetchheader_variation4.phpt +++ b/ext/imap/tests/imap_fetchheader_variation4.phpt @@ -23,7 +23,7 @@ var_dump(imap_fetchheader($file_pointer, 1)); fclose($file_pointer); echo "\n-- Directory Resource opened with opendir() --\n"; -var_dump($dir_handle = opendir(dirname(__FILE__))); +var_dump($dir_handle = opendir(__DIR__)); var_dump(imap_fetchheader($dir_handle, 1)); closedir($dir_handle); ?> diff --git a/ext/imap/tests/imap_fetchheader_variation5.phpt b/ext/imap/tests/imap_fetchheader_variation5.phpt index bdd6f6de60..8773621b09 100644 --- a/ext/imap/tests/imap_fetchheader_variation5.phpt +++ b/ext/imap/tests/imap_fetchheader_variation5.phpt @@ -2,7 +2,7 @@ Test imap_fetchheader() function : usage variations - $msg_no argument --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_fetchheader() : usage variations ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp mailbox with 3 msgs @@ -40,7 +40,7 @@ imap_errors(); ===DONE=== --CLEAN-- <?php -require_once(dirname(__FILE__).'/clean.inc'); +require_once(__DIR__.'/clean.inc'); ?> --EXPECTF-- *** Testing imap_fetchheader() : usage variations *** diff --git a/ext/imap/tests/imap_fetchstructure_basic.phpt b/ext/imap/tests/imap_fetchstructure_basic.phpt index dcf6148a1e..5d83a27427 100644 --- a/ext/imap/tests/imap_fetchstructure_basic.phpt +++ b/ext/imap/tests/imap_fetchstructure_basic.phpt @@ -4,7 +4,7 @@ imap_fetchstructure() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ echo "Checking with incorrect parameter type\n"; imap_fetchstructure(''); imap_fetchstructure(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 1); imap_fetchstructure($stream_id); diff --git a/ext/imap/tests/imap_gc_error.phpt b/ext/imap/tests/imap_gc_error.phpt index 7bfd95b8c0..e9b2222778 100644 --- a/ext/imap/tests/imap_gc_error.phpt +++ b/ext/imap/tests/imap_gc_error.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -16,7 +16,7 @@ echo "Checking with incorrect parameter type\n"; imap_gc('', false); imap_gc(false, false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); imap_gc($stream_id, -1); diff --git a/ext/imap/tests/imap_getsubscribed_basic.phpt b/ext/imap/tests/imap_getsubscribed_basic.phpt index cfe526844b..666203a8c2 100644 --- a/ext/imap/tests/imap_getsubscribed_basic.phpt +++ b/ext/imap/tests/imap_getsubscribed_basic.phpt @@ -4,7 +4,7 @@ imap_getsubscribed() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ echo "Checking with incorrect parameter type\n"; imap_getsubscribed(''); imap_getsubscribed(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); diff --git a/ext/imap/tests/imap_headerinfo_basic.phpt b/ext/imap/tests/imap_headerinfo_basic.phpt index 4334b62e8e..c13e62f8bf 100644 --- a/ext/imap/tests/imap_headerinfo_basic.phpt +++ b/ext/imap/tests/imap_headerinfo_basic.phpt @@ -4,12 +4,12 @@ imap_headerinfo() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 1); $z = imap_headerinfo($stream_id, 1); diff --git a/ext/imap/tests/imap_headerinfo_error.phpt b/ext/imap/tests/imap_headerinfo_error.phpt index 9869c3472e..8d67b70130 100644 --- a/ext/imap/tests/imap_headerinfo_error.phpt +++ b/ext/imap/tests/imap_headerinfo_error.phpt @@ -4,7 +4,7 @@ imap_headerinfo() incorrect parameter count Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ echo "Checking with incorrect parameter type\n"; imap_headerinfo(''); imap_headerinfo(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); diff --git a/ext/imap/tests/imap_headers.phpt b/ext/imap/tests/imap_headers.phpt index 60c04d406e..cd9d6d387f 100644 --- a/ext/imap/tests/imap_headers.phpt +++ b/ext/imap/tests/imap_headers.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/imap/tests/imap_list_basic.phpt b/ext/imap/tests/imap_list_basic.phpt index edd899c921..21f8a63894 100644 --- a/ext/imap/tests/imap_list_basic.phpt +++ b/ext/imap/tests/imap_list_basic.phpt @@ -4,7 +4,7 @@ imap_list() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ echo "Checking with incorrect parameter type\n"; imap_list(''); imap_list(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); diff --git a/ext/imap/tests/imap_lsub_basic.phpt b/ext/imap/tests/imap_lsub_basic.phpt index 0f7149917e..638479ca80 100644 --- a/ext/imap/tests/imap_lsub_basic.phpt +++ b/ext/imap/tests/imap_lsub_basic.phpt @@ -4,7 +4,7 @@ imap_lsub() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ echo "Checking with incorrect parameter type\n"; imap_lsub(''); imap_lsub(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); diff --git a/ext/imap/tests/imap_mail_copy.phpt b/ext/imap/tests/imap_mail_copy.phpt index c2aae5b176..12a85a1804 100644 --- a/ext/imap/tests/imap_mail_copy.phpt +++ b/ext/imap/tests/imap_mail_copy.phpt @@ -4,7 +4,7 @@ Test imap_mail_copy() incorrect parameters Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ imap_mail_copy(false); // more tests -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Test with IMAP server\n"; diff --git a/ext/imap/tests/imap_mail_copy_basic.phpt b/ext/imap/tests/imap_mail_copy_basic.phpt index 2171403cd1..a05951e8f6 100644 --- a/ext/imap/tests/imap_mail_copy_basic.phpt +++ b/ext/imap/tests/imap_mail_copy_basic.phpt @@ -4,7 +4,7 @@ Test imap_mail_copy() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_mail_copy() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Create a new mailbox for test\n"; diff --git a/ext/imap/tests/imap_mail_move.phpt b/ext/imap/tests/imap_mail_move.phpt index 7d8e489557..122960b78c 100644 --- a/ext/imap/tests/imap_mail_move.phpt +++ b/ext/imap/tests/imap_mail_move.phpt @@ -4,7 +4,7 @@ Test imap_mail_move() incorrect parameters Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -18,7 +18,7 @@ imap_mail_move(false); // more tests -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Test with IMAP server\n"; diff --git a/ext/imap/tests/imap_mail_move_basic.phpt b/ext/imap/tests/imap_mail_move_basic.phpt index f33f4963fa..380d288d9b 100644 --- a/ext/imap/tests/imap_mail_move_basic.phpt +++ b/ext/imap/tests/imap_mail_move_basic.phpt @@ -4,7 +4,7 @@ Test imap_mail_move() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ require_once(dirname(__FILE__).'/skipif.inc'); echo "*** Testing imap_mail_move() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); echo "Create a new mailbox for test\n"; diff --git a/ext/imap/tests/imap_num_msg_error.phpt b/ext/imap/tests/imap_num_msg_error.phpt index 69fb23f55b..fffa3ae951 100644 --- a/ext/imap/tests/imap_num_msg_error.phpt +++ b/ext/imap/tests/imap_num_msg_error.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/imap/tests/imap_num_recent_error.phpt b/ext/imap/tests/imap_num_recent_error.phpt index 8929c46297..b0ad5cefa0 100644 --- a/ext/imap/tests/imap_num_recent_error.phpt +++ b/ext/imap/tests/imap_num_recent_error.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt index 83b0eba80e..b94c11d797 100644 --- a/ext/imap/tests/imap_open_error.phpt +++ b/ext/imap/tests/imap_open_error.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -20,7 +20,7 @@ echo "Checking with incorrect parameters\n" ; imap_open('', '', ''); imap_open('', '', '', -1); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); imap_open($default_mailbox, $username, $password, NIL, -1); ?> diff --git a/ext/imap/tests/imap_ping_error.phpt b/ext/imap/tests/imap_ping_error.phpt index 4757967d02..5c2498c302 100644 --- a/ext/imap/tests/imap_ping_error.phpt +++ b/ext/imap/tests/imap_ping_error.phpt @@ -5,7 +5,7 @@ Paul Sohier #phptestfest utrecht --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/imap/tests/imap_renamemailbox_basic.phpt b/ext/imap/tests/imap_renamemailbox_basic.phpt index d8b3f485e5..91f99d13e3 100644 --- a/ext/imap/tests/imap_renamemailbox_basic.phpt +++ b/ext/imap/tests/imap_renamemailbox_basic.phpt @@ -4,7 +4,7 @@ imap_renamemailbox() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -16,7 +16,7 @@ imap_renamemailbox(''); imap_renamemailbox(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 1); diff --git a/ext/imap/tests/imap_rfc822_parse_headers_basic.phpt b/ext/imap/tests/imap_rfc822_parse_headers_basic.phpt index ee17fb39b9..36fcc7f077 100644 --- a/ext/imap/tests/imap_rfc822_parse_headers_basic.phpt +++ b/ext/imap/tests/imap_rfc822_parse_headers_basic.phpt @@ -4,12 +4,12 @@ imap_rfc822_parse_headers() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 1); $z = imap_headerinfo($stream_id, 1); diff --git a/ext/imap/tests/imap_savebody_basic.phpt b/ext/imap/tests/imap_savebody_basic.phpt index 0c03d0033d..2be987a361 100644 --- a/ext/imap/tests/imap_savebody_basic.phpt +++ b/ext/imap/tests/imap_savebody_basic.phpt @@ -4,7 +4,7 @@ imap_savebody() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,12 +15,12 @@ echo "Checking with incorrect parameter type\n"; imap_savebody(''); imap_savebody(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 1); imap_savebody($stream_id); -$file = dirname(__FILE__).'/tmpsavebody.txt'; +$file = __DIR__.'/tmpsavebody.txt'; //with URL $z = imap_savebody($stream_id, $file, 1); @@ -38,7 +38,7 @@ imap_close($stream_id); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__).'/tmpsavebody.txt'); +@unlink(__DIR__.'/tmpsavebody.txt'); require_once('clean.inc'); ?> --EXPECTF-- diff --git a/ext/imap/tests/imap_timeout_basic.phpt b/ext/imap/tests/imap_timeout_basic.phpt index 92c43bded7..a69b86b595 100644 --- a/ext/imap/tests/imap_timeout_basic.phpt +++ b/ext/imap/tests/imap_timeout_basic.phpt @@ -4,7 +4,7 @@ imap_timeout() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/imap/tests/imap_undelete_basic.phpt b/ext/imap/tests/imap_undelete_basic.phpt index 1ec02600d7..7cc9ff3847 100644 --- a/ext/imap/tests/imap_undelete_basic.phpt +++ b/ext/imap/tests/imap_undelete_basic.phpt @@ -4,12 +4,12 @@ imap_undelete() function : basic functionality Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 1); imap_delete($stream_id, 1); diff --git a/ext/imap/tests/imap_undelete_error.phpt b/ext/imap/tests/imap_undelete_error.phpt index 3366c04f05..0eae8033eb 100644 --- a/ext/imap/tests/imap_undelete_error.phpt +++ b/ext/imap/tests/imap_undelete_error.phpt @@ -4,7 +4,7 @@ imap_undelete() incorrect parameter count Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -15,7 +15,7 @@ echo "Checking with incorrect parameter type\n"; imap_undelete(''); imap_undelete(false); -require_once(dirname(__FILE__).'/imap_include.inc'); +require_once(__DIR__.'/imap_include.inc'); $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox $default_mailbox: " . imap_last_error()); diff --git a/ext/interbase/tests/004.phpt b/ext/interbase/tests/004.phpt index 4e63ce205f..20f314ee6b 100644 --- a/ext/interbase/tests/004.phpt +++ b/ext/interbase/tests/004.phpt @@ -18,7 +18,7 @@ InterBase: BLOB test /* create 100k blob file */ $blob_str = rand_binstr(100*1024); - $name = tempnam(dirname(__FILE__),"blob.tmp"); + $name = tempnam(__DIR__,"blob.tmp"); $ftmp = fopen($name,"w"); fwrite($ftmp,$blob_str); fclose($ftmp); diff --git a/ext/ldap/tests/ldap_bind_basic.phpt b/ext/ldap/tests/ldap_bind_basic.phpt index b0babaef19..d88dd1083b 100644 --- a/ext/ldap/tests/ldap_bind_basic.phpt +++ b/ext/ldap/tests/ldap_bind_basic.phpt @@ -4,8 +4,8 @@ ldap_bind() - Basic anonymous binding Patrick Allaert <patrickallaert@php.net> # Belgian PHP Testfest 2009 --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> -<?php require_once dirname(__FILE__) .'/skipifbindfailure.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipifbindfailure.inc'; ?> --FILE-- <?php require "connect.inc"; diff --git a/ext/ldap/tests/ldap_bind_ext.phpt b/ext/ldap/tests/ldap_bind_ext.phpt index 3a9ca415bd..3dd5903d80 100644 --- a/ext/ldap/tests/ldap_bind_ext.phpt +++ b/ext/ldap/tests/ldap_bind_ext.phpt @@ -3,8 +3,8 @@ ldap_bind_ext() - Basic binding --CREDITS-- Côme Chilliet <mcmic@php.net> --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> -<?php require_once dirname(__FILE__) .'/skipifbindfailure.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipifbindfailure.inc'; ?> <?php require_once('skipifcontrol.inc'); skipifunsupportedcontrol(LDAP_CONTROL_PASSWORDPOLICYREQUEST); diff --git a/ext/ldap/tests/ldap_bind_variation.phpt b/ext/ldap/tests/ldap_bind_variation.phpt index 24102f7a32..4aed3180ee 100644 --- a/ext/ldap/tests/ldap_bind_variation.phpt +++ b/ext/ldap/tests/ldap_bind_variation.phpt @@ -4,8 +4,8 @@ ldap_bind() - Advanced binding Patrick Allaert <patrickallaert@php.net> # Belgian PHP Testfest 2009 --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> -<?php require_once dirname(__FILE__) .'/skipifbindfailure.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipifbindfailure.inc'; ?> --FILE-- <?php require "connect.inc"; diff --git a/ext/ldap/tests/ldap_option_reqcert_basic.phpt b/ext/ldap/tests/ldap_option_reqcert_basic.phpt index 4a589d773d..04ced6ecbe 100644 --- a/ext/ldap/tests/ldap_option_reqcert_basic.phpt +++ b/ext/ldap/tests/ldap_option_reqcert_basic.phpt @@ -4,8 +4,8 @@ ldap_option_reqcert_basic() - Basic test to check if PHP can connect to a LDAP s Edwin Hoksberg <edwin@edwinhoksberg.nl> --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; - require_once dirname(__FILE__) .'/skipifbindfailure.inc'; + require_once __DIR__ .'/skipif.inc'; + require_once __DIR__ .'/skipifbindfailure.inc'; ?> --FILE-- <?php diff --git a/ext/ldap/tests/ldap_option_reqcert_error.phpt b/ext/ldap/tests/ldap_option_reqcert_error.phpt index 899664ccc9..477c4aba39 100644 --- a/ext/ldap/tests/ldap_option_reqcert_error.phpt +++ b/ext/ldap/tests/ldap_option_reqcert_error.phpt @@ -4,8 +4,8 @@ ldap_option_reqcert_error() - A test to check if ldap cant connect to a LDAP ser Edwin Hoksberg <edwin@edwinhoksberg.nl> --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; - require_once dirname(__FILE__) .'/skipifbindfailure.inc'; + require_once __DIR__ .'/skipif.inc'; + require_once __DIR__ .'/skipifbindfailure.inc'; ?> --FILE-- <?php diff --git a/ext/ldap/tests/ldap_search_error.phpt b/ext/ldap/tests/ldap_search_error.phpt index c5239e1ab1..795edd3180 100644 --- a/ext/ldap/tests/ldap_search_error.phpt +++ b/ext/ldap/tests/ldap_search_error.phpt @@ -4,8 +4,8 @@ ldap_search() - operation that should fail Davide Mendolia <idaf1er@gmail.com> Belgian PHP Testfest 2009 --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> -<?php require_once dirname(__FILE__) .'/skipifbindfailure.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipifbindfailure.inc'; ?> --FILE-- <?php include "connect.inc"; diff --git a/ext/ldap/tests/ldap_set_option_reqcert_error.phpt b/ext/ldap/tests/ldap_set_option_reqcert_error.phpt index 1a7796b760..b59879b97a 100644 --- a/ext/ldap/tests/ldap_set_option_reqcert_error.phpt +++ b/ext/ldap/tests/ldap_set_option_reqcert_error.phpt @@ -3,7 +3,7 @@ ldap_option_reqcert_basic() - Error test for TLS require cert ldap option --CREDITS-- Edwin Hoksberg <edwin@edwinhoksberg.nl> --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php require "connect.inc"; diff --git a/ext/ldap/tests/ldap_start_tls_basic.phpt b/ext/ldap/tests/ldap_start_tls_basic.phpt index efc43569d0..cdb50fd6c9 100644 --- a/ext/ldap/tests/ldap_start_tls_basic.phpt +++ b/ext/ldap/tests/ldap_start_tls_basic.phpt @@ -4,8 +4,8 @@ ldap_start_tls() - Basic ldap_start_tls test Patrick Allaert <patrickallaert@php.net> # Belgian PHP Testfest 2009 --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> -<?php require_once dirname(__FILE__) .'/skipifbindfailure.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipifbindfailure.inc'; ?> --FILE-- <?php require "connect.inc"; diff --git a/ext/libxml/tests/004.phpt b/ext/libxml/tests/004.phpt index 9d5121089d..f222071abe 100644 --- a/ext/libxml/tests/004.phpt +++ b/ext/libxml/tests/004.phpt @@ -20,7 +20,7 @@ $ctxs = array( foreach ($ctxs as $ctx) { var_dump(libxml_set_streams_context($ctx)); $dom = new DOMDocument(); - var_dump($dom->load(dirname(__FILE__).'/test.xml')); + var_dump($dom->load(__DIR__.'/test.xml')); } echo "Done\n"; diff --git a/ext/mbstring/tests/htmlent.phpt b/ext/mbstring/tests/htmlent.phpt index 943e0751a7..91ab5bd507 100644 --- a/ext/mbstring/tests/htmlent.phpt +++ b/ext/mbstring/tests/htmlent.phpt @@ -2,7 +2,7 @@ HTML input/output --SKIPIF-- <?php - ini_set('include_path', dirname(__FILE__)); + ini_set('include_path', __DIR__); extension_loaded('mbstring') or die('skip mbstring not available'); ?> --INI-- diff --git a/ext/mbstring/tests/mb_convert_variables.phpt b/ext/mbstring/tests/mb_convert_variables.phpt index e4d02a2269..b04e2bf185 100644 --- a/ext/mbstring/tests/mb_convert_variables.phpt +++ b/ext/mbstring/tests/mb_convert_variables.phpt @@ -9,7 +9,7 @@ mbstring.language=Japanese <?php // TODO: Add more tests //$debug = true; // Uncomment this line to view error/warning/notice message in *.out file -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); // SJIS string (BASE64 encoded) diff --git a/ext/mbstring/tests/mb_detect_order.phpt b/ext/mbstring/tests/mb_detect_order.phpt index 664ffd7bda..20302fa10d 100644 --- a/ext/mbstring/tests/mb_detect_order.phpt +++ b/ext/mbstring/tests/mb_detect_order.phpt @@ -7,7 +7,7 @@ mbstring.language=Japanese --FILE-- <?php //$debug = true; -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); diff --git a/ext/mbstring/tests/mb_http_input.phpt b/ext/mbstring/tests/mb_http_input.phpt index 5ac57d3e42..ea78b397b1 100644 --- a/ext/mbstring/tests/mb_http_input.phpt +++ b/ext/mbstring/tests/mb_http_input.phpt @@ -14,7 +14,7 @@ b=ܸ0123456789ܸ쥫ʤҤ餬 <?php // TODO: This is not a real test.... Need to change so that it does real testing //$debug = true; -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); $ini = ini_get('mbstring.http_input'); diff --git a/ext/mbstring/tests/mb_http_output.phpt b/ext/mbstring/tests/mb_http_output.phpt index 71af8b094d..b62734f02d 100644 --- a/ext/mbstring/tests/mb_http_output.phpt +++ b/ext/mbstring/tests/mb_http_output.phpt @@ -5,7 +5,7 @@ mb_http_output() --FILE-- <?php //TODO: Add more encoding. Wrong parameter type test. -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); // Set HTTP output encoding to ASCII diff --git a/ext/mbstring/tests/mb_internal_encoding.phpt b/ext/mbstring/tests/mb_internal_encoding.phpt index 8b332b0594..50b696e1bd 100644 --- a/ext/mbstring/tests/mb_internal_encoding.phpt +++ b/ext/mbstring/tests/mb_internal_encoding.phpt @@ -5,7 +5,7 @@ mb_internal_encoding() --FILE-- <?php // TODO: -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); // EUC-JP diff --git a/ext/mbstring/tests/mb_strcut.phpt b/ext/mbstring/tests/mb_strcut.phpt index e6845db025..939f6d6243 100644 --- a/ext/mbstring/tests/mb_strcut.phpt +++ b/ext/mbstring/tests/mb_strcut.phpt @@ -7,7 +7,7 @@ output_handler= --FILE-- <?php // TODO: Add more encodings -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); // EUC-JP diff --git a/ext/mbstring/tests/mb_strlen.phpt b/ext/mbstring/tests/mb_strlen.phpt index ab93273e55..ee71106937 100644 --- a/ext/mbstring/tests/mb_strlen.phpt +++ b/ext/mbstring/tests/mb_strlen.phpt @@ -8,7 +8,7 @@ mbstring.func_overload=0 <?php // TODO: Add more encodings -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); // restore detect_order to 'auto' diff --git a/ext/mbstring/tests/mb_strwidth.phpt b/ext/mbstring/tests/mb_strwidth.phpt index 25210078b8..c7e256a16e 100644 --- a/ext/mbstring/tests/mb_strwidth.phpt +++ b/ext/mbstring/tests/mb_strwidth.phpt @@ -6,7 +6,7 @@ mb_strwidth() <?php // TODO: Add more encoding, strings..... //$debug = true; -ini_set('include_path', dirname(__FILE__)); +ini_set('include_path', __DIR__); include_once('common.inc'); // EUC-JP diff --git a/ext/mysqli/tests/061.phpt b/ext/mysqli/tests/061.phpt index 1f68a1fe6e..0da9c1c09d 100644 --- a/ext/mysqli/tests/061.phpt +++ b/ext/mysqli/tests/061.phpt @@ -32,7 +32,7 @@ mysqli.allow_local_infile=1 $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); /* create temporary file */ - $filename = dirname(__FILE__) . "061.csv"; + $filename = __DIR__ . "061.csv"; $fp = fopen($filename, "w"); fwrite($fp, "foo;bar"); fclose($fp); diff --git a/ext/oci8/tests/array_bind_001.phpt b/ext/oci8/tests/array_bind_001.phpt index 15a8647779..30c22880ba 100644 --- a/ext/oci8/tests/array_bind_001.phpt +++ b/ext/oci8/tests/array_bind_001.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name() and invalid values 1 --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_002.phpt b/ext/oci8/tests/array_bind_002.phpt index 2bf39b5865..14635356ba 100644 --- a/ext/oci8/tests/array_bind_002.phpt +++ b/ext/oci8/tests/array_bind_002.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name() and invalid values 2 --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt index 0979f4340f..c8f415d0ce 100644 --- a/ext/oci8/tests/array_bind_003.phpt +++ b/ext/oci8/tests/array_bind_003.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and invalid values 3 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt index d9dfb01548..0a1b89d1d4 100644 --- a/ext/oci8/tests/array_bind_004.phpt +++ b/ext/oci8/tests/array_bind_004.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and invalid values 4 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_005.phpt b/ext/oci8/tests/array_bind_005.phpt index b9a8b8c820..6575ad70d5 100644 --- a/ext/oci8/tests/array_bind_005.phpt +++ b/ext/oci8/tests/array_bind_005.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and invalid values 5 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_006.phpt b/ext/oci8/tests/array_bind_006.phpt index 56db1aea61..85615d85ea 100644 --- a/ext/oci8/tests/array_bind_006.phpt +++ b/ext/oci8/tests/array_bind_006.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name(), SQLT_CHR and default max_length --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_007.phpt b/ext/oci8/tests/array_bind_007.phpt index 7cde333aad..d4896821c2 100644 --- a/ext/oci8/tests/array_bind_007.phpt +++ b/ext/oci8/tests/array_bind_007.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name() and invalid values 7 --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_008.phpt b/ext/oci8/tests/array_bind_008.phpt index 5b1975cd18..e7d31a1381 100644 --- a/ext/oci8/tests/array_bind_008.phpt +++ b/ext/oci8/tests/array_bind_008.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and invalid values 8 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_009.phpt b/ext/oci8/tests/array_bind_009.phpt index 64b2e8cded..b00efc0c24 100644 --- a/ext/oci8/tests/array_bind_009.phpt +++ b/ext/oci8/tests/array_bind_009.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name() and invalid values 9 --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; var_dump(oci_bind_array_by_name($c, ":c1", $array, 5, 5, SQLT_CHR)); diff --git a/ext/oci8/tests/array_bind_010.phpt b/ext/oci8/tests/array_bind_010.phpt index b5ba85938c..55488df21c 100644 --- a/ext/oci8/tests/array_bind_010.phpt +++ b/ext/oci8/tests/array_bind_010.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name() and invalid values 8 --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $statement = oci_parse($c, 'SELECT user FROM all_objects'); diff --git a/ext/oci8/tests/array_bind_011.phpt b/ext/oci8/tests/array_bind_011.phpt index 164821c221..711c57e4a2 100644 --- a/ext/oci8/tests/array_bind_011.phpt +++ b/ext/oci8/tests/array_bind_011.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_012.phpt b/ext/oci8/tests/array_bind_012.phpt index e2b74a9ce9..6b198b2a7f 100644 --- a/ext/oci8/tests/array_bind_012.phpt +++ b/ext/oci8/tests/array_bind_012.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $statement = oci_parse($c, 'SELECT user FROM all_objects'); diff --git a/ext/oci8/tests/array_bind_013.phpt b/ext/oci8/tests/array_bind_013.phpt index 44d4bd1e6d..0d9ddabc15 100644 --- a/ext/oci8/tests/array_bind_013.phpt +++ b/ext/oci8/tests/array_bind_013.phpt @@ -5,7 +5,7 @@ oci_bind_array_by_name(), SQLT_CHR, default max_length and empty array --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $statement = oci_parse($c, 'SELECT user FROM v$session'); diff --git a/ext/oci8/tests/array_bind_014.phpt b/ext/oci8/tests/array_bind_014.phpt index 51224bc3e0..ca5823bc0f 100644 --- a/ext/oci8/tests/array_bind_014.phpt +++ b/ext/oci8/tests/array_bind_014.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and NUMBERs --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_bdouble.phpt b/ext/oci8/tests/array_bind_bdouble.phpt index d3f3490356..5b9b433afe 100644 --- a/ext/oci8/tests/array_bind_bdouble.phpt +++ b/ext/oci8/tests/array_bind_bdouble.phpt @@ -3,13 +3,13 @@ Unsupported type: oci_bind_array_by_name() and SQLT_BDOUBLE --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (!defined('SQLT_BDOUBLE')) die('skip SQLT_BDOUBLE type not available on older Oracle clients'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $statement = oci_parse($c, "BEGIN array_bind_bdouble_pkg.iobind(:c1); END;"); $array = Array(1.243,2.5658,3.4234,4.2123,5.9999); diff --git a/ext/oci8/tests/array_bind_bfloat.phpt b/ext/oci8/tests/array_bind_bfloat.phpt index 4ec385f54f..598ea504d6 100644 --- a/ext/oci8/tests/array_bind_bfloat.phpt +++ b/ext/oci8/tests/array_bind_bfloat.phpt @@ -3,13 +3,13 @@ Unsupported type: oci_bind_array_by_name() and SQLT_BFLOAT --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (!defined('SQLT_BFLOAT')) die('skip SQLT_BFLOAT type not available on older Oracle clients'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $statement = oci_parse($c, "BEGIN array_bind_bfloat_pkg.iobind(:c1); END;"); $array = Array(1.243,2.5658,3.4234,4.2123,5.9999); diff --git a/ext/oci8/tests/array_bind_date.phpt b/ext/oci8/tests/array_bind_date.phpt index 75d2dbb3ba..c04703d446 100644 --- a/ext/oci8/tests/array_bind_date.phpt +++ b/ext/oci8/tests/array_bind_date.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_ODT --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_date1.phpt b/ext/oci8/tests/array_bind_date1.phpt index c0228539a1..5d5d6bdeb6 100644 --- a/ext/oci8/tests/array_bind_date1.phpt +++ b/ext/oci8/tests/array_bind_date1.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_ODT --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_float.phpt b/ext/oci8/tests/array_bind_float.phpt index dbd1437696..7b6dfc680c 100644 --- a/ext/oci8/tests/array_bind_float.phpt +++ b/ext/oci8/tests/array_bind_float.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_FLT --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_float1.phpt b/ext/oci8/tests/array_bind_float1.phpt index c342c0eb58..8fbb694228 100644 --- a/ext/oci8/tests/array_bind_float1.phpt +++ b/ext/oci8/tests/array_bind_float1.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_FLT --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_int.phpt b/ext/oci8/tests/array_bind_int.phpt index 19fa3bf2ac..6a6d709e38 100644 --- a/ext/oci8/tests/array_bind_int.phpt +++ b/ext/oci8/tests/array_bind_int.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_INT --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_int1.phpt b/ext/oci8/tests/array_bind_int1.phpt index b730cb2f20..6fa8c5ce69 100644 --- a/ext/oci8/tests/array_bind_int1.phpt +++ b/ext/oci8/tests/array_bind_int1.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_INT --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_str.phpt b/ext/oci8/tests/array_bind_str.phpt index 70c148afcf..ee712d2b64 100644 --- a/ext/oci8/tests/array_bind_str.phpt +++ b/ext/oci8/tests/array_bind_str.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_CHR --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_str1.phpt b/ext/oci8/tests/array_bind_str1.phpt index aabed16d4f..2094e78ba5 100644 --- a/ext/oci8/tests/array_bind_str1.phpt +++ b/ext/oci8/tests/array_bind_str1.phpt @@ -3,12 +3,12 @@ oci_bind_array_by_name() and SQLT_CHR --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/array_bind_uin.phpt b/ext/oci8/tests/array_bind_uin.phpt index 2542ee27df..f35fce7c19 100644 --- a/ext/oci8/tests/array_bind_uin.phpt +++ b/ext/oci8/tests/array_bind_uin.phpt @@ -3,12 +3,12 @@ Unsupported type: oci_bind_array_by_name() and SQLT_UIN --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $statement = oci_parse($c, "BEGIN array_bind_uin_pkg.iobind(:c1); END;"); $array = Array(1.243,2.5658,3.4234,4.2123,5.9999); diff --git a/ext/oci8/tests/b47243_1.phpt b/ext/oci8/tests/b47243_1.phpt index 711c3f79c9..8e0b043518 100644 --- a/ext/oci8/tests/b47243_1.phpt +++ b/ext/oci8/tests/b47243_1.phpt @@ -3,12 +3,12 @@ Bug #47243 (Crash on exit with ZTS mode) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/b47243_2.phpt b/ext/oci8/tests/b47243_2.phpt index 0a71760b60..faf61e6c79 100644 --- a/ext/oci8/tests/b47243_2.phpt +++ b/ext/oci8/tests/b47243_2.phpt @@ -3,12 +3,12 @@ Bug #47243 (Crash on exit with ZTS mode) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/b47243_3.phpt b/ext/oci8/tests/b47243_3.phpt index 20e94b7676..74eadc8df9 100644 --- a/ext/oci8/tests/b47243_3.phpt +++ b/ext/oci8/tests/b47243_3.phpt @@ -3,12 +3,12 @@ Bug #47243 (Crash on exit with ZTS mode) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/bind_boolean_1.phpt b/ext/oci8/tests/bind_boolean_1.phpt index 35da536c05..7c77187056 100644 --- a/ext/oci8/tests/bind_boolean_1.phpt +++ b/ext/oci8/tests/bind_boolean_1.phpt @@ -3,7 +3,7 @@ Basic PL/SQL "BOOLEAN" (SQLT_BOL) bind test --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -16,7 +16,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index 477bb1422f..fbd1d65bd2 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -3,7 +3,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { @@ -15,7 +15,7 @@ NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt index 7a97213cad..ea49c96b75 100644 --- a/ext/oci8/tests/bind_char_1_11gR1.phpt +++ b/ext/oci8/tests/bind_char_1_11gR1.phpt @@ -3,7 +3,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] < 12)) { @@ -17,7 +17,7 @@ NLS_LANG=.AL32UTF8 // Output is for 32 bit client to 64bit 11.1.0.6 -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt index 5ab03553b7..8200dcf368 100644 --- a/ext/oci8/tests/bind_char_2.phpt +++ b/ext/oci8/tests/bind_char_2.phpt @@ -3,7 +3,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { @@ -15,7 +15,7 @@ NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt index 00831111b6..3ee9648221 100644 --- a/ext/oci8/tests/bind_char_2_11gR1.phpt +++ b/ext/oci8/tests/bind_char_2_11gR1.phpt @@ -3,7 +3,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] < 12)) { @@ -15,7 +15,7 @@ NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt index 8c86d4dfae..f4d8c1f242 100644 --- a/ext/oci8/tests/bind_char_3.phpt +++ b/ext/oci8/tests/bind_char_3.phpt @@ -3,7 +3,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { @@ -15,7 +15,7 @@ NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt index 3c3d3b36dc..1adcae2a74 100644 --- a/ext/oci8/tests/bind_char_3_11gR1.phpt +++ b/ext/oci8/tests/bind_char_3_11gR1.phpt @@ -3,7 +3,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] < 12)) { @@ -15,7 +15,7 @@ NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt index 60d7ac6c9f..218f0b03cf 100644 --- a/ext/oci8/tests/bind_char_4.phpt +++ b/ext/oci8/tests/bind_char_4.phpt @@ -3,7 +3,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { @@ -17,7 +17,7 @@ NLS_LANG=.AL32UTF8 // Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt index 9bc0ddf428..51350e533e 100644 --- a/ext/oci8/tests/bind_char_4_11gR1.phpt +++ b/ext/oci8/tests/bind_char_4_11gR1.phpt @@ -3,7 +3,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] < 12)) { @@ -17,7 +17,7 @@ NLS_LANG=.AL32UTF8 // Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_empty.phpt b/ext/oci8/tests/bind_empty.phpt index 90e7679371..ae8cbbca2d 100644 --- a/ext/oci8/tests/bind_empty.phpt +++ b/ext/oci8/tests/bind_empty.phpt @@ -5,7 +5,7 @@ binding empty values --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table bind_empty_tab"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/bind_long.phpt b/ext/oci8/tests/bind_long.phpt index ca19e7edfd..7dc1c0db23 100644 --- a/ext/oci8/tests/bind_long.phpt +++ b/ext/oci8/tests/bind_long.phpt @@ -3,12 +3,12 @@ bind LONG field --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmt = oci_parse($c, "drop table phptestlng"); @oci_execute($stmt); @@ -20,7 +20,7 @@ echo "Test 1\n"; $stmt = oci_parse ($c, "insert into phptestlng (id, filetxt) values (:id, :filetxt)"); $i=1; -$filetxt1 = file_get_contents( dirname(__FILE__)."/test.txt"); +$filetxt1 = file_get_contents( __DIR__."/test.txt"); $filetxt = str_replace("\r", "", $filetxt1); oci_bind_by_name( $stmt, ":id", $i, -1); diff --git a/ext/oci8/tests/bind_long_raw.phpt b/ext/oci8/tests/bind_long_raw.phpt index d1a903899c..d008604812 100644 --- a/ext/oci8/tests/bind_long_raw.phpt +++ b/ext/oci8/tests/bind_long_raw.phpt @@ -3,19 +3,19 @@ bind LONG RAW field --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $stmt = oci_parse($c, "create table phptestlngraw( id number(10), fileimage long raw)"); oci_execute($stmt); $stmt = oci_parse ($c, "insert into phptestlngraw (id, fileimage) values (:id, :fileimage)"); $i=1; -$fileimage = file_get_contents( dirname(__FILE__)."/test.gif"); +$fileimage = file_get_contents( __DIR__."/test.gif"); oci_bind_by_name( $stmt, ":id", $i, -1); oci_bind_by_name( $stmt, ":fileimage", $fileimage, -1, SQLT_LBI); diff --git a/ext/oci8/tests/bind_misccoltypes.phpt b/ext/oci8/tests/bind_misccoltypes.phpt index cc2a269aee..0cc307b4d4 100644 --- a/ext/oci8/tests/bind_misccoltypes.phpt +++ b/ext/oci8/tests/bind_misccoltypes.phpt @@ -3,12 +3,12 @@ Bind miscellaneous column types using default types --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_misccoltypes_errs.phpt b/ext/oci8/tests/bind_misccoltypes_errs.phpt index d1ba41b2c3..5c443d0f69 100644 --- a/ext/oci8/tests/bind_misccoltypes_errs.phpt +++ b/ext/oci8/tests/bind_misccoltypes_errs.phpt @@ -5,7 +5,7 @@ Bind miscellaneous column types and generating errors --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_number.phpt b/ext/oci8/tests/bind_number.phpt index 0fc5fedfa4..429bbe0ef7 100644 --- a/ext/oci8/tests/bind_number.phpt +++ b/ext/oci8/tests/bind_number.phpt @@ -9,7 +9,7 @@ precision = 14 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_query.phpt b/ext/oci8/tests/bind_query.phpt index df1d0204cb..12e58d3e33 100644 --- a/ext/oci8/tests/bind_query.phpt +++ b/ext/oci8/tests/bind_query.phpt @@ -5,7 +5,7 @@ Bind with various WHERE conditions --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_raw.phpt b/ext/oci8/tests/bind_raw.phpt index a6e6259eef..dca9730ccb 100644 --- a/ext/oci8/tests/bind_raw.phpt +++ b/ext/oci8/tests/bind_raw.phpt @@ -3,19 +3,19 @@ bind RAW field --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $stmt = oci_parse($c, "create table phptestrawtable( id number(10), fileimage raw(1000))"); oci_execute($stmt); $stmt = oci_parse ($c, "insert into phptestrawtable (id, fileimage) values (:id, :fileimage)"); $i=1; -$fileimage = file_get_contents( dirname(__FILE__)."/test.gif"); +$fileimage = file_get_contents( __DIR__."/test.gif"); $fileimage = substr($fileimage, 0, 300); oci_bind_by_name( $stmt, ":id", $i, -1); diff --git a/ext/oci8/tests/bind_raw_2.phpt b/ext/oci8/tests/bind_raw_2.phpt index d30219acdd..5195b1ca89 100644 --- a/ext/oci8/tests/bind_raw_2.phpt +++ b/ext/oci8/tests/bind_raw_2.phpt @@ -3,19 +3,19 @@ bind RAW field with OCI_B_BIN --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $stmt = oci_parse($c, "create table phptestrawtable( id number(10), fileimage raw(1000))"); oci_execute($stmt); $stmt = oci_parse ($c, "insert into phptestrawtable (id, fileimage) values (:id, :fileimage)"); $i=1; -$fileimage = file_get_contents( dirname(__FILE__)."/test.gif"); +$fileimage = file_get_contents( __DIR__."/test.gif"); $fileimage = substr($fileimage, 0, 300); oci_bind_by_name( $stmt, ":id", $i, -1); diff --git a/ext/oci8/tests/bind_rowid.phpt b/ext/oci8/tests/bind_rowid.phpt index 122ad5e18e..40e5b5e90e 100644 --- a/ext/oci8/tests/bind_rowid.phpt +++ b/ext/oci8/tests/bind_rowid.phpt @@ -5,7 +5,7 @@ Test ROWID bind --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); function do_query($c) { diff --git a/ext/oci8/tests/bind_sqltafc.phpt b/ext/oci8/tests/bind_sqltafc.phpt index 8243851eb3..90bd38f445 100644 --- a/ext/oci8/tests/bind_sqltafc.phpt +++ b/ext/oci8/tests/bind_sqltafc.phpt @@ -5,7 +5,7 @@ Bind tests with SQLT_AFC --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_sqltchr_1.phpt b/ext/oci8/tests/bind_sqltchr_1.phpt index a5c6d77b67..b8c460ca79 100644 --- a/ext/oci8/tests/bind_sqltchr_1.phpt +++ b/ext/oci8/tests/bind_sqltchr_1.phpt @@ -5,7 +5,7 @@ Bind with SQLT_CHR --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_sqltchr_2.phpt b/ext/oci8/tests/bind_sqltchr_2.phpt index e459d2270c..fae96d8925 100644 --- a/ext/oci8/tests/bind_sqltchr_2.phpt +++ b/ext/oci8/tests/bind_sqltchr_2.phpt @@ -5,7 +5,7 @@ PL/SQL bind with SQLT_CHR --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_sqltint.phpt b/ext/oci8/tests/bind_sqltint.phpt index dfefe3d7ed..0924652155 100644 --- a/ext/oci8/tests/bind_sqltint.phpt +++ b/ext/oci8/tests/bind_sqltint.phpt @@ -5,7 +5,7 @@ Bind with SQLT_INT --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_sqltnum.phpt b/ext/oci8/tests/bind_sqltnum.phpt index 5e75a176a8..b8742ee8a8 100644 --- a/ext/oci8/tests/bind_sqltnum.phpt +++ b/ext/oci8/tests/bind_sqltnum.phpt @@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_sqltnum_11g.phpt b/ext/oci8/tests/bind_sqltnum_11g.phpt index 3f4a1411a8..7ef1549120 100644 --- a/ext/oci8/tests/bind_sqltnum_11g.phpt +++ b/ext/oci8/tests/bind_sqltnum_11g.phpt @@ -11,7 +11,7 @@ if (!(isset($matches[0]) && $matches[0] <= 11)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bind_unsupported_1.phpt b/ext/oci8/tests/bind_unsupported_1.phpt index ba125d99fc..f8ae599c42 100644 --- a/ext/oci8/tests/bind_unsupported_1.phpt +++ b/ext/oci8/tests/bind_unsupported_1.phpt @@ -5,7 +5,7 @@ Bind with various unsupported bind types --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // These types are defined in oci8.c diff --git a/ext/oci8/tests/bind_unsupported_2.phpt b/ext/oci8/tests/bind_unsupported_2.phpt index 9d0a33df6a..fefd57d148 100644 --- a/ext/oci8/tests/bind_unsupported_2.phpt +++ b/ext/oci8/tests/bind_unsupported_2.phpt @@ -7,7 +7,7 @@ if (!extension_loaded('oci8')) die("skip no oci8 extension"); --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $types = array( "SQLT_BDOUBLE" => SQLT_BDOUBLE, diff --git a/ext/oci8/tests/bind_unsupported_3.phpt b/ext/oci8/tests/bind_unsupported_3.phpt index 48b719aa54..4fe9e0819c 100644 --- a/ext/oci8/tests/bind_unsupported_3.phpt +++ b/ext/oci8/tests/bind_unsupported_3.phpt @@ -3,12 +3,12 @@ Bind with various bind types not supported by TimesTen --SKIPIF-- <?php $target_dbs = array('oracledb' => false, 'timesten' => true); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $types = array( "SQLT_CLOB" => SQLT_CLOB, diff --git a/ext/oci8/tests/bug26133.phpt b/ext/oci8/tests/bug26133.phpt index 2da5d483d0..1df68ad2d9 100644 --- a/ext/oci8/tests/bug26133.phpt +++ b/ext/oci8/tests/bug26133.phpt @@ -5,7 +5,7 @@ Bug #26133 (ocifreedesc() segfault) --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialize diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt index 3058c1bcae..6310185b7f 100644 --- a/ext/oci8/tests/bug27303_1.phpt +++ b/ext/oci8/tests/bug27303_1.phpt @@ -3,7 +3,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { @@ -15,7 +15,7 @@ NLS_LANG= --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt index f7e224f45c..1c9296bef8 100644 --- a/ext/oci8/tests/bug27303_1_11gR1.phpt +++ b/ext/oci8/tests/bug27303_1_11gR1.phpt @@ -3,7 +3,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] < 12)) { @@ -13,7 +13,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index 76188153e5..039f0e4acc 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -3,7 +3,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { @@ -15,7 +15,7 @@ NLS_LANG= --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt index 0a0cc44845..4c9a175edd 100644 --- a/ext/oci8/tests/bug27303_2_11gR1.phpt +++ b/ext/oci8/tests/bug27303_2_11gR1.phpt @@ -3,7 +3,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] < 12)) { @@ -15,7 +15,7 @@ NLS_LANG= --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $stmtarray = array( "drop sequence myseq", diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt index aafdf61e73..dfc85e08b7 100644 --- a/ext/oci8/tests/bug27303_3.phpt +++ b/ext/oci8/tests/bug27303_3.phpt @@ -5,7 +5,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $create_st = array(); $create_st[] = "drop sequence myseq"; diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index a88f29807d..5ee7090428 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/ext/oci8/tests/bug27303_4.phpt @@ -3,7 +3,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { @@ -15,7 +15,7 @@ NLS_LANG= --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $create_st = array(); $create_st[] = "drop sequence myseq"; diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt index ff21d23a2a..290f26d764 100644 --- a/ext/oci8/tests/bug27303_4_11gR1.phpt +++ b/ext/oci8/tests/bug27303_4_11gR1.phpt @@ -3,7 +3,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // The bind buffer size edge cases seem to change each DB version. preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] < 12)) { @@ -13,7 +13,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) { --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $create_st = array(); $create_st[] = "drop sequence myseq"; diff --git a/ext/oci8/tests/bug32325.phpt b/ext/oci8/tests/bug32325.phpt index 925433659b..1dbe8cc6ce 100644 --- a/ext/oci8/tests/bug32325.phpt +++ b/ext/oci8/tests/bug32325.phpt @@ -3,12 +3,12 @@ Bug #32325 (Cannot retrieve collection using OCI8) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialize diff --git a/ext/oci8/tests/bug35973.phpt b/ext/oci8/tests/bug35973.phpt index 4c000d022b..681498b810 100644 --- a/ext/oci8/tests/bug35973.phpt +++ b/ext/oci8/tests/bug35973.phpt @@ -3,12 +3,12 @@ Bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB field) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $s1 = oci_parse($c, "drop table test_nclob"); @oci_execute($s1); diff --git a/ext/oci8/tests/bug36010.phpt b/ext/oci8/tests/bug36010.phpt index cd68b66f34..83288dd355 100644 --- a/ext/oci8/tests/bug36010.phpt +++ b/ext/oci8/tests/bug36010.phpt @@ -3,12 +3,12 @@ Bug #36010 (Crash when executing SQL statement with lob parameter twice) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; function f($conn) { diff --git a/ext/oci8/tests/bug36096.phpt b/ext/oci8/tests/bug36096.phpt index 2ec366b46a..1cf5e9106c 100644 --- a/ext/oci8/tests/bug36096.phpt +++ b/ext/oci8/tests/bug36096.phpt @@ -5,7 +5,7 @@ Bug #36096 (oci_result() returns garbage after oci_fetch() failed) --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $sql = "SELECT 'ABC' FROM DUAL WHERE 1<>1"; $stmt = oci_parse($c, $sql); diff --git a/ext/oci8/tests/bug36403.phpt b/ext/oci8/tests/bug36403.phpt index 96ca57380f..0f3b53b923 100644 --- a/ext/oci8/tests/bug36403.phpt +++ b/ext/oci8/tests/bug36403.phpt @@ -7,7 +7,7 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension"); --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bug37220.phpt b/ext/oci8/tests/bug37220.phpt index fb62f9df4e..11ee2b23b6 100644 --- a/ext/oci8/tests/bug37220.phpt +++ b/ext/oci8/tests/bug37220.phpt @@ -3,12 +3,12 @@ Bug #37220 (LOB Type mismatch when using windows & oci8.dll) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Initialization diff --git a/ext/oci8/tests/bug37581.phpt b/ext/oci8/tests/bug37581.phpt index 642414f9a3..a33ef77c79 100644 --- a/ext/oci8/tests/bug37581.phpt +++ b/ext/oci8/tests/bug37581.phpt @@ -3,12 +3,12 @@ Bug #37581 (oci_bind_array_by_name clobbers input array when using SQLT_AFC, AVC --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $p1 = "create or replace package BUG37581_PKG as type str_array is table of char(2) index by binary_integer; diff --git a/ext/oci8/tests/bug38161.phpt b/ext/oci8/tests/bug38161.phpt index 4187de8fed..32418cb03b 100644 --- a/ext/oci8/tests/bug38161.phpt +++ b/ext/oci8/tests/bug38161.phpt @@ -5,7 +5,7 @@ Bug #38161 (oci_bind_by_name() returns garbage when Oracle didn't set the variab --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $query = "begin if false then :bv := 1; end if; end;"; $stid = oci_parse($c, $query); diff --git a/ext/oci8/tests/bug38173.phpt b/ext/oci8/tests/bug38173.phpt index dd11315b67..2d4cb7c33b 100644 --- a/ext/oci8/tests/bug38173.phpt +++ b/ext/oci8/tests/bug38173.phpt @@ -3,12 +3,12 @@ Bug #38173 (Freeing nested cursors causes OCI8 to segfault) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $create_1 = "CREATE TABLE t1 (id INTEGER)"; $create_2 = "CREATE TABLE t2 (id INTEGER)"; diff --git a/ext/oci8/tests/bug40078.phpt b/ext/oci8/tests/bug40078.phpt index 9fdcb14b7d..0887c83b09 100644 --- a/ext/oci8/tests/bug40078.phpt +++ b/ext/oci8/tests/bug40078.phpt @@ -3,12 +3,12 @@ Bug #40078 (ORA-01405 when fetching NULL values using oci_bind_array_by_name()) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $create_pkg = " CREATE OR REPLACE PACKAGE BUG40078_PKG AS diff --git a/ext/oci8/tests/bug40415.phpt b/ext/oci8/tests/bug40415.phpt index 0530c9c593..1de1f2b40a 100644 --- a/ext/oci8/tests/bug40415.phpt +++ b/ext/oci8/tests/bug40415.phpt @@ -3,12 +3,12 @@ Bug #40415 (Using oci_fetchall with nested cursors) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; // Setup diff --git a/ext/oci8/tests/bug41069.phpt b/ext/oci8/tests/bug41069.phpt index a7606819f3..af322ba7d1 100644 --- a/ext/oci8/tests/bug41069.phpt +++ b/ext/oci8/tests/bug41069.phpt @@ -3,7 +3,7 @@ Bug #41069 (Oracle crash with certain data over a DB-link when prefetch memory l --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (empty($dbase)) die ("skip requires network connection alias for DB link loopback"); if ($test_drcp) die("skip DRCP does not support shared database links"); ?> @@ -12,7 +12,7 @@ oci8.default_prefetch=5 --FILE-- <?php - require(dirname(__FILE__).'/connect.inc'); + require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bug42134.phpt b/ext/oci8/tests/bug42134.phpt index 63091100a1..d1e0b97c84 100644 --- a/ext/oci8/tests/bug42134.phpt +++ b/ext/oci8/tests/bug42134.phpt @@ -3,12 +3,12 @@ Bug #42134 (Collection error for invalid collection name) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Test collection creation error for normal connection diff --git a/ext/oci8/tests/bug42173.phpt b/ext/oci8/tests/bug42173.phpt index 67196dafda..33e1adaae4 100644 --- a/ext/oci8/tests/bug42173.phpt +++ b/ext/oci8/tests/bug42173.phpt @@ -3,12 +3,12 @@ Bug #42173 (TIMESTAMP and INTERVAL query and field functions) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $stmts = array( diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt index ed64b389f0..b3d6cf0203 100644 --- a/ext/oci8/tests/bug42496_1.phpt +++ b/ext/oci8/tests/bug42496_1.phpt @@ -3,13 +3,13 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Initialization diff --git a/ext/oci8/tests/bug42496_2.phpt b/ext/oci8/tests/bug42496_2.phpt index 4dff86cc6c..bcb4076601 100644 --- a/ext/oci8/tests/bug42496_2.phpt +++ b/ext/oci8/tests/bug42496_2.phpt @@ -3,13 +3,13 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Initialization diff --git a/ext/oci8/tests/bug42841.phpt b/ext/oci8/tests/bug42841.phpt index 140403ce27..eade55fc02 100644 --- a/ext/oci8/tests/bug42841.phpt +++ b/ext/oci8/tests/bug42841.phpt @@ -3,14 +3,14 @@ Bug #42841 (REF CURSOR and oci_new_cursor PHP crash) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --INI-- oci8.statement_cache_size=20 --FILE-- <?php -require dirname(__FILE__).'/details.inc'; +require __DIR__.'/details.inc'; // note a oci_new_connect() occurs lower in the script $c = oci_connect($user, $password, $dbase); diff --git a/ext/oci8/tests/bug43492.phpt b/ext/oci8/tests/bug43492.phpt index 7c91ea22b6..27eed00b0a 100644 --- a/ext/oci8/tests/bug43492.phpt +++ b/ext/oci8/tests/bug43492.phpt @@ -3,12 +3,12 @@ Bug #43492 (Nested cursor leaks) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $stmtarray = array( "DROP table bug43492_tab", diff --git a/ext/oci8/tests/bug43492_2.phpt b/ext/oci8/tests/bug43492_2.phpt index d0bab520f5..03b4c31382 100644 --- a/ext/oci8/tests/bug43492_2.phpt +++ b/ext/oci8/tests/bug43492_2.phpt @@ -3,7 +3,7 @@ Bug #43492 (Nested cursor leaks after related bug #44206 fixed) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php @@ -12,7 +12,7 @@ require(dirname(__FILE__).'/skipif.inc'); // Now that bug 44206 is fixed an automatic clean up will occur - // though it is still recommended in practice. -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $stmtarray = array( "DROP table bug43492_tab", diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt index 618836da58..29ff9e6a5c 100644 --- a/ext/oci8/tests/bug43497.phpt +++ b/ext/oci8/tests/bug43497.phpt @@ -3,13 +3,13 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; function sessionid($c) // determines and returns current session ID { diff --git a/ext/oci8/tests/bug44008.phpt b/ext/oci8/tests/bug44008.phpt index c9930f2439..0b031aef90 100644 --- a/ext/oci8/tests/bug44008.phpt +++ b/ext/oci8/tests/bug44008.phpt @@ -3,12 +3,12 @@ Bug #44008 (Incorrect usage of OCI-Lob->close crashes PHP) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Initialization diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt index d05a86b52c..8a48d6aff0 100644 --- a/ext/oci8/tests/bug44113.phpt +++ b/ext/oci8/tests/bug44113.phpt @@ -3,13 +3,13 @@ Bug #44113 (New collection creation can fail with OCI-22303) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bug44206.phpt b/ext/oci8/tests/bug44206.phpt index 20c92b0f64..069a840423 100644 --- a/ext/oci8/tests/bug44206.phpt +++ b/ext/oci8/tests/bug44206.phpt @@ -3,12 +3,12 @@ Bug #44206 (Test if selecting ref cursors leads to ORA-1000 maximum open cursors --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Run Test diff --git a/ext/oci8/tests/bug45458.phpt b/ext/oci8/tests/bug45458.phpt index b257f1fc09..3a4b514857 100644 --- a/ext/oci8/tests/bug45458.phpt +++ b/ext/oci8/tests/bug45458.phpt @@ -5,7 +5,7 @@ Bug #45458 (OCI8: Numeric keys for associative arrays are not handled properly) --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/bug46994.phpt b/ext/oci8/tests/bug46994.phpt index 63ddbd0150..079f5df6c4 100644 --- a/ext/oci8/tests/bug46994.phpt +++ b/ext/oci8/tests/bug46994.phpt @@ -3,12 +3,12 @@ Bug #46994 (CLOB size does not update when using CLOB IN OUT param in stored pro --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bug47189.phpt b/ext/oci8/tests/bug47189.phpt index 07c3a9e338..a5b5217ac5 100644 --- a/ext/oci8/tests/bug47189.phpt +++ b/ext/oci8/tests/bug47189.phpt @@ -3,12 +3,12 @@ Bug #47189 (Multiple oci_fetch_all calls) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error handling for this undefined behavior -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); echo "Test 1\n"; diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt index e7b6dc43cc..01b273129c 100644 --- a/ext/oci8/tests/bug47281.phpt +++ b/ext/oci8/tests/bug47281.phpt @@ -3,7 +3,7 @@ Bug #47281 ($php_errormsg is limited in size of characters) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); // error3.phpt obsoletes this test for newer Oracle client versions // Assume runtime client version is >= compile time client version preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches); @@ -18,7 +18,7 @@ NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bug47281_tt.phpt b/ext/oci8/tests/bug47281_tt.phpt index 687655fe8c..acb1eef55e 100644 --- a/ext/oci8/tests/bug47281_tt.phpt +++ b/ext/oci8/tests/bug47281_tt.phpt @@ -3,14 +3,14 @@ Bug #47281 ($php_errormsg is limited in size of characters) --SKIPIF-- <?php $target_dbs = array('oracledb' => false, 'timesten' => true); // test runs on these DBs: shorter message length in TimesTen -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --ENV-- NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/bug51253.phpt b/ext/oci8/tests/bug51253.phpt index 21a0cf8a3f..9b6da41019 100644 --- a/ext/oci8/tests/bug51253.phpt +++ b/ext/oci8/tests/bug51253.phpt @@ -3,12 +3,12 @@ Bug #51253 (oci_bind_array_by_name() array references) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $drop = "DROP table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/bug51291_1.phpt b/ext/oci8/tests/bug51291_1.phpt index 4fa2e23995..406d9b5dcd 100644 --- a/ext/oci8/tests/bug51291_1.phpt +++ b/ext/oci8/tests/bug51291_1.phpt @@ -5,7 +5,7 @@ Bug #51291 (oci_error() doesn't report last error when called two times) --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); echo "Test 1 - Parse\n"; diff --git a/ext/oci8/tests/bug51291_2.phpt b/ext/oci8/tests/bug51291_2.phpt index d2c84af2c4..c39eefbbdc 100644 --- a/ext/oci8/tests/bug51291_2.phpt +++ b/ext/oci8/tests/bug51291_2.phpt @@ -3,12 +3,12 @@ Bug #51291 (oci_error() doesn't report last error when called two times) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); echo "\nTest 1 - Execute - after successful 2nd query with same statement\n"; diff --git a/ext/oci8/tests/bug68298.phpt b/ext/oci8/tests/bug68298.phpt index e05a6ad949..ed15b84997 100644 --- a/ext/oci8/tests/bug68298.phpt +++ b/ext/oci8/tests/bug68298.phpt @@ -8,7 +8,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $stmtarray = array( "DROP TABLE BUG68298", diff --git a/ext/oci8/tests/bug70700.phpt b/ext/oci8/tests/bug70700.phpt index 5633673406..374163d17e 100644 --- a/ext/oci8/tests/bug70700.phpt +++ b/ext/oci8/tests/bug70700.phpt @@ -8,13 +8,13 @@ ashnazg@php.net <?php if (!extension_loaded('mbstring')) die('skip mbstring is not enabled'); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --ENV-- NLS_LANG=.AL32UTF8 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $stmt = oci_parse($c, 'DROP TABLE oci8_bug70700'); diff --git a/ext/oci8/tests/bug71148.phpt b/ext/oci8/tests/bug71148.phpt index 204aab3c80..838dbc4fbb 100644 --- a/ext/oci8/tests/bug71148.phpt +++ b/ext/oci8/tests/bug71148.phpt @@ -3,12 +3,12 @@ Bug #71448 (Binding reference overwritten on php7) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => true); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialize diff --git a/ext/oci8/tests/bug71422.phpt b/ext/oci8/tests/bug71422.phpt index b294b46dad..6896c5de0d 100644 --- a/ext/oci8/tests/bug71422.phpt +++ b/ext/oci8/tests/bug71422.phpt @@ -7,7 +7,7 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension"); --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $stmtarray = array( "DROP TABLE BUG71422_TEST", diff --git a/ext/oci8/tests/bug71600.phpt b/ext/oci8/tests/bug71600.phpt index fc548d26c1..9cf9f2e971 100644 --- a/ext/oci8/tests/bug71600.phpt +++ b/ext/oci8/tests/bug71600.phpt @@ -3,12 +3,12 @@ Bug #71600 (oci_fetch_all result in segfault when select more than 8 columns) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => true); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialize diff --git a/ext/oci8/tests/bug72524.phpt b/ext/oci8/tests/bug72524.phpt index b48ec513ed..f696277f86 100644 --- a/ext/oci8/tests/bug72524.phpt +++ b/ext/oci8/tests/bug72524.phpt @@ -3,12 +3,12 @@ Bug #72524 (Binding null values triggers ORA-24816 error) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => true); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialize diff --git a/ext/oci8/tests/bug74625.phpt b/ext/oci8/tests/bug74625.phpt index f3bc7ac60a..9bcaf29788 100644 --- a/ext/oci8/tests/bug74625.phpt +++ b/ext/oci8/tests/bug74625.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/calltimeout1.phpt b/ext/oci8/tests/calltimeout1.phpt index 4411ed0f2c..123e51561a 100644 --- a/ext/oci8/tests/calltimeout1.phpt +++ b/ext/oci8/tests/calltimeout1.phpt @@ -5,7 +5,7 @@ oci_set_call_timeout: test timing out if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a user with access to DBMS_LOCK"); } @@ -18,7 +18,7 @@ if (!(isset($matches[0]) && $matches[0] >= 18)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); function mysleep($c, $t) { diff --git a/ext/oci8/tests/close.phpt b/ext/oci8/tests/close.phpt index 6f9d2b8473..d16498bfad 100644 --- a/ext/oci8/tests/close.phpt +++ b/ext/oci8/tests/close.phpt @@ -5,7 +5,7 @@ connect/close/connect --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; oci_close($c); diff --git a/ext/oci8/tests/coll_001.phpt b/ext/oci8/tests/coll_001.phpt index 0b9ddcccc2..4454ecc548 100644 --- a/ext/oci8/tests/coll_001.phpt +++ b/ext/oci8/tests/coll_001.phpt @@ -3,20 +3,20 @@ oci_new_collection() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; var_dump(oci_new_collection($c, $type_name)); var_dump(oci_new_collection($c, "NONEXISTENT")); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_002.phpt b/ext/oci8/tests/coll_002.phpt index 6e9ce4bcf1..2de2d2b125 100644 --- a/ext/oci8/tests/coll_002.phpt +++ b/ext/oci8/tests/coll_002.phpt @@ -3,13 +3,13 @@ oci_new_collection() + free() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; var_dump($coll1 = oci_new_collection($c, $type_name)); @@ -18,7 +18,7 @@ var_dump($coll1->size()); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_002_func.phpt b/ext/oci8/tests/coll_002_func.phpt index 51fac181b9..4eb246705b 100644 --- a/ext/oci8/tests/coll_002_func.phpt +++ b/ext/oci8/tests/coll_002_func.phpt @@ -3,13 +3,13 @@ oci_new_collection() + free() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; var_dump($coll1 = oci_new_collection($c, $type_name)); @@ -18,7 +18,7 @@ var_dump(oci_collection_size($coll1)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_003.phpt b/ext/oci8/tests/coll_003.phpt index c7e2f4065c..c92adecdb4 100644 --- a/ext/oci8/tests/coll_003.phpt +++ b/ext/oci8/tests/coll_003.phpt @@ -3,13 +3,13 @@ collection methods --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; $coll1 = oci_new_collection($c, $type_name); @@ -22,7 +22,7 @@ var_dump($coll1->assignElem(0,2)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_003_func.phpt b/ext/oci8/tests/coll_003_func.phpt index 2450fd738b..d6058dcfab 100644 --- a/ext/oci8/tests/coll_003_func.phpt +++ b/ext/oci8/tests/coll_003_func.phpt @@ -3,13 +3,13 @@ collection methods --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; $coll1 = oci_new_collection($c, $type_name); @@ -22,7 +22,7 @@ var_dump(oci_collection_element_assign($coll1, 0, 2)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_004.phpt b/ext/oci8/tests/coll_004.phpt index b8bec375e1..e4aec166a5 100644 --- a/ext/oci8/tests/coll_004.phpt +++ b/ext/oci8/tests/coll_004.phpt @@ -3,13 +3,13 @@ oci_collection_assign() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; $coll1 = oci_new_collection($c, $type_name); $coll2 = oci_new_collection($c, $type_name); @@ -22,7 +22,7 @@ var_dump($coll2->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_004_func.phpt b/ext/oci8/tests/coll_004_func.phpt index 1061dbac11..8aa4234773 100644 --- a/ext/oci8/tests/coll_004_func.phpt +++ b/ext/oci8/tests/coll_004_func.phpt @@ -3,13 +3,13 @@ oci_collection_assign() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; $coll1 = oci_new_collection($c, $type_name); $coll2 = oci_new_collection($c, $type_name); @@ -22,7 +22,7 @@ var_dump(oci_collection_element_get($coll2, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_005.phpt b/ext/oci8/tests/coll_005.phpt index 27ed72a1df..72fdbfd9da 100644 --- a/ext/oci8/tests/coll_005.phpt +++ b/ext/oci8/tests/coll_005.phpt @@ -3,20 +3,20 @@ ocinewcollection() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; var_dump(ocinewcollection($c, $type_name)); var_dump(ocinewcollection($c, "NONEXISTENT")); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_006.phpt b/ext/oci8/tests/coll_006.phpt index 12e890a536..cc69f9b506 100644 --- a/ext/oci8/tests/coll_006.phpt +++ b/ext/oci8/tests/coll_006.phpt @@ -3,13 +3,13 @@ ocinewcollection() + free() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; var_dump($coll1 = ocinewcollection($c, $type_name)); @@ -18,7 +18,7 @@ var_dump($coll1->size()); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_006_func.phpt b/ext/oci8/tests/coll_006_func.phpt index 583e0bb6a3..7bd1152f2c 100644 --- a/ext/oci8/tests/coll_006_func.phpt +++ b/ext/oci8/tests/coll_006_func.phpt @@ -3,13 +3,13 @@ ocinewcollection() + free() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; var_dump($coll1 = ocinewcollection($c, $type_name)); @@ -18,7 +18,7 @@ var_dump(oci_collection_size($coll1)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_007.phpt b/ext/oci8/tests/coll_007.phpt index 89ef9bd6ad..b3b05a5d9c 100644 --- a/ext/oci8/tests/coll_007.phpt +++ b/ext/oci8/tests/coll_007.phpt @@ -3,13 +3,13 @@ collection methods --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; $coll1 = ocinewcollection($c, $type_name); @@ -22,7 +22,7 @@ var_dump($coll1->assignElem(0,2)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_008.phpt b/ext/oci8/tests/coll_008.phpt index 18f8de4ab6..b85dc1e917 100644 --- a/ext/oci8/tests/coll_008.phpt +++ b/ext/oci8/tests/coll_008.phpt @@ -3,13 +3,13 @@ ocicollassign() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; $coll1 = ocinewcollection($c, $type_name); $coll2 = ocinewcollection($c, $type_name); @@ -22,7 +22,7 @@ var_dump($coll2->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_009.phpt b/ext/oci8/tests/coll_009.phpt index bb3f6aed75..e55a4a210c 100644 --- a/ext/oci8/tests/coll_009.phpt +++ b/ext/oci8/tests/coll_009.phpt @@ -3,12 +3,12 @@ collections and wrong dates --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump($coll2->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_009_func.phpt b/ext/oci8/tests/coll_009_func.phpt index 38573bd3a8..fca04599e2 100644 --- a/ext/oci8/tests/coll_009_func.phpt +++ b/ext/oci8/tests/coll_009_func.phpt @@ -3,12 +3,12 @@ collections and wrong dates --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump(oci_collection_element_get($coll2, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_010.phpt b/ext/oci8/tests/coll_010.phpt index 620872c206..33e1b6fd18 100644 --- a/ext/oci8/tests/coll_010.phpt +++ b/ext/oci8/tests/coll_010.phpt @@ -3,12 +3,12 @@ collections and nulls --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump($coll2->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_010_func.phpt b/ext/oci8/tests/coll_010_func.phpt index 75a6c1209c..2f67283538 100644 --- a/ext/oci8/tests/coll_010_func.phpt +++ b/ext/oci8/tests/coll_010_func.phpt @@ -3,12 +3,12 @@ collections and nulls --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump(oci_collection_element_get($coll2, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_011.phpt b/ext/oci8/tests/coll_011.phpt index 220ed179a5..13c4613b00 100644 --- a/ext/oci8/tests/coll_011.phpt +++ b/ext/oci8/tests/coll_011.phpt @@ -3,12 +3,12 @@ collections and strings --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -35,7 +35,7 @@ var_dump($coll2->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_011_func.phpt b/ext/oci8/tests/coll_011_func.phpt index ff121d7820..bc6bd6ea73 100644 --- a/ext/oci8/tests/coll_011_func.phpt +++ b/ext/oci8/tests/coll_011_func.phpt @@ -3,12 +3,12 @@ collections and strings --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -35,7 +35,7 @@ var_dump(oci_collection_element_get($coll2, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_012.phpt b/ext/oci8/tests/coll_012.phpt index c99a5abb3a..615a3aad7a 100644 --- a/ext/oci8/tests/coll_012.phpt +++ b/ext/oci8/tests/coll_012.phpt @@ -3,12 +3,12 @@ collections and correct dates --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump($coll2->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_012_func.phpt b/ext/oci8/tests/coll_012_func.phpt index 1a20b37bc1..41a7084109 100644 --- a/ext/oci8/tests/coll_012_func.phpt +++ b/ext/oci8/tests/coll_012_func.phpt @@ -3,12 +3,12 @@ collections and correct dates --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump(oci_collection_element_get($coll2, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_013.phpt b/ext/oci8/tests/coll_013.phpt index 2bb836ae1a..ef3af0a8e7 100644 --- a/ext/oci8/tests/coll_013.phpt +++ b/ext/oci8/tests/coll_013.phpt @@ -3,12 +3,12 @@ collections and correct dates (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump($coll1->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_013_func.phpt b/ext/oci8/tests/coll_013_func.phpt index 27c2e66868..bb6d7083e3 100644 --- a/ext/oci8/tests/coll_013_func.phpt +++ b/ext/oci8/tests/coll_013_func.phpt @@ -3,12 +3,12 @@ collections and correct dates (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump(oci_collection_element_get($coll1, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_014.phpt b/ext/oci8/tests/coll_014.phpt index de3d46bd29..0af0ead329 100644 --- a/ext/oci8/tests/coll_014.phpt +++ b/ext/oci8/tests/coll_014.phpt @@ -3,12 +3,12 @@ collections and strings (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump($coll1->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_014_func.phpt b/ext/oci8/tests/coll_014_func.phpt index 4acde26e9e..24b0bbf8ba 100644 --- a/ext/oci8/tests/coll_014_func.phpt +++ b/ext/oci8/tests/coll_014_func.phpt @@ -3,12 +3,12 @@ collections and strings (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump(oci_collection_element_get($coll1, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_015.phpt b/ext/oci8/tests/coll_015.phpt index 2d8a0f382b..2ed2375ecc 100644 --- a/ext/oci8/tests/coll_015.phpt +++ b/ext/oci8/tests/coll_015.phpt @@ -3,12 +3,12 @@ collections and numbers (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump($coll1->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_015_func.phpt b/ext/oci8/tests/coll_015_func.phpt index d88b14547e..a9c16aec01 100644 --- a/ext/oci8/tests/coll_015_func.phpt +++ b/ext/oci8/tests/coll_015_func.phpt @@ -3,12 +3,12 @@ collections and numbers (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump(oci_collection_element_get($coll1, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_016.phpt b/ext/oci8/tests/coll_016.phpt index 1ba78007cc..80059688b3 100644 --- a/ext/oci8/tests/coll_016.phpt +++ b/ext/oci8/tests/coll_016.phpt @@ -3,12 +3,12 @@ collections and negative/too big element indexes --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump($coll1->getElem(500)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_016_func.phpt b/ext/oci8/tests/coll_016_func.phpt index ba3bee863a..da26428d8d 100644 --- a/ext/oci8/tests/coll_016_func.phpt +++ b/ext/oci8/tests/coll_016_func.phpt @@ -3,12 +3,12 @@ collections and negative/too big element indexes --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -34,7 +34,7 @@ var_dump(oci_collection_element_get($coll1, 500)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_017.phpt b/ext/oci8/tests/coll_017.phpt index c988e4ffe6..81fdfb2553 100644 --- a/ext/oci8/tests/coll_017.phpt +++ b/ext/oci8/tests/coll_017.phpt @@ -3,12 +3,12 @@ collections and nulls (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump($coll1->getElem(0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_017_func.phpt b/ext/oci8/tests/coll_017_func.phpt index 1aff12d764..c582eb0f8d 100644 --- a/ext/oci8/tests/coll_017_func.phpt +++ b/ext/oci8/tests/coll_017_func.phpt @@ -3,12 +3,12 @@ collections and nulls (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name." @@ -31,7 +31,7 @@ var_dump(oci_collection_element_get($coll1, 0)); echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECT-- diff --git a/ext/oci8/tests/coll_018.phpt b/ext/oci8/tests/coll_018.phpt index 1020861168..07e78e2fd9 100644 --- a/ext/oci8/tests/coll_018.phpt +++ b/ext/oci8/tests/coll_018.phpt @@ -3,13 +3,13 @@ Collection trim tests --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_type.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_type.inc"; $coll1 = oci_new_collection($c, $type_name); @@ -52,7 +52,7 @@ var_dump($coll1->getElem(0)); // this should have gone echo "Done\n"; -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/coll_019.phpt b/ext/oci8/tests/coll_019.phpt index cfadfe5635..7008ead9e0 100644 --- a/ext/oci8/tests/coll_019.phpt +++ b/ext/oci8/tests/coll_019.phpt @@ -3,12 +3,12 @@ Test collection Oracle error handling collections and numbers (2) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $ora_sql = "DROP TYPE ".$type_name; $statement = oci_parse($c,$ora_sql); @@ -26,7 +26,7 @@ var_dump($coll1->append('a long string')); // invalid type for appe var_dump($coll1->assignElem(1, 'a long string')); // invalid type for assignelem() var_dump($coll1->getElem(0)); -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; echo "Test 1\n"; $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; @@ -42,7 +42,7 @@ echo "Test 2\n"; var_dump($coll1->assignElem(1, 1234)); // invalid location for number var_dump($coll1->getElem(0)); -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; echo "Test 3\n"; $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR2(1)"; @@ -54,7 +54,7 @@ $coll1 = oci_new_collection($c, $type_name); var_dump($coll1->assignElem(1, 'abc')); // invalid location for string var_dump($coll1->getElem(0)); -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; echo "Test 4\n"; $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; @@ -67,7 +67,7 @@ var_dump($coll1->append(1)); // invalid date format var_dump($coll1->assignElem(1, '01-JAN-06')); // invalid location for date var_dump($coll1->getElem(0)); -require dirname(__FILE__)."/drop_type.inc"; +require __DIR__."/drop_type.inc"; echo "Done\n"; diff --git a/ext/oci8/tests/commit_001.phpt b/ext/oci8/tests/commit_001.phpt index 2696217a0f..de4682eefc 100644 --- a/ext/oci8/tests/commit_001.phpt +++ b/ext/oci8/tests/commit_001.phpt @@ -3,13 +3,13 @@ Test OCI_NO_AUTO_COMMIT constant --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); -require(dirname(__FILE__).'/create_table.inc'); +require(__DIR__."/connect.inc"); +require(__DIR__.'/create_table.inc'); $insert_sql = "insert into ".$schema.$table_name." (id, value) values (1,1)"; @@ -73,7 +73,7 @@ var_dump(oci_fetch_all($select, $all)); var_dump($all); -require(dirname(__FILE__).'/drop_table.inc'); +require(__DIR__.'/drop_table.inc'); echo "Done\n"; ?> diff --git a/ext/oci8/tests/commit_002.phpt b/ext/oci8/tests/commit_002.phpt index ade5fb09bb..b38d9aaa2d 100644 --- a/ext/oci8/tests/commit_002.phpt +++ b/ext/oci8/tests/commit_002.phpt @@ -3,12 +3,12 @@ Test oci_commit failure --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/commit_old.phpt b/ext/oci8/tests/commit_old.phpt index 0e3e08112a..658cfd24b3 100644 --- a/ext/oci8/tests/commit_old.phpt +++ b/ext/oci8/tests/commit_old.phpt @@ -3,13 +3,13 @@ ocicommit()/ocirollback() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema.$table_name." (id, value) VALUES (1,1)"; @@ -63,7 +63,7 @@ var_dump(ocifetchstatement($select, $all)); var_dump($all); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/conn_attr_1.phpt b/ext/oci8/tests/conn_attr_1.phpt index d16e10f61c..1c1f767398 100644 --- a/ext/oci8/tests/conn_attr_1.phpt +++ b/ext/oci8/tests/conn_attr_1.phpt @@ -3,7 +3,7 @@ Set and get of connection attributes with all types of connections. --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); @@ -20,7 +20,7 @@ if (!(isset($matches[0]) && $matches[1] >= 10)) { $testuser = 'testuser_attr_1'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(dirname(__FILE__)."/conn_attr.inc"); +require(__DIR__."/conn_attr.inc"); $attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER'); diff --git a/ext/oci8/tests/conn_attr_2.phpt b/ext/oci8/tests/conn_attr_2.phpt index 4ba1a65c2b..898bd52bcd 100644 --- a/ext/oci8/tests/conn_attr_2.phpt +++ b/ext/oci8/tests/conn_attr_2.phpt @@ -3,7 +3,7 @@ Set and get of connection attributes across persistent connections and sysdba co --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); @@ -21,7 +21,7 @@ oci8.privileged_connect = On $testuser = 'testuser_attr_2'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(dirname(__FILE__)."/conn_attr.inc"); +require(__DIR__."/conn_attr.inc"); $attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER'); diff --git a/ext/oci8/tests/conn_attr_3.phpt b/ext/oci8/tests/conn_attr_3.phpt index cfc4032a6b..a116be0fab 100644 --- a/ext/oci8/tests/conn_attr_3.phpt +++ b/ext/oci8/tests/conn_attr_3.phpt @@ -3,7 +3,7 @@ Set and get of connection attributes with oci_close(). --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[1] >= 10)) { $testuser = 'testuser_attr_3'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(dirname(__FILE__)."/conn_attr.inc"); +require(__DIR__."/conn_attr.inc"); echo"**Test Set and get values for the attributes with oci_close() ************\n"; // With oci_connect ,oci_pconnect ,oci_new_connect diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index 7897ddd4c9..46a219c05d 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -3,7 +3,7 @@ Set and get of connection attributes with errors. --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); @@ -24,7 +24,7 @@ if (!(isset($matches[0]) && $testuser = 'testuser_attr_4'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(dirname(__FILE__)."/conn_attr.inc"); +require(__DIR__."/conn_attr.inc"); $attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER'); diff --git a/ext/oci8/tests/conn_attr_5.phpt b/ext/oci8/tests/conn_attr_5.phpt index 129181dc27..4a58f917d3 100644 --- a/ext/oci8/tests/conn_attr_5.phpt +++ b/ext/oci8/tests/conn_attr_5.phpt @@ -3,7 +3,7 @@ Set and get connection attributes with scope end. --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[1] >= 10)) { $testuser = 'testuser_attr_5'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(dirname(__FILE__)."/conn_attr.inc"); +require(__DIR__."/conn_attr.inc"); echo"**Test - Set and get values for the attributes with scope end ************\n"; diff --git a/ext/oci8/tests/connect.phpt b/ext/oci8/tests/connect.phpt index 390ce1923e..d534e44871 100644 --- a/ext/oci8/tests/connect.phpt +++ b/ext/oci8/tests/connect.phpt @@ -5,7 +5,7 @@ oci_connect() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump(oci_connect($user, $password, $dbase)); diff --git a/ext/oci8/tests/connect_1.phpt b/ext/oci8/tests/connect_1.phpt index 647a92ceeb..6d76c8ddcc 100644 --- a/ext/oci8/tests/connect_1.phpt +++ b/ext/oci8/tests/connect_1.phpt @@ -5,7 +5,7 @@ oci_pconnect() & oci_new_connect() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump($c1 = oci_pconnect($user, $password, $dbase)); diff --git a/ext/oci8/tests/connect_1_old.phpt b/ext/oci8/tests/connect_1_old.phpt index 8210b82d6c..2014d59fe3 100644 --- a/ext/oci8/tests/connect_1_old.phpt +++ b/ext/oci8/tests/connect_1_old.phpt @@ -5,7 +5,7 @@ ociplogon() & ocinlogon() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump($c1 = ociplogon($user, $password, $dbase)); diff --git a/ext/oci8/tests/connect_old.phpt b/ext/oci8/tests/connect_old.phpt index 390c418a11..a2012bfd19 100644 --- a/ext/oci8/tests/connect_old.phpt +++ b/ext/oci8/tests/connect_old.phpt @@ -5,7 +5,7 @@ ocilogon() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump(ocilogon($user, $password, $dbase)); diff --git a/ext/oci8/tests/connect_scope1.phpt b/ext/oci8/tests/connect_scope1.phpt index 53827847e7..aefee2f882 100644 --- a/ext/oci8/tests/connect_scope1.phpt +++ b/ext/oci8/tests/connect_scope1.phpt @@ -5,7 +5,7 @@ Test oci_connect end-of-scope when statement returned --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_scope2.phpt b/ext/oci8/tests/connect_scope2.phpt index 1c7e88e896..aa192b1459 100644 --- a/ext/oci8/tests/connect_scope2.phpt +++ b/ext/oci8/tests/connect_scope2.phpt @@ -5,7 +5,7 @@ Test oci_pconnect end-of-scope when statement returned --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_scope_try1.phpt b/ext/oci8/tests/connect_scope_try1.phpt index 6dc94792db..d3628f9eaa 100644 --- a/ext/oci8/tests/connect_scope_try1.phpt +++ b/ext/oci8/tests/connect_scope_try1.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_scope_try2.phpt b/ext/oci8/tests/connect_scope_try2.phpt index 47e2b384b4..76e6909f44 100644 --- a/ext/oci8/tests/connect_scope_try2.phpt +++ b/ext/oci8/tests/connect_scope_try2.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=1 --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_scope_try3.phpt b/ext/oci8/tests/connect_scope_try3.phpt index 6e1c652ad5..d9cbfce355 100644 --- a/ext/oci8/tests/connect_scope_try3.phpt +++ b/ext/oci8/tests/connect_scope_try3.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_scope_try4.phpt b/ext/oci8/tests/connect_scope_try4.phpt index f35f4e68b5..cdefe36ee9 100644 --- a/ext/oci8/tests/connect_scope_try4.phpt +++ b/ext/oci8/tests/connect_scope_try4.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=1 --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_scope_try5.phpt b/ext/oci8/tests/connect_scope_try5.phpt index 325ce2fb99..1e99d0a2e1 100644 --- a/ext/oci8/tests/connect_scope_try5.phpt +++ b/ext/oci8/tests/connect_scope_try5.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_scope_try6.phpt b/ext/oci8/tests/connect_scope_try6.phpt index 6cc54a21bb..84ea97ac43 100644 --- a/ext/oci8/tests/connect_scope_try6.phpt +++ b/ext/oci8/tests/connect_scope_try6.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=1 --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Initialization diff --git a/ext/oci8/tests/connect_with_charset_001.phpt b/ext/oci8/tests/connect_with_charset_001.phpt index 36963ab5a0..2c8b2e10fd 100644 --- a/ext/oci8/tests/connect_with_charset_001.phpt +++ b/ext/oci8/tests/connect_with_charset_001.phpt @@ -5,7 +5,7 @@ oci_connect() with invalid character set --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; var_dump($c1 = oci_connect($user, $password, $dbase)); var_dump($c2 = oci_connect($user, $password, $dbase, "")); diff --git a/ext/oci8/tests/connect_without_oracle_home.phpt b/ext/oci8/tests/connect_without_oracle_home.phpt index 0e4a37ca3a..d83f30e0e9 100644 --- a/ext/oci8/tests/connect_without_oracle_home.phpt +++ b/ext/oci8/tests/connect_without_oracle_home.phpt @@ -20,7 +20,7 @@ ORACLE_HOME="" --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; if (!empty($dbase)) { var_dump(oci_connect($user, $password, $dbase)); diff --git a/ext/oci8/tests/connect_without_oracle_home_11.phpt b/ext/oci8/tests/connect_without_oracle_home_11.phpt index 09f778362c..a7c3fbba83 100644 --- a/ext/oci8/tests/connect_without_oracle_home_11.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_11.phpt @@ -23,7 +23,7 @@ ORACLE_HOME="" --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; if (!empty($dbase)) { var_dump(oci_connect($user, $password, $dbase)); diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt index 1bc7b37c23..d77b3e3699 100644 --- a/ext/oci8/tests/connect_without_oracle_home_old.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_old.phpt @@ -16,7 +16,7 @@ ORACLE_HOME="" --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; if (!empty($dbase)) { var_dump(ocilogon($user, $password, $dbase)); diff --git a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt index 07803b9996..c3c21f9d4c 100644 --- a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt @@ -23,7 +23,7 @@ ORACLE_HOME="" --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; if (!empty($dbase)) { var_dump(ocilogon($user, $password, $dbase)); diff --git a/ext/oci8/tests/cursor_bind.phpt b/ext/oci8/tests/cursor_bind.phpt index 6de593a17d..d0f862b0d6 100644 --- a/ext/oci8/tests/cursor_bind.phpt +++ b/ext/oci8/tests/cursor_bind.phpt @@ -3,12 +3,12 @@ bind and fetch cursor from a statement --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialization diff --git a/ext/oci8/tests/cursor_bind_err.phpt b/ext/oci8/tests/cursor_bind_err.phpt index 3ee539f3d3..bf7fbc2931 100644 --- a/ext/oci8/tests/cursor_bind_err.phpt +++ b/ext/oci8/tests/cursor_bind_err.phpt @@ -3,12 +3,12 @@ binding a cursor (with errors) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/cursors.phpt b/ext/oci8/tests/cursors.phpt index a0921855ff..8a33f51649 100644 --- a/ext/oci8/tests/cursors.phpt +++ b/ext/oci8/tests/cursors.phpt @@ -3,13 +3,13 @@ fetching cursor from a statement --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__)."/create_table.inc"; +require __DIR__."/connect.inc"; +require __DIR__."/create_table.inc"; $insert_sql = "INSERT INTO ".$schema.$table_name." (id, value) VALUES (1,1)"; @@ -42,7 +42,7 @@ while ($data = oci_fetch_assoc($stmt)) { var_dump(oci_cancel($data["CURS"])); } -require dirname(__FILE__)."/drop_table.inc"; +require __DIR__."/drop_table.inc"; echo "Done\n"; diff --git a/ext/oci8/tests/cursors_old.phpt b/ext/oci8/tests/cursors_old.phpt index ade8263802..b130da5165 100644 --- a/ext/oci8/tests/cursors_old.phpt +++ b/ext/oci8/tests/cursors_old.phpt @@ -3,12 +3,12 @@ fetching cursor from a statement --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/db_op_1.phpt b/ext/oci8/tests/db_op_1.phpt index b10ee9a984..7ca97952d7 100644 --- a/ext/oci8/tests/db_op_1.phpt +++ b/ext/oci8/tests/db_op_1.phpt @@ -4,7 +4,7 @@ oci_set_db_operation: basic test for end-to-end tracing <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a DBA user"); } @@ -20,7 +20,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/db_op_2.phpt b/ext/oci8/tests/db_op_2.phpt index 8710149911..26c5d30865 100644 --- a/ext/oci8/tests/db_op_2.phpt +++ b/ext/oci8/tests/db_op_2.phpt @@ -4,7 +4,7 @@ oci_set_db_operation: test DBOP for end-to-end tracing <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a DBA user"); } @@ -24,7 +24,7 @@ if (!function_exists('oci_set_db_operation')) --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); function dq($c, $q) { diff --git a/ext/oci8/tests/dbmsoutput.phpt b/ext/oci8/tests/dbmsoutput.phpt index 6a8a718c8a..40da29654d 100644 --- a/ext/oci8/tests/dbmsoutput.phpt +++ b/ext/oci8/tests/dbmsoutput.phpt @@ -3,12 +3,12 @@ PL/SQL: dbms_output --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/debug.phpt b/ext/oci8/tests/debug.phpt index 729726fdd6..a197639af6 100644 --- a/ext/oci8/tests/debug.phpt +++ b/ext/oci8/tests/debug.phpt @@ -5,7 +5,7 @@ oci_internal_debug() --FILE-- <?php -require(dirname(__FILE__)."/details.inc"); +require(__DIR__."/details.inc"); oci_internal_debug(true); diff --git a/ext/oci8/tests/default_prefetch0.phpt b/ext/oci8/tests/default_prefetch0.phpt index 5d2934e4cb..6a62328713 100644 --- a/ext/oci8/tests/default_prefetch0.phpt +++ b/ext/oci8/tests/default_prefetch0.phpt @@ -7,7 +7,7 @@ oci8.default_prefetch=20 --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/default_prefetch1.phpt b/ext/oci8/tests/default_prefetch1.phpt index 04fbd1a5a5..ca9590a82f 100644 --- a/ext/oci8/tests/default_prefetch1.phpt +++ b/ext/oci8/tests/default_prefetch1.phpt @@ -7,7 +7,7 @@ oci8.default_prefetch=100 --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/default_prefetch2.phpt b/ext/oci8/tests/default_prefetch2.phpt index 33e91150b6..1d2a80b845 100644 --- a/ext/oci8/tests/default_prefetch2.phpt +++ b/ext/oci8/tests/default_prefetch2.phpt @@ -7,7 +7,7 @@ oci8.default_prefetch=100 --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/define.phpt b/ext/oci8/tests/define.phpt index b78f698e7c..e3f19e6337 100644 --- a/ext/oci8/tests/define.phpt +++ b/ext/oci8/tests/define.phpt @@ -5,7 +5,7 @@ oci_define_by_name() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/define0.phpt b/ext/oci8/tests/define0.phpt index f2f06e3152..b783ec647c 100644 --- a/ext/oci8/tests/define0.phpt +++ b/ext/oci8/tests/define0.phpt @@ -5,7 +5,7 @@ oci_define_by_name() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/define1.phpt b/ext/oci8/tests/define1.phpt index be16271d5b..28c4b7f1f4 100644 --- a/ext/oci8/tests/define1.phpt +++ b/ext/oci8/tests/define1.phpt @@ -5,7 +5,7 @@ oci_define_by_name() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/define2.phpt b/ext/oci8/tests/define2.phpt index 67cff225c1..a018bbcb44 100644 --- a/ext/oci8/tests/define2.phpt +++ b/ext/oci8/tests/define2.phpt @@ -3,12 +3,12 @@ Test oci_define_by_name types --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmtarray = array( "drop table phptestrawtable", @@ -19,7 +19,7 @@ oci8_test_sql_execute($c, $stmtarray); $stmt = oci_parse ($c, "insert into phptestrawtable (id, fileimage) values (:id, :fileimage)"); $i=1; -$fileimage = file_get_contents( dirname(__FILE__)."/test.gif"); +$fileimage = file_get_contents( __DIR__."/test.gif"); $fileimage = substr($fileimage, 0, 300); var_dump(md5($fileimage)); diff --git a/ext/oci8/tests/define3.phpt b/ext/oci8/tests/define3.phpt index 690924b73a..669ae39d93 100644 --- a/ext/oci8/tests/define3.phpt +++ b/ext/oci8/tests/define3.phpt @@ -3,12 +3,12 @@ Test oci_define_by_name() LOB descriptor --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmtarray = array( "drop table phpdefblobtable", @@ -24,7 +24,7 @@ oci_bind_by_name($stmt,":id",$id); oci_bind_by_name($stmt,":fileimage",$fileimage,-1,OCI_B_BLOB); $id = 1; oci_execute($stmt, OCI_DEFAULT); -$fileimage->savefile(dirname(__FILE__)."/test.gif"); +$fileimage->savefile(__DIR__."/test.gif"); $data = $fileimage->load(); var_dump(md5($data)); // original md5 oci_commit($c); diff --git a/ext/oci8/tests/define4.phpt b/ext/oci8/tests/define4.phpt index c01790bab0..25296f96d3 100644 --- a/ext/oci8/tests/define4.phpt +++ b/ext/oci8/tests/define4.phpt @@ -5,7 +5,7 @@ oci_define_by_name() on partial number of columns --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/define5.phpt b/ext/oci8/tests/define5.phpt index f3aeb776a9..2dd9980d45 100644 --- a/ext/oci8/tests/define5.phpt +++ b/ext/oci8/tests/define5.phpt @@ -5,7 +5,7 @@ oci_define_by_name() for statement re-execution --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/define6.phpt b/ext/oci8/tests/define6.phpt index f68ada398c..c23cd452c6 100644 --- a/ext/oci8/tests/define6.phpt +++ b/ext/oci8/tests/define6.phpt @@ -3,12 +3,12 @@ oci_define_by_name tests with REF CURSORs --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/define_old.phpt b/ext/oci8/tests/define_old.phpt index d174ef9155..634a86d370 100644 --- a/ext/oci8/tests/define_old.phpt +++ b/ext/oci8/tests/define_old.phpt @@ -5,7 +5,7 @@ ocidefinebyname() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/descriptors.phpt b/ext/oci8/tests/descriptors.phpt index 0b4aeb09f7..193e1e76f8 100644 --- a/ext/oci8/tests/descriptors.phpt +++ b/ext/oci8/tests/descriptors.phpt @@ -3,13 +3,13 @@ commit connection after destroying the descriptor --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -37,7 +37,7 @@ unset($row['BLOB']); oci_commit($c); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/drcp_cclass1.phpt b/ext/oci8/tests/drcp_cclass1.phpt index d004f1f112..6e98b67828 100644 --- a/ext/oci8/tests/drcp_cclass1.phpt +++ b/ext/oci8/tests/drcp_cclass1.phpt @@ -3,7 +3,7 @@ DRCP: Test setting connection class inline --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); if (!$test_drcp) die("skip testing DRCP connection class only works in DRCP mode"); // Looked for :pooled in EZ connect string if (strpos($dbase, "/") !== false && stripos($dbase, ":pooled") === false) @@ -25,7 +25,7 @@ if (isset($matches_sv[0]) && $matches_sv[1] >= 12) { --FILE-- <?php -require(dirname(__FILE__)."/details.inc"); +require(__DIR__."/details.inc"); // Initialization diff --git a/ext/oci8/tests/drcp_characterset.phpt b/ext/oci8/tests/drcp_characterset.phpt index 657d4c5bab..c5a5339e04 100644 --- a/ext/oci8/tests/drcp_characterset.phpt +++ b/ext/oci8/tests/drcp_characterset.phpt @@ -5,7 +5,7 @@ DRCP: oci_pconnect() and oci_connect() with different character sets --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; // Create connections with oci_connect and oci_pconnect with UTF8 as Charset diff --git a/ext/oci8/tests/drcp_conn_close1.phpt b/ext/oci8/tests/drcp_conn_close1.phpt index 468b2732a6..18ed1cec72 100644 --- a/ext/oci8/tests/drcp_conn_close1.phpt +++ b/ext/oci8/tests/drcp_conn_close1.phpt @@ -8,7 +8,7 @@ oci8.connection_class=test --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; // Test will open a connection // Close the connection diff --git a/ext/oci8/tests/drcp_conn_close2.phpt b/ext/oci8/tests/drcp_conn_close2.phpt index 6b22862f89..4a20c9cf72 100644 --- a/ext/oci8/tests/drcp_conn_close2.phpt +++ b/ext/oci8/tests/drcp_conn_close2.phpt @@ -8,7 +8,7 @@ oci8.connection_class=test --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; // Test will open a connection // Close the connection diff --git a/ext/oci8/tests/drcp_connect1.phpt b/ext/oci8/tests/drcp_connect1.phpt index fc6fbc7d81..53d1e25c31 100644 --- a/ext/oci8/tests/drcp_connect1.phpt +++ b/ext/oci8/tests/drcp_connect1.phpt @@ -3,7 +3,7 @@ DRCP: oci_connect() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs (Calling PL/SQL from SQL is not supported in TimesTen) -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --INI-- oci8.connection_class=test @@ -11,8 +11,8 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require dirname(__FILE__)."/details.inc"; -require dirname(__FILE__)."/drcp_functions.inc"; +require __DIR__."/details.inc"; +require __DIR__."/drcp_functions.inc"; // Open a number of connections with oci_connect and oci_pconnect and verify // whether we get a used session with DRCP. diff --git a/ext/oci8/tests/drcp_newconnect.phpt b/ext/oci8/tests/drcp_newconnect.phpt index c2b6f51a25..cf4b6de17b 100644 --- a/ext/oci8/tests/drcp_newconnect.phpt +++ b/ext/oci8/tests/drcp_newconnect.phpt @@ -8,7 +8,7 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; // Open two connections with oci_new_connect // Verify they are different by comparing the resource ids diff --git a/ext/oci8/tests/drcp_pconn_close1.phpt b/ext/oci8/tests/drcp_pconn_close1.phpt index 53e7b1e3ef..83dad880d9 100644 --- a/ext/oci8/tests/drcp_pconn_close1.phpt +++ b/ext/oci8/tests/drcp_pconn_close1.phpt @@ -8,7 +8,7 @@ oci8.connection_class=test --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; // Test will open a persistent connection // Close the connection diff --git a/ext/oci8/tests/drcp_pconn_close2.phpt b/ext/oci8/tests/drcp_pconn_close2.phpt index 1c64762018..02bed68358 100644 --- a/ext/oci8/tests/drcp_pconn_close2.phpt +++ b/ext/oci8/tests/drcp_pconn_close2.phpt @@ -8,7 +8,7 @@ oci8.connection_class=test --FILE-- <?php -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; // Test will open a persistent connection // Close the connection diff --git a/ext/oci8/tests/drcp_privileged.phpt b/ext/oci8/tests/drcp_privileged.phpt index 54efc8726c..7b1283065f 100644 --- a/ext/oci8/tests/drcp_privileged.phpt +++ b/ext/oci8/tests/drcp_privileged.phpt @@ -3,7 +3,7 @@ DRCP: privileged connect --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); if (!$test_drcp) die("skip requires DRCP connection"); // Looked for :pooled in EZ connect string if (strpos($dbase, "/") !== false && stripos($dbase, ":pooled") === false) @@ -36,7 +36,7 @@ oci8.privileged_connect=1 // Connecting as SYSDBA or SYSOPER through DRCP will give ORA-1031 -require dirname(__FILE__)."/details.inc"; +require __DIR__."/details.inc"; var_dump(oci_connect($user,$password,$dbase,false,OCI_SYSDBA)); var_dump(oci_connect($user,$password,$dbase,false,OCI_SYSOPER)); var_dump(oci_new_connect($user,$password,$dbase,false,OCI_SYSDBA)); diff --git a/ext/oci8/tests/drcp_scope1.phpt b/ext/oci8/tests/drcp_scope1.phpt index 57f1abe327..78e2e900c9 100644 --- a/ext/oci8/tests/drcp_scope1.phpt +++ b/ext/oci8/tests/drcp_scope1.phpt @@ -7,8 +7,8 @@ oci8.old_oci_close_semantics=1 --FILE-- <?php -require dirname(__FILE__)."/drcp_functions.inc"; -require dirname(__FILE__)."/details.inc"; +require __DIR__."/drcp_functions.inc"; +require __DIR__."/details.inc"; // Scope considered here is the functional scope // Test will open a connection within a function (function 1). diff --git a/ext/oci8/tests/drcp_scope2.phpt b/ext/oci8/tests/drcp_scope2.phpt index b72e00dbb0..05a4c558ec 100644 --- a/ext/oci8/tests/drcp_scope2.phpt +++ b/ext/oci8/tests/drcp_scope2.phpt @@ -7,8 +7,8 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require dirname(__FILE__)."/drcp_functions.inc"; -require dirname(__FILE__)."/details.inc"; +require __DIR__."/drcp_functions.inc"; +require __DIR__."/details.inc"; // Scope considered here is the functional scope // Test will open a connection within a function (function 1). diff --git a/ext/oci8/tests/drcp_scope3.phpt b/ext/oci8/tests/drcp_scope3.phpt index e77dc9fd7e..975f87bed9 100644 --- a/ext/oci8/tests/drcp_scope3.phpt +++ b/ext/oci8/tests/drcp_scope3.phpt @@ -7,8 +7,8 @@ oci8.old_oci_close_semantics=1 --FILE-- <?php -require dirname(__FILE__)."/drcp_functions.inc"; -require dirname(__FILE__)."/details.inc"; +require __DIR__."/drcp_functions.inc"; +require __DIR__."/details.inc"; // The test opens a connection within function1 and updates a table // (without committing). Another connection is opened from function diff --git a/ext/oci8/tests/drcp_scope4.phpt b/ext/oci8/tests/drcp_scope4.phpt index 87eaf0cbe6..dced1c3f1c 100644 --- a/ext/oci8/tests/drcp_scope4.phpt +++ b/ext/oci8/tests/drcp_scope4.phpt @@ -7,8 +7,8 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require dirname(__FILE__)."/drcp_functions.inc"; -require dirname(__FILE__)."/details.inc"; +require __DIR__."/drcp_functions.inc"; +require __DIR__."/details.inc"; // The default expected behavior of this test is different between PHP // 5.2 and PHP 5.3 diff --git a/ext/oci8/tests/drcp_scope5.phpt b/ext/oci8/tests/drcp_scope5.phpt index 46163efe2d..d3ccb56da0 100644 --- a/ext/oci8/tests/drcp_scope5.phpt +++ b/ext/oci8/tests/drcp_scope5.phpt @@ -7,8 +7,8 @@ oci8.old_oci_close_semantics=1 --FILE-- <?php -require dirname(__FILE__)."/drcp_functions.inc"; -require dirname(__FILE__)."/details.inc"; +require __DIR__."/drcp_functions.inc"; +require __DIR__."/details.inc"; // Similar to drcp_scope3.phpt but does a commit before end of // function2, allowing the table to be dropped cleanly at the end. diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt index 8cbbf9648a..29b2cef520 100644 --- a/ext/oci8/tests/driver_name.phpt +++ b/ext/oci8/tests/driver_name.phpt @@ -3,7 +3,7 @@ Verify that the Driver Name attribute is set --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip as Output might vary with DRCP"); @@ -22,7 +22,7 @@ if (!(isset($matches[0]) && ($matches[1] == 11 && $matches[2] >= 2) || ($matches ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); echo"**Test 1.1 - Default values for the attribute **************\n"; get_attr($c); diff --git a/ext/oci8/tests/driver_name_11gR2.phpt b/ext/oci8/tests/driver_name_11gR2.phpt index d44f495dea..bb82b92fa3 100644 --- a/ext/oci8/tests/driver_name_11gR2.phpt +++ b/ext/oci8/tests/driver_name_11gR2.phpt @@ -3,7 +3,7 @@ Verify that the Driver Name attribute is set --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip as Output might vary with DRCP"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && ($matches[1] == 11 && $matches[2] >= 2) || ($matches ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); echo"**Test 1.1 - Default values for the attribute **************\n"; get_attr($c); diff --git a/ext/oci8/tests/dupcolnames.phpt b/ext/oci8/tests/dupcolnames.phpt index cc1fdd1854..40d2c99b13 100644 --- a/ext/oci8/tests/dupcolnames.phpt +++ b/ext/oci8/tests/dupcolnames.phpt @@ -5,7 +5,7 @@ SELECT tests with duplicate column anmes --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/edition_1.phpt b/ext/oci8/tests/edition_1.phpt index 19c0a5d3b3..9bdf699a70 100644 --- a/ext/oci8/tests/edition_1.phpt +++ b/ext/oci8/tests/edition_1.phpt @@ -3,7 +3,7 @@ Basic test for setting Oracle 11gR2 "edition" attribute --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a DBA user"); } @@ -36,7 +36,7 @@ if (!(isset($matches[0]) && $testuser = 'testuser_attr_1'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(dirname(__FILE__)."/conn_attr.inc"); +require(__DIR__."/conn_attr.inc"); function select_fn($conn) { $s = oci_parse($conn,"select * from view_ed"); diff --git a/ext/oci8/tests/edition_2.phpt b/ext/oci8/tests/edition_2.phpt index 763f59577d..054e685943 100644 --- a/ext/oci8/tests/edition_2.phpt +++ b/ext/oci8/tests/edition_2.phpt @@ -3,7 +3,7 @@ Set and check Oracle 11gR2 "edition" attribute --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) @@ -35,7 +35,7 @@ if (!(isset($matches[0]) && $testuser = 'testuser_ed_2'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(dirname(__FILE__)."/conn_attr.inc"); +require(__DIR__."/conn_attr.inc"); echo"**Test 1.1 - Default value for the attribute **************\n"; get_edit_attr($c); diff --git a/ext/oci8/tests/error.phpt b/ext/oci8/tests/error.phpt index c3fb2de664..f1f74ddce4 100644 --- a/ext/oci8/tests/error.phpt +++ b/ext/oci8/tests/error.phpt @@ -3,12 +3,12 @@ oci_error() error message for parsing error --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump(oci_connect($user, $password, $dbase)); diff --git a/ext/oci8/tests/error2.phpt b/ext/oci8/tests/error2.phpt index 2561d9dd4d..2e1c72fa69 100644 --- a/ext/oci8/tests/error2.phpt +++ b/ext/oci8/tests/error2.phpt @@ -3,13 +3,13 @@ Exercise error code for SUCCESS_WITH_INFO --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); ini_set('error_reporting', E_ALL); diff --git a/ext/oci8/tests/error3.phpt b/ext/oci8/tests/error3.phpt index 29650439e2..c993a97b5d 100644 --- a/ext/oci8/tests/error3.phpt +++ b/ext/oci8/tests/error3.phpt @@ -3,7 +3,7 @@ Maximum Oracle error length --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); // Assume runtime client version is >= compile time client version $cv = explode('.', oci_client_version()); if ($cv[0] < 11 || ($cv[0] == 11 && $cv[1] < 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] < 3)) { @@ -15,7 +15,7 @@ log_errors_max_len=4096 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); echo "Test 1\n"; diff --git a/ext/oci8/tests/error_bind.phpt b/ext/oci8/tests/error_bind.phpt index 0b039a16d9..d36f31b377 100644 --- a/ext/oci8/tests/error_bind.phpt +++ b/ext/oci8/tests/error_bind.phpt @@ -5,7 +5,7 @@ Test some oci_bind_by_name error conditions --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $drop = "drop table bind_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/error_bind_2.phpt b/ext/oci8/tests/error_bind_2.phpt index 592702b931..f60f86984f 100644 --- a/ext/oci8/tests/error_bind_2.phpt +++ b/ext/oci8/tests/error_bind_2.phpt @@ -4,7 +4,7 @@ Test some more oci_bind_by_name error conditions <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => true); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/error_bind_3.phpt b/ext/oci8/tests/error_bind_3.phpt index 47ca71dcd1..2ccb2f36ec 100644 --- a/ext/oci8/tests/error_bind_3.phpt +++ b/ext/oci8/tests/error_bind_3.phpt @@ -4,7 +4,7 @@ Test some more oci_bind_by_name error conditions <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => true); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $sql = "begin :output1 := 99; diff --git a/ext/oci8/tests/error_old.phpt b/ext/oci8/tests/error_old.phpt index 8df1ee5df2..e25b66516b 100644 --- a/ext/oci8/tests/error_old.phpt +++ b/ext/oci8/tests/error_old.phpt @@ -3,12 +3,12 @@ ocierror() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump(ocilogon($user, $password, $dbase)); diff --git a/ext/oci8/tests/error_parse.phpt b/ext/oci8/tests/error_parse.phpt index 458df8715a..1992826618 100644 --- a/ext/oci8/tests/error_parse.phpt +++ b/ext/oci8/tests/error_parse.phpt @@ -10,7 +10,7 @@ Test error handling when persistent connection is passed to oci_error() // was fixed and the behavior of oci_error() for all connections types // was made consistent. -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); // Test parse error for normal connection diff --git a/ext/oci8/tests/error_set.phpt b/ext/oci8/tests/error_set.phpt index b0c53408c3..95673f554a 100644 --- a/ext/oci8/tests/error_set.phpt +++ b/ext/oci8/tests/error_set.phpt @@ -5,7 +5,7 @@ Check oci_set_{action,client_identifier,module_name,client_info} error handling --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); error_reporting(E_ALL); ini_set('display_errors', 'Off'); diff --git a/ext/oci8/tests/exec_fetch.phpt b/ext/oci8/tests/exec_fetch.phpt index b318ee48fc..482fa7c6ef 100644 --- a/ext/oci8/tests/exec_fetch.phpt +++ b/ext/oci8/tests/exec_fetch.phpt @@ -5,7 +5,7 @@ fetch after failed oci_execute() --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $sql = "select 2 from nonex_dual"; $stmt = oci_parse($c, $sql); diff --git a/ext/oci8/tests/execute_mode.phpt b/ext/oci8/tests/execute_mode.phpt index ffa97f0f2f..86b8eafcbb 100644 --- a/ext/oci8/tests/execute_mode.phpt +++ b/ext/oci8/tests/execute_mode.phpt @@ -5,7 +5,7 @@ oci_execute() and invalid execute mode --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $pc = oci_pconnect($user, $password, $dbase); diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 7099b40945..ba48b0eb58 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -4,7 +4,7 @@ Test External Authentication errors with oci_connect <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --INI-- diff --git a/ext/oci8/tests/fetch.phpt b/ext/oci8/tests/fetch.phpt index a290603487..eeba992db2 100644 --- a/ext/oci8/tests/fetch.phpt +++ b/ext/oci8/tests/fetch.phpt @@ -5,7 +5,7 @@ ocifetch() & ociresult() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/fetch_all1.phpt b/ext/oci8/tests/fetch_all1.phpt index 20afe5967c..2d27f8e02b 100644 --- a/ext/oci8/tests/fetch_all1.phpt +++ b/ext/oci8/tests/fetch_all1.phpt @@ -5,7 +5,7 @@ oci_fetch_all() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/fetch_all2.phpt b/ext/oci8/tests/fetch_all2.phpt index ca43348c2b..cafd0eb509 100644 --- a/ext/oci8/tests/fetch_all2.phpt +++ b/ext/oci8/tests/fetch_all2.phpt @@ -3,13 +3,13 @@ oci_fetch_all() - 2 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value) VALUES (1,1)"; @@ -49,7 +49,7 @@ oci_execute($s); var_dump(oci_fetch_all($s, $all, 0, 1, OCI_BOTH)); var_dump($all); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/fetch_all3.phpt b/ext/oci8/tests/fetch_all3.phpt index 728dc7e3eb..0fdf41140b 100644 --- a/ext/oci8/tests/fetch_all3.phpt +++ b/ext/oci8/tests/fetch_all3.phpt @@ -5,7 +5,7 @@ oci_fetch_all() - all combinations of flags --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/fetch_all4.phpt b/ext/oci8/tests/fetch_all4.phpt index 7c3b5ea83c..ff4f7c400e 100644 --- a/ext/oci8/tests/fetch_all4.phpt +++ b/ext/oci8/tests/fetch_all4.phpt @@ -5,7 +5,7 @@ Test oci_fetch_* array overwriting when query returns no rows --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/fetch_all5.phpt b/ext/oci8/tests/fetch_all5.phpt index 28e1a2e72d..26c7447c2c 100644 --- a/ext/oci8/tests/fetch_all5.phpt +++ b/ext/oci8/tests/fetch_all5.phpt @@ -5,7 +5,7 @@ Test oci_fetch_all with 0 and -1 skip & maxrows --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/fetch_array.phpt b/ext/oci8/tests/fetch_array.phpt index c4a45c6be2..b7f327dcd4 100644 --- a/ext/oci8/tests/fetch_array.phpt +++ b/ext/oci8/tests/fetch_array.phpt @@ -3,13 +3,13 @@ oci_fetch_array() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value) VALUES (1,1)"; @@ -96,7 +96,7 @@ while ($row = oci_fetch_array($s, OCI_NUM+OCI_RETURN_NULLS)) { var_dump($row); } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/fetch_assoc.phpt b/ext/oci8/tests/fetch_assoc.phpt index 5c4c91e1d8..e891858efa 100644 --- a/ext/oci8/tests/fetch_assoc.phpt +++ b/ext/oci8/tests/fetch_assoc.phpt @@ -5,7 +5,7 @@ oci_fetch_assoc() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $stmtarray = array( "drop table fetch_assoc_tab", diff --git a/ext/oci8/tests/fetch_into.phpt b/ext/oci8/tests/fetch_into.phpt index 5235dac8a0..04f6743a75 100644 --- a/ext/oci8/tests/fetch_into.phpt +++ b/ext/oci8/tests/fetch_into.phpt @@ -5,7 +5,7 @@ ocifetchinto() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/fetch_into1.phpt b/ext/oci8/tests/fetch_into1.phpt index 68e5f9cfae..97e511869e 100644 --- a/ext/oci8/tests/fetch_into1.phpt +++ b/ext/oci8/tests/fetch_into1.phpt @@ -3,13 +3,13 @@ various ocifetchinto() tests --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value, string) VALUES (1, 1, NULL)"; @@ -57,7 +57,7 @@ var_dump($all); var_dump(ocifetchinto($s, $all, OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS)); var_dump($all); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/fetch_into2.phpt b/ext/oci8/tests/fetch_into2.phpt index 2d72541580..b79e282350 100644 --- a/ext/oci8/tests/fetch_into2.phpt +++ b/ext/oci8/tests/fetch_into2.phpt @@ -3,13 +3,13 @@ ocifetchinto() & wrong number of params --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value, string) VALUES (1, 1, NULL)"; @@ -45,7 +45,7 @@ var_dump($all); var_dump(ocifetchinto($s, $all, 1000000)); var_dump($all); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/fetch_object.phpt b/ext/oci8/tests/fetch_object.phpt index bd49c5ed47..053b3136f3 100644 --- a/ext/oci8/tests/fetch_object.phpt +++ b/ext/oci8/tests/fetch_object.phpt @@ -3,12 +3,12 @@ oci_fetch_object() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/fetch_object_1.phpt b/ext/oci8/tests/fetch_object_1.phpt index 88dcd5ec62..3480aa25b1 100644 --- a/ext/oci8/tests/fetch_object_1.phpt +++ b/ext/oci8/tests/fetch_object_1.phpt @@ -3,12 +3,12 @@ oci_fetch_object() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/fetch_object_2.phpt b/ext/oci8/tests/fetch_object_2.phpt index 1814446aa8..648d1dd073 100644 --- a/ext/oci8/tests/fetch_object_2.phpt +++ b/ext/oci8/tests/fetch_object_2.phpt @@ -3,12 +3,12 @@ oci_fetch_object() with CLOB and NULL --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/fetch_row.phpt b/ext/oci8/tests/fetch_row.phpt index 1b5176974a..b50b65d480 100644 --- a/ext/oci8/tests/fetch_row.phpt +++ b/ext/oci8/tests/fetch_row.phpt @@ -5,7 +5,7 @@ oci_fetch_row() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/field_funcs.phpt b/ext/oci8/tests/field_funcs.phpt index 5448fcbc34..1432dcd4c0 100644 --- a/ext/oci8/tests/field_funcs.phpt +++ b/ext/oci8/tests/field_funcs.phpt @@ -3,13 +3,13 @@ oci_field_*() family --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value) VALUES (1,1)"; @@ -52,7 +52,7 @@ foreach ($row as $num => $field) { } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/field_funcs0.phpt b/ext/oci8/tests/field_funcs0.phpt index 5448fcbc34..1432dcd4c0 100644 --- a/ext/oci8/tests/field_funcs0.phpt +++ b/ext/oci8/tests/field_funcs0.phpt @@ -3,13 +3,13 @@ oci_field_*() family --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value) VALUES (1,1)"; @@ -52,7 +52,7 @@ foreach ($row as $num => $field) { } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/field_funcs1.phpt b/ext/oci8/tests/field_funcs1.phpt index 41d8627ce4..29db4963d4 100644 --- a/ext/oci8/tests/field_funcs1.phpt +++ b/ext/oci8/tests/field_funcs1.phpt @@ -5,7 +5,7 @@ oci_field_*() family: error cases --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/field_funcs2.phpt b/ext/oci8/tests/field_funcs2.phpt index 502d079139..896a63d11b 100644 --- a/ext/oci8/tests/field_funcs2.phpt +++ b/ext/oci8/tests/field_funcs2.phpt @@ -5,7 +5,7 @@ Bug #41917 (invalid scale and precision) --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $s = oci_parse($c, 'drop table field_funcs2_tab'); @oci_execute($s); diff --git a/ext/oci8/tests/field_funcs3.phpt b/ext/oci8/tests/field_funcs3.phpt index e51949cf21..23f4b5ea61 100644 --- a/ext/oci8/tests/field_funcs3.phpt +++ b/ext/oci8/tests/field_funcs3.phpt @@ -5,7 +5,7 @@ oci_field_*() family: basic column types --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialization $stmtarray = array( diff --git a/ext/oci8/tests/field_funcs_old.phpt b/ext/oci8/tests/field_funcs_old.phpt index e088463617..6417de15cd 100644 --- a/ext/oci8/tests/field_funcs_old.phpt +++ b/ext/oci8/tests/field_funcs_old.phpt @@ -3,13 +3,13 @@ ocicolumn*() family --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__."/connect.inc"; +require __DIR__.'/create_table.inc'; $insert_sql = "INSERT INTO ".$schema."".$table_name." (id, value) VALUES (1,1)"; @@ -52,7 +52,7 @@ foreach ($row as $num => $field) { } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/imp_res_1.phpt b/ext/oci8/tests/imp_res_1.phpt index 8f3608dba3..7379b606f2 100644 --- a/ext/oci8/tests/imp_res_1.phpt +++ b/ext/oci8/tests/imp_res_1.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: basic test <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_2.phpt b/ext/oci8/tests/imp_res_2.phpt index 567cefb2ba..b246e2ed77 100644 --- a/ext/oci8/tests/imp_res_2.phpt +++ b/ext/oci8/tests/imp_res_2.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: Zero Rows <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_3.phpt b/ext/oci8/tests/imp_res_3.phpt index 965edb1224..bd48267e96 100644 --- a/ext/oci8/tests/imp_res_3.phpt +++ b/ext/oci8/tests/imp_res_3.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: bigger data size <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_4.phpt b/ext/oci8/tests/imp_res_4.phpt index d938f9f4ce..79e9b39dd3 100644 --- a/ext/oci8/tests/imp_res_4.phpt +++ b/ext/oci8/tests/imp_res_4.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_fetch <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_5.phpt b/ext/oci8/tests/imp_res_5.phpt index 7c06dee78f..26107eda94 100644 --- a/ext/oci8/tests/imp_res_5.phpt +++ b/ext/oci8/tests/imp_res_5.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_fetch_all <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_6.phpt b/ext/oci8/tests/imp_res_6.phpt index 278c47b311..c1ea7d34f3 100644 --- a/ext/oci8/tests/imp_res_6.phpt +++ b/ext/oci8/tests/imp_res_6.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: alternating oci_fetch_* calls <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_7.phpt b/ext/oci8/tests/imp_res_7.phpt index 8502ab2488..6ba9d5fc14 100644 --- a/ext/oci8/tests/imp_res_7.phpt +++ b/ext/oci8/tests/imp_res_7.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: bigger data size <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_call_error.phpt b/ext/oci8/tests/imp_res_call_error.phpt index 774131ee00..5c2ab9988a 100644 --- a/ext/oci8/tests/imp_res_call_error.phpt +++ b/ext/oci8/tests/imp_res_call_error.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: using SQL 'CALL' <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_cancel.phpt b/ext/oci8/tests/imp_res_cancel.phpt index 7c503c3cb9..e3caa86672 100644 --- a/ext/oci8/tests/imp_res_cancel.phpt +++ b/ext/oci8/tests/imp_res_cancel.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_cancel <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $stmtarray = array( "create or replace procedure imp_res_cancel_proc as diff --git a/ext/oci8/tests/imp_res_close.phpt b/ext/oci8/tests/imp_res_close.phpt index de85a3d1ca..3e719b9ee2 100644 --- a/ext/oci8/tests/imp_res_close.phpt +++ b/ext/oci8/tests/imp_res_close.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_free_statement #1 <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_cursor.phpt b/ext/oci8/tests/imp_res_cursor.phpt index 57bdddeab2..221ef80d47 100644 --- a/ext/oci8/tests/imp_res_cursor.phpt +++ b/ext/oci8/tests/imp_res_cursor.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: nested cursor <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_dbmsoutput.phpt b/ext/oci8/tests/imp_res_dbmsoutput.phpt index cb6fae095f..b84ef8c556 100644 --- a/ext/oci8/tests/imp_res_dbmsoutput.phpt +++ b/ext/oci8/tests/imp_res_dbmsoutput.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: interleaved with DBMS_OUTPUT <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_field.phpt b/ext/oci8/tests/imp_res_field.phpt index 3d10e15dac..c96e7c3ef5 100644 --- a/ext/oci8/tests/imp_res_field.phpt +++ b/ext/oci8/tests/imp_res_field.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: field tests <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_func_error.phpt b/ext/oci8/tests/imp_res_func_error.phpt index a5c7e84241..424ae47bb8 100644 --- a/ext/oci8/tests/imp_res_func_error.phpt +++ b/ext/oci8/tests/imp_res_func_error.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: test with a PL/SQL function <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_1.phpt b/ext/oci8/tests/imp_res_get_1.phpt index 79ad8711ff..7eac1033f4 100644 --- a/ext/oci8/tests/imp_res_get_1.phpt +++ b/ext/oci8/tests/imp_res_get_1.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: basic test <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_2.phpt b/ext/oci8/tests/imp_res_get_2.phpt index 3ed3036f6b..b8c2a08af5 100644 --- a/ext/oci8/tests/imp_res_get_2.phpt +++ b/ext/oci8/tests/imp_res_get_2.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: similar to <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_3.phpt b/ext/oci8/tests/imp_res_get_3.phpt index f0f0b164da..4b39dd1117 100644 --- a/ext/oci8/tests/imp_res_get_3.phpt +++ b/ext/oci8/tests/imp_res_get_3.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: basic test <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ oci8.statement_cache_size = 0 --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_4.phpt b/ext/oci8/tests/imp_res_get_4.phpt index 658ec9c050..193e2f623e 100644 --- a/ext/oci8/tests/imp_res_get_4.phpt +++ b/ext/oci8/tests/imp_res_get_4.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: interleave <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_5.phpt b/ext/oci8/tests/imp_res_get_5.phpt index eabc7867e9..79bb170a59 100644 --- a/ext/oci8/tests/imp_res_get_5.phpt +++ b/ext/oci8/tests/imp_res_get_5.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: get from w <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); function print_row($row) { diff --git a/ext/oci8/tests/imp_res_get_all.phpt b/ext/oci8/tests/imp_res_get_all.phpt index 98bb8c08d2..a1d99eeebf 100644 --- a/ext/oci8/tests/imp_res_get_all.phpt +++ b/ext/oci8/tests/imp_res_get_all.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_fetch_ <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $plsql = "declare c1 sys_refcursor; diff --git a/ext/oci8/tests/imp_res_get_cancel.phpt b/ext/oci8/tests/imp_res_get_cancel.phpt index e09ddf906a..5bc36f08cd 100644 --- a/ext/oci8/tests/imp_res_get_cancel.phpt +++ b/ext/oci8/tests/imp_res_get_cancel.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_cancel <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $plsql = "declare diff --git a/ext/oci8/tests/imp_res_get_close_1.phpt b/ext/oci8/tests/imp_res_get_close_1.phpt index 20f46b4f1c..a9c2fc455c 100644 --- a/ext/oci8/tests/imp_res_get_close_1.phpt +++ b/ext/oci8/tests/imp_res_get_close_1.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_s <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_close_2.phpt b/ext/oci8/tests/imp_res_get_close_2.phpt index efc0e6da60..d435b8968d 100644 --- a/ext/oci8/tests/imp_res_get_close_2.phpt +++ b/ext/oci8/tests/imp_res_get_close_2.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_s <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_close_3.phpt b/ext/oci8/tests/imp_res_get_close_3.phpt index d57644c924..268c353801 100644 --- a/ext/oci8/tests/imp_res_get_close_3.phpt +++ b/ext/oci8/tests/imp_res_get_close_3.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_s <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_cursor.phpt b/ext/oci8/tests/imp_res_get_cursor.phpt index 417c112419..1694fc830a 100644 --- a/ext/oci8/tests/imp_res_get_cursor.phpt +++ b/ext/oci8/tests/imp_res_get_cursor.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: nested cur <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_dbmsoutput.phpt b/ext/oci8/tests/imp_res_get_dbmsoutput.phpt index 08c9d2f36b..95bb50cd51 100644 --- a/ext/oci8/tests/imp_res_get_dbmsoutput.phpt +++ b/ext/oci8/tests/imp_res_get_dbmsoutput.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: interleave <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_get_exec.phpt b/ext/oci8/tests/imp_res_get_exec.phpt index 6f5a503ec3..f9391cc122 100644 --- a/ext/oci8/tests/imp_res_get_exec.phpt +++ b/ext/oci8/tests/imp_res_get_exec.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: Execute tw <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $plsql = "declare c1 sys_refcursor; diff --git a/ext/oci8/tests/imp_res_get_none.phpt b/ext/oci8/tests/imp_res_get_none.phpt index 73d2913884..87d86c2f9f 100644 --- a/ext/oci8/tests/imp_res_get_none.phpt +++ b/ext/oci8/tests/imp_res_get_none.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: no implici <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/imp_res_insert.phpt b/ext/oci8/tests/imp_res_insert.phpt index 317d4def66..074f5ee879 100644 --- a/ext/oci8/tests/imp_res_insert.phpt +++ b/ext/oci8/tests/imp_res_insert.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: Commit modes <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_lob.phpt b/ext/oci8/tests/imp_res_lob.phpt index 16f0701e72..48185b6355 100644 --- a/ext/oci8/tests/imp_res_lob.phpt +++ b/ext/oci8/tests/imp_res_lob.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: LOBs <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/imp_res_prefetch.phpt b/ext/oci8/tests/imp_res_prefetch.phpt index c00e4be297..849874bd00 100644 --- a/ext/oci8/tests/imp_res_prefetch.phpt +++ b/ext/oci8/tests/imp_res_prefetch.phpt @@ -4,7 +4,7 @@ Oracle Database 12c Implicit Result Sets: basic test <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -17,7 +17,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/lob_001.phpt b/ext/oci8/tests/lob_001.phpt Binary files differindex 432239d129..3a3a48dee0 100644 --- a/ext/oci8/tests/lob_001.phpt +++ b/ext/oci8/tests/lob_001.phpt diff --git a/ext/oci8/tests/lob_002.phpt b/ext/oci8/tests/lob_002.phpt index 188f83ddd3..e83ae21187 100644 --- a/ext/oci8/tests/lob_002.phpt +++ b/ext/oci8/tests/lob_002.phpt @@ -3,12 +3,12 @@ oci_lob_write() and friends (with errors) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/lob_003.phpt b/ext/oci8/tests/lob_003.phpt Binary files differindex b0b1d31af4..1edb9bef06 100644 --- a/ext/oci8/tests/lob_003.phpt +++ b/ext/oci8/tests/lob_003.phpt diff --git a/ext/oci8/tests/lob_004.phpt b/ext/oci8/tests/lob_004.phpt index a363199776..d04076fba9 100644 --- a/ext/oci8/tests/lob_004.phpt +++ b/ext/oci8/tests/lob_004.phpt @@ -3,13 +3,13 @@ oci_lob_seek()/rewind()/append() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -51,7 +51,7 @@ $row = oci_fetch_array($s); var_dump($row[0]->read(10000)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_005.phpt b/ext/oci8/tests/lob_005.phpt index e482caafd1..fa910277f1 100644 --- a/ext/oci8/tests/lob_005.phpt +++ b/ext/oci8/tests/lob_005.phpt @@ -3,13 +3,13 @@ oci_lob_is_equal() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -33,7 +33,7 @@ var_dump($row = oci_fetch_array($s)); var_dump(oci_lob_is_equal($row[0], $row['BLOB'])); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_006.phpt b/ext/oci8/tests/lob_006.phpt Binary files differindex 6a38df5e43..9a9b9f6844 100644 --- a/ext/oci8/tests/lob_006.phpt +++ b/ext/oci8/tests/lob_006.phpt diff --git a/ext/oci8/tests/lob_007.phpt b/ext/oci8/tests/lob_007.phpt index 934f012862..9b99f371e3 100644 --- a/ext/oci8/tests/lob_007.phpt +++ b/ext/oci8/tests/lob_007.phpt @@ -3,13 +3,13 @@ oci_lob_write()/size()/load() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -39,7 +39,7 @@ var_dump($row = oci_fetch_array($s)); var_dump($row[0]->size()); var_dump(strlen($row[0]->load())); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_008.phpt b/ext/oci8/tests/lob_008.phpt index 238f619507..53b75302ef 100644 --- a/ext/oci8/tests/lob_008.phpt +++ b/ext/oci8/tests/lob_008.phpt @@ -3,13 +3,13 @@ oci_lob_write()/read()/eof() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -41,7 +41,7 @@ while (!$row[0]->eof()) { } var_dump($len); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_009.phpt b/ext/oci8/tests/lob_009.phpt index 50a9b02c05..090503f927 100644 --- a/ext/oci8/tests/lob_009.phpt +++ b/ext/oci8/tests/lob_009.phpt @@ -3,13 +3,13 @@ oci_lob_import()/read() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -25,7 +25,7 @@ oci_execute($statement, OCI_DEFAULT); var_dump($blob); var_dump($blob->seek(10, OCI_SEEK_CUR)); -var_dump($blob->import(dirname(__FILE__)."/lob_009.txt")); +var_dump($blob->import(__DIR__."/lob_009.txt")); oci_commit($c); $select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; @@ -38,7 +38,7 @@ while (!$row[0]->eof()) { var_dump(str_replace("\r", "", $row[0]->read(1024))); } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_010.phpt b/ext/oci8/tests/lob_010.phpt index f82faf1075..b4a0a77d1e 100644 --- a/ext/oci8/tests/lob_010.phpt +++ b/ext/oci8/tests/lob_010.phpt @@ -3,13 +3,13 @@ oci_lob_save() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -37,7 +37,7 @@ while (!$row[0]->eof()) { var_dump($row[0]->read(1024)); } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_011.phpt b/ext/oci8/tests/lob_011.phpt index bd516e013b..6f008b303c 100644 --- a/ext/oci8/tests/lob_011.phpt +++ b/ext/oci8/tests/lob_011.phpt @@ -3,13 +3,13 @@ oci_lob_copy() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (id, blob) @@ -63,7 +63,7 @@ oci_execute($s, OCI_DEFAULT); var_dump($row2 = oci_fetch_array($s, OCI_RETURN_LOBS)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_012.phpt b/ext/oci8/tests/lob_012.phpt index 480049cfab..94e3010629 100644 --- a/ext/oci8/tests/lob_012.phpt +++ b/ext/oci8/tests/lob_012.phpt @@ -3,13 +3,13 @@ oci_lob_export() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -35,13 +35,13 @@ oci_execute($s, OCI_DEFAULT); $row = oci_fetch_array($s); -var_dump($row[0]->export(dirname(__FILE__)."/lob_012.tmp", 3, 10)); +var_dump($row[0]->export(__DIR__."/lob_012.tmp", 3, 10)); -var_dump(file_get_contents(dirname(__FILE__)."/lob_012.tmp")); +var_dump(file_get_contents(__DIR__."/lob_012.tmp")); -@unlink(dirname(__FILE__)."/lob_012.tmp"); +@unlink(__DIR__."/lob_012.tmp"); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_013.phpt b/ext/oci8/tests/lob_013.phpt index 9120fa76c8..bd703465b5 100644 --- a/ext/oci8/tests/lob_013.phpt +++ b/ext/oci8/tests/lob_013.phpt @@ -3,13 +3,13 @@ lob buffering --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -41,7 +41,7 @@ $row = oci_fetch_array($s, OCI_RETURN_LOBS); var_dump($row[0]); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_014.phpt b/ext/oci8/tests/lob_014.phpt index b73e76fd4f..95029a02e6 100644 --- a/ext/oci8/tests/lob_014.phpt +++ b/ext/oci8/tests/lob_014.phpt @@ -3,13 +3,13 @@ oci_lob_free()/close() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -39,7 +39,7 @@ oci_execute($s); var_dump(oci_fetch_array($s, OCI_NUM + OCI_RETURN_LOBS)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_015.phpt b/ext/oci8/tests/lob_015.phpt index 592eaab9fb..d3d5ee3c5b 100644 --- a/ext/oci8/tests/lob_015.phpt +++ b/ext/oci8/tests/lob_015.phpt @@ -3,13 +3,13 @@ various tests with wrong param count --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -32,7 +32,7 @@ oci_execute($statement, OCI_DEFAULT); var_dump($blob); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_016.phpt b/ext/oci8/tests/lob_016.phpt index 70f93b90e1..098a65835e 100644 --- a/ext/oci8/tests/lob_016.phpt +++ b/ext/oci8/tests/lob_016.phpt @@ -3,12 +3,12 @@ returning multiple lobs --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table lob_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/lob_017.phpt b/ext/oci8/tests/lob_017.phpt index ada2dde7e0..c555125a75 100644 --- a/ext/oci8/tests/lob_017.phpt +++ b/ext/oci8/tests/lob_017.phpt @@ -3,12 +3,12 @@ returning multiple lobs (using persistent connection) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $c = oci_pconnect($user, $password, $dbase); diff --git a/ext/oci8/tests/lob_018.phpt b/ext/oci8/tests/lob_018.phpt index 89a02c1d08..be678728f0 100644 --- a/ext/oci8/tests/lob_018.phpt +++ b/ext/oci8/tests/lob_018.phpt @@ -3,12 +3,12 @@ fetching the same lob several times --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/lob_019.phpt b/ext/oci8/tests/lob_019.phpt Binary files differindex fb941851bd..4977b0a6ef 100644 --- a/ext/oci8/tests/lob_019.phpt +++ b/ext/oci8/tests/lob_019.phpt diff --git a/ext/oci8/tests/lob_020.phpt b/ext/oci8/tests/lob_020.phpt Binary files differindex c4ad5276b1..19a689dfd6 100644 --- a/ext/oci8/tests/lob_020.phpt +++ b/ext/oci8/tests/lob_020.phpt diff --git a/ext/oci8/tests/lob_021.phpt b/ext/oci8/tests/lob_021.phpt index 9eee7abd6c..609003603b 100644 --- a/ext/oci8/tests/lob_021.phpt +++ b/ext/oci8/tests/lob_021.phpt @@ -3,13 +3,13 @@ oci_lob_free()/close() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -44,7 +44,7 @@ oci_execute($s); var_dump(oci_fetch_array($s, OCI_NUM + OCI_RETURN_LOBS)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_022.phpt b/ext/oci8/tests/lob_022.phpt index 77a9b064e6..3de78dcd2a 100644 --- a/ext/oci8/tests/lob_022.phpt +++ b/ext/oci8/tests/lob_022.phpt @@ -3,12 +3,12 @@ fetching the same lob several times --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $drop = "DROP table lob_test"; $statement = oci_parse($c, $drop); diff --git a/ext/oci8/tests/lob_023.phpt b/ext/oci8/tests/lob_023.phpt index 09d04f8440..8093ab63af 100644 --- a/ext/oci8/tests/lob_023.phpt +++ b/ext/oci8/tests/lob_023.phpt @@ -3,13 +3,13 @@ oci_lob_import()/read() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -25,12 +25,12 @@ oci_execute($statement, OCI_DEFAULT); var_dump($blob); var_dump($blob->seek(10, OCI_SEEK_CUR)); -var_dump($blob->import(dirname(__FILE__)."/lob_009.txt")); +var_dump($blob->import(__DIR__."/lob_009.txt")); var_dump($blob->import()); var_dump(oci_lob_import($blob)); -var_dump(oci_lob_import($blob, dirname(__FILE__)."/lob_009.txt")); +var_dump(oci_lob_import($blob, __DIR__."/lob_009.txt")); unset($blob->descriptor); -var_dump(oci_lob_import($blob, dirname(__FILE__)."/lob_009.txt")); +var_dump(oci_lob_import($blob, __DIR__."/lob_009.txt")); oci_commit($c); $select_sql = "SELECT blob FROM ".$schema.$table_name." FOR UPDATE"; @@ -43,7 +43,7 @@ while (!$row[0]->eof()) { var_dump(str_replace("\r", "", $row[0]->read(1024))); } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_024.phpt b/ext/oci8/tests/lob_024.phpt index 958cb3ed13..53a043fd95 100644 --- a/ext/oci8/tests/lob_024.phpt +++ b/ext/oci8/tests/lob_024.phpt @@ -3,13 +3,13 @@ oci_lob_load() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -42,7 +42,7 @@ var_dump(oci_lob_load()); unset($row[0]->descriptor); var_dump(oci_lob_load($row[0])); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_025.phpt b/ext/oci8/tests/lob_025.phpt index 7260d9820b..7f3dff8bb4 100644 --- a/ext/oci8/tests/lob_025.phpt +++ b/ext/oci8/tests/lob_025.phpt @@ -3,13 +3,13 @@ oci_lob_read() tests --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -44,7 +44,7 @@ unset($row[0]->descriptor); var_dump(oci_lob_read($row[0],1)); var_dump(oci_lob_eof($row[0])); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_026.phpt b/ext/oci8/tests/lob_026.phpt index 42f0d8f775..acada8a9d3 100644 --- a/ext/oci8/tests/lob_026.phpt +++ b/ext/oci8/tests/lob_026.phpt @@ -3,13 +3,13 @@ oci_lob_seek()/rewind()/append() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -56,7 +56,7 @@ $row = oci_fetch_array($s); var_dump(oci_lob_read($row[0], 10000)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_027.phpt b/ext/oci8/tests/lob_027.phpt index 51868bd8be..ec759ccb0a 100644 --- a/ext/oci8/tests/lob_027.phpt +++ b/ext/oci8/tests/lob_027.phpt @@ -3,13 +3,13 @@ oci_lob_truncate() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -61,7 +61,7 @@ var_dump($row['BLOB']->truncate(0)); oci_commit($c); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_028.phpt b/ext/oci8/tests/lob_028.phpt index e48d33fff1..2c6c77bef8 100644 --- a/ext/oci8/tests/lob_028.phpt +++ b/ext/oci8/tests/lob_028.phpt @@ -3,12 +3,12 @@ Test descriptor types for oci_new_descriptor() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Successful statements diff --git a/ext/oci8/tests/lob_029.phpt b/ext/oci8/tests/lob_029.phpt index 615c2722f2..3f25dda71a 100644 --- a/ext/oci8/tests/lob_029.phpt +++ b/ext/oci8/tests/lob_029.phpt @@ -3,7 +3,7 @@ reading/writing BFILE LOBs --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ob_start(); phpinfo(INFO_MODULES); $phpinfo = ob_get_clean(); @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') die("skip Test script not ported to Windows") --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); $realdirname = "/tmp"; // Use /tmp because a local dir can give ORA-22288 depending on perms $realfilename1 = "oci8bfiletest1.txt"; diff --git a/ext/oci8/tests/lob_030.phpt b/ext/oci8/tests/lob_030.phpt index 014d40a2a5..39fb1304d0 100644 --- a/ext/oci8/tests/lob_030.phpt +++ b/ext/oci8/tests/lob_030.phpt @@ -3,13 +3,13 @@ Test piecewise fetch of CLOBs equal to, and larger than PHP_OCI_LOB_BUFFER_SIZE --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; function insert_verify($c, $tn, $id, $length) { @@ -57,7 +57,7 @@ insert_verify($c, $schema.$table_name, 5, 1049028-1); echo "Test 6: A CLOB of 1049028+1 bytes\n"; insert_verify($c, $schema.$table_name, 6, 1049028+1); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_031.phpt b/ext/oci8/tests/lob_031.phpt index 9916844292..52119856d6 100644 --- a/ext/oci8/tests/lob_031.phpt +++ b/ext/oci8/tests/lob_031.phpt @@ -3,13 +3,13 @@ Test LOB->read(), LOB->seek() and LOB->tell() with nul bytes in data --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -86,7 +86,7 @@ echo "15. ".$row[0]->tell(). "\n"; $row[0]->seek(-4, OCI_SEEK_END); echo "16. ".$row[0]->tell(). "\n"; -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_032.phpt b/ext/oci8/tests/lob_032.phpt index f3077997d7..989615d049 100644 --- a/ext/oci8/tests/lob_032.phpt +++ b/ext/oci8/tests/lob_032.phpt @@ -3,13 +3,13 @@ oci_lob_write() and friends --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (id, clob) @@ -26,7 +26,7 @@ oci_execute($statement, OCI_DEFAULT); oci_commit($c); // This will cause subsequent ->write() to fail $clob->write("data"); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_033.phpt b/ext/oci8/tests/lob_033.phpt index 05bafa8f58..0fa59237e5 100644 --- a/ext/oci8/tests/lob_033.phpt +++ b/ext/oci8/tests/lob_033.phpt @@ -3,13 +3,13 @@ various oci_lob_write() error messages --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (id, blob) @@ -29,7 +29,7 @@ oci_execute($statement, OCI_DEFAULT); var_dump($blob->save("")); var_dump($blob->save("data", 100)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_034.phpt b/ext/oci8/tests/lob_034.phpt index e911d343fb..da88e653d1 100644 --- a/ext/oci8/tests/lob_034.phpt +++ b/ext/oci8/tests/lob_034.phpt @@ -3,13 +3,13 @@ lob buffering - 2 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -34,7 +34,7 @@ var_dump($blob->flush(-1)); oci_commit($c); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_035.phpt b/ext/oci8/tests/lob_035.phpt index 665b760d1c..12f0644e41 100644 --- a/ext/oci8/tests/lob_035.phpt +++ b/ext/oci8/tests/lob_035.phpt @@ -3,13 +3,13 @@ oci_lob_copy() - 2 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (id, blob) @@ -77,7 +77,7 @@ oci_execute($s, OCI_DEFAULT); var_dump($row2 = oci_fetch_array($s, OCI_RETURN_LOBS)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_036.phpt b/ext/oci8/tests/lob_036.phpt index da1ce3b881..b440a4ea13 100644 --- a/ext/oci8/tests/lob_036.phpt +++ b/ext/oci8/tests/lob_036.phpt @@ -3,13 +3,13 @@ Exercise cleanup code when LOB buffering is on --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -31,7 +31,7 @@ var_dump($blob->write("test")); $blob = null; -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_037.phpt b/ext/oci8/tests/lob_037.phpt index a8c868a869..a26357615b 100644 --- a/ext/oci8/tests/lob_037.phpt +++ b/ext/oci8/tests/lob_037.phpt @@ -3,13 +3,13 @@ Fetching two different lobs and using them after fetch --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; /* insert the first LOB */ $ora_sql = "INSERT INTO @@ -58,7 +58,7 @@ $rows[1] = oci_fetch_assoc($s); var_dump($rows[0]['BLOB']->read(1000)); var_dump($rows[1]['BLOB']->read(1000)); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_038.phpt b/ext/oci8/tests/lob_038.phpt index effb466214..48749d9143 100644 --- a/ext/oci8/tests/lob_038.phpt +++ b/ext/oci8/tests/lob_038.phpt @@ -3,13 +3,13 @@ Array fetch CLOB and BLOB --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; echo "Test 1: CLOB\n"; @@ -55,11 +55,11 @@ while ($row = oci_fetch_array($s, OCI_ASSOC)) { } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Test 2: BLOB\n"; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -99,7 +99,7 @@ while ($row = oci_fetch_array($s, OCI_ASSOC)) { } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_039.phpt b/ext/oci8/tests/lob_039.phpt index db398e3976..bde7c4b2c3 100644 --- a/ext/oci8/tests/lob_039.phpt +++ b/ext/oci8/tests/lob_039.phpt @@ -3,13 +3,13 @@ Test CLOB->write() for multiple inserts --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; echo "Test 1: CLOB\n"; @@ -43,7 +43,7 @@ oci_fetch_all($s, $res); var_dump($res); -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_040.phpt b/ext/oci8/tests/lob_040.phpt index 779b3b16f2..2c0d361a59 100644 --- a/ext/oci8/tests/lob_040.phpt +++ b/ext/oci8/tests/lob_040.phpt @@ -3,15 +3,15 @@ Bug #37706 (Test LOB locator reuse. Extends simple test of lob_037.phpt) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php define('NUMLOBS', 200); -require(dirname(__FILE__).'/connect.inc'); -require(dirname(__FILE__).'/create_table.inc'); +require(__DIR__.'/connect.inc'); +require(__DIR__.'/create_table.inc'); for ($i = 0; $i < NUMLOBS; $i++) { $s = oci_parse($c, "insert into ".$schema.$table_name." (id, clob) values(".$i.", '".$i."aaaa".$i.$i."aaaaaaaaaaaaaaaaaaaaaaaaaaaz')"); diff --git a/ext/oci8/tests/lob_041.phpt b/ext/oci8/tests/lob_041.phpt index 2243b978a0..dd0bfd58be 100644 --- a/ext/oci8/tests/lob_041.phpt +++ b/ext/oci8/tests/lob_041.phpt @@ -3,12 +3,12 @@ Check LOBS are valid after statement free --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Initialization diff --git a/ext/oci8/tests/lob_042.phpt b/ext/oci8/tests/lob_042.phpt index fd87c5de75..a6d1cc9588 100644 --- a/ext/oci8/tests/lob_042.phpt +++ b/ext/oci8/tests/lob_042.phpt @@ -3,13 +3,13 @@ Check various LOB error messages --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); -require(dirname(__FILE__).'/create_table.inc'); +require(__DIR__.'/connect.inc'); +require(__DIR__.'/create_table.inc'); $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) @@ -38,7 +38,7 @@ var_dump($blob->read(2)); var_dump($blob->import("does_not_exist")); var_dump($blob->saveFile("does_not_exist")); -require(dirname(__FILE__).'/drop_table.inc'); +require(__DIR__.'/drop_table.inc'); echo "Done\n"; diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index b4ac8d240b..25e6870832 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -3,13 +3,13 @@ Bug #49560 (LOB resource destructor and refcount test) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/lob_044.phpt b/ext/oci8/tests/lob_044.phpt index 4ed661c0e6..a2007c9c4b 100644 --- a/ext/oci8/tests/lob_044.phpt +++ b/ext/oci8/tests/lob_044.phpt @@ -3,12 +3,12 @@ oci_lob_truncate() with default parameter value --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/oci8/tests/lob_aliases.phpt b/ext/oci8/tests/lob_aliases.phpt index 8707533d63..d344557b47 100644 --- a/ext/oci8/tests/lob_aliases.phpt +++ b/ext/oci8/tests/lob_aliases.phpt @@ -3,7 +3,7 @@ LOB method aliases --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/oci8/tests/lob_null.phpt b/ext/oci8/tests/lob_null.phpt index f4dac4de7a..2543aeef81 100644 --- a/ext/oci8/tests/lob_null.phpt +++ b/ext/oci8/tests/lob_null.phpt @@ -3,12 +3,12 @@ Test null data for CLOBs --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; // Initialization diff --git a/ext/oci8/tests/lob_temp.phpt b/ext/oci8/tests/lob_temp.phpt index 59db20fc13..dd74499d68 100644 --- a/ext/oci8/tests/lob_temp.phpt +++ b/ext/oci8/tests/lob_temp.phpt @@ -3,12 +3,12 @@ temporary lobs --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $blob = oci_new_descriptor($c,OCI_D_LOB); var_dump($blob->writeTemporary("test")); diff --git a/ext/oci8/tests/lob_temp1.phpt b/ext/oci8/tests/lob_temp1.phpt index de1e30630a..76423c3802 100644 --- a/ext/oci8/tests/lob_temp1.phpt +++ b/ext/oci8/tests/lob_temp1.phpt @@ -3,12 +3,12 @@ closing temporary lobs --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; +require __DIR__.'/connect.inc'; $blob = oci_new_descriptor($c,OCI_D_LOB); var_dump($blob->writeTemporary("test")); diff --git a/ext/oci8/tests/lob_temp2.phpt b/ext/oci8/tests/lob_temp2.phpt index 8592fa1750..e789014d36 100644 --- a/ext/oci8/tests/lob_temp2.phpt +++ b/ext/oci8/tests/lob_temp2.phpt @@ -4,13 +4,13 @@ Writing temporary lob before binding <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); -require(dirname(__FILE__).'/create_table.inc'); +require(__DIR__.'/connect.inc'); +require(__DIR__.'/create_table.inc'); $ora_sql = "INSERT INTO ".$schema.$table_name." (clob) VALUES (:v_clob)"; diff --git a/ext/oci8/tests/null_byte_1.phpt b/ext/oci8/tests/null_byte_1.phpt index 0869d94123..61b5ecc2fe 100644 --- a/ext/oci8/tests/null_byte_1.phpt +++ b/ext/oci8/tests/null_byte_1.phpt @@ -16,7 +16,7 @@ error_reporting = E_WARNING // See http://news.php.net/php.internals/50202 // http://svn.php.net/viewvc?view=revision&revision=311870 -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/null_byte_2.phpt b/ext/oci8/tests/null_byte_2.phpt index 0bb9a38f65..e95564e322 100644 --- a/ext/oci8/tests/null_byte_2.phpt +++ b/ext/oci8/tests/null_byte_2.phpt @@ -3,7 +3,7 @@ Null bytes in SQL statements --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --INI-- display_errors = On @@ -11,7 +11,7 @@ error_reporting = E_WARNING --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/null_byte_3.phpt b/ext/oci8/tests/null_byte_3.phpt index 73d5c26c0b..f44d218aa0 100644 --- a/ext/oci8/tests/null_byte_3.phpt +++ b/ext/oci8/tests/null_byte_3.phpt @@ -8,7 +8,7 @@ error_reporting = E_WARNING --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/num.phpt b/ext/oci8/tests/num.phpt index 0fe85ccddc..d23450734f 100644 --- a/ext/oci8/tests/num.phpt +++ b/ext/oci8/tests/num.phpt @@ -5,7 +5,7 @@ oci_num_*() family --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/oci_execute_segfault.phpt b/ext/oci8/tests/oci_execute_segfault.phpt index 08a41a82ec..957318e758 100644 --- a/ext/oci8/tests/oci_execute_segfault.phpt +++ b/ext/oci8/tests/oci_execute_segfault.phpt @@ -3,13 +3,13 @@ oci_execute() segfault after repeated bind of LOB descriptor --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob, clob) @@ -38,7 +38,7 @@ while ($arr = oci_fetch_assoc($s)) { var_dump($result); } -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/old_oci_close.phpt b/ext/oci8/tests/old_oci_close.phpt index f15b7febea..bc33108faf 100644 --- a/ext/oci8/tests/old_oci_close.phpt +++ b/ext/oci8/tests/old_oci_close.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=1 --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; var_dump($c); var_dump(oci_close($c)); diff --git a/ext/oci8/tests/old_oci_close1.phpt b/ext/oci8/tests/old_oci_close1.phpt index 02b68f45c7..96d1afe8ac 100644 --- a/ext/oci8/tests/old_oci_close1.phpt +++ b/ext/oci8/tests/old_oci_close1.phpt @@ -7,7 +7,7 @@ oci8.old_oci_close_semantics=0 --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; var_dump($c); var_dump(oci_close($c)); diff --git a/ext/oci8/tests/password.phpt b/ext/oci8/tests/password.phpt index d48950efcd..b3f3bfce0c 100644 --- a/ext/oci8/tests/password.phpt +++ b/ext/oci8/tests/password.phpt @@ -3,7 +3,7 @@ oci_password_change() for non-persistent connections --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/details.inc"); +require(__DIR__."/details.inc"); if (empty($dbase)) die ("skip requires database connection string be set"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip password change not supported in DRCP Mode"); @@ -11,7 +11,7 @@ if ($test_drcp) die("skip password change not supported in DRCP Mode"); --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmtarray = array( "drop user testuser_pw cascade", @@ -64,7 +64,7 @@ echo "Done\n"; --CLEAN-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmtarray = array( "drop user testuser_pw cascade" diff --git a/ext/oci8/tests/password_2.phpt b/ext/oci8/tests/password_2.phpt index 62fddb4c36..b3e9e3058f 100644 --- a/ext/oci8/tests/password_2.phpt +++ b/ext/oci8/tests/password_2.phpt @@ -3,7 +3,7 @@ oci_password_change() for persistent connections --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/details.inc"); +require(__DIR__."/details.inc"); if (empty($dbase)) die ("skip requires database connection string be set"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip password change not supported in DRCP Mode"); @@ -11,7 +11,7 @@ if ($test_drcp) die("skip password change not supported in DRCP Mode"); --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmtarray = array( "drop user testuser_pw2 cascade", @@ -63,7 +63,7 @@ echo "Done\n"; --CLEAN-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmtarray = array( "drop user testuser_pw2 cascade" diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt index 9977b10a7b..6e9d2f4780 100644 --- a/ext/oci8/tests/password_new.phpt +++ b/ext/oci8/tests/password_new.phpt @@ -3,8 +3,8 @@ oci_password_change() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes -require(dirname(__FILE__).'/skipif.inc'); -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/skipif.inc'); +require(__DIR__.'/connect.inc'); if (empty($dbase)) die ("skip requires database connection string be set"); if ($test_drcp) die("skip password change not supported in DRCP Mode"); @@ -33,7 +33,7 @@ if (isset($matches_sv[0]) && $matches_sv[1] >= 12) { --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $new_password = "test"; var_dump(oci_password_change($dbase, $user, $password, $new_password)); diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt index b2365292a4..f791e25c3a 100644 --- a/ext/oci8/tests/password_old.phpt +++ b/ext/oci8/tests/password_old.phpt @@ -3,8 +3,8 @@ ocipasswordchange() --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes -require(dirname(__FILE__).'/skipif.inc'); -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/skipif.inc'); +require(__DIR__.'/connect.inc'); if (empty($dbase)) die ("skip requires database connection string be set"); if ($test_drcp) die("skip password change not supported in DRCP Mode"); @@ -33,7 +33,7 @@ if (isset($matches_sv[0]) && $matches_sv[1] >= 12) { --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $new_password = "test"; var_dump(ocipasswordchange($dbase, $user, $password, $new_password)); diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt index 9ec102ad0d..c0265af34f 100644 --- a/ext/oci8/tests/pecl_bug10194.phpt +++ b/ext/oci8/tests/pecl_bug10194.phpt @@ -3,7 +3,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (getenv("USE_ZEND_ALLOC") === "0") { die("skip Zend MM disabled"); @@ -14,8 +14,8 @@ memory_limit=10M --FILE-- <?php -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (clob) @@ -46,7 +46,7 @@ oci_execute($statement); $row = oci_fetch_assoc($statement); var_dump(strlen($row['CLOB']->load())); /* here it should fail */ -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt index aab1cf8882..860bd5688f 100644 --- a/ext/oci8/tests/pecl_bug10194_blob.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob.phpt @@ -3,7 +3,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only"); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (getenv("USE_ZEND_ALLOC") === "0") { @@ -17,8 +17,8 @@ memory_limit=3M // This test is dependent on the behavior of the memory manager -require(dirname(__FILE__).'/connect.inc'); -require(dirname(__FILE__).'/create_table.inc'); +require(__DIR__.'/connect.inc'); +require(__DIR__.'/create_table.inc'); $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) VALUES (empty_blob())"; @@ -48,7 +48,7 @@ echo "Before load()\n"; $row = oci_fetch_assoc($statement); var_dump(strlen($row['BLOB']->load())); /* here it should fail */ -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt index ca5e568be3..bfb60f310a 100644 --- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt @@ -3,7 +3,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); if (getenv("USE_ZEND_ALLOC") === "0") { @@ -17,8 +17,8 @@ memory_limit=6M // This test is dependent on the behavior of the memory manager -require dirname(__FILE__).'/connect.inc'; -require dirname(__FILE__).'/create_table.inc'; +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) VALUES (empty_blob())"; @@ -49,7 +49,7 @@ echo "Before load()\n"; $row = oci_fetch_assoc($statement); var_dump(strlen($row['BLOB']->load())); /* here it should fail */ -require dirname(__FILE__).'/drop_table.inc'; +require __DIR__.'/drop_table.inc'; echo "Done\n"; ?> diff --git a/ext/oci8/tests/pecl_bug16842.phpt b/ext/oci8/tests/pecl_bug16842.phpt index 52c6df8e33..c4a3fc2650 100644 --- a/ext/oci8/tests/pecl_bug16842.phpt +++ b/ext/oci8/tests/pecl_bug16842.phpt @@ -3,14 +3,14 @@ PECL Bug #16842 (NO_DATA_FOUND exception is a warning) --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --INI-- error_reporting = E_WARNING --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/pecl_bug6109.phpt b/ext/oci8/tests/pecl_bug6109.phpt index d0762fa883..f5cee7065d 100644 --- a/ext/oci8/tests/pecl_bug6109.phpt +++ b/ext/oci8/tests/pecl_bug6109.phpt @@ -5,7 +5,7 @@ PECL Bug #6109 (Error messages not kept) --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Run Test diff --git a/ext/oci8/tests/pecl_bug8816.phpt b/ext/oci8/tests/pecl_bug8816.phpt index 9e151f6a8c..30b76265dc 100644 --- a/ext/oci8/tests/pecl_bug8816.phpt +++ b/ext/oci8/tests/pecl_bug8816.phpt @@ -3,12 +3,12 @@ PECL Bug #8816 (issue in php_oci_statement_fetch with more than one piecewise co --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $create_1 = "CREATE TABLE t1 (id INTEGER, l1 LONG)"; $create_2 = "CREATE TABLE t2 (id INTEGER, l2 LONG)"; diff --git a/ext/oci8/tests/persistent.phpt b/ext/oci8/tests/persistent.phpt index 1bdfc3c90f..a89f3967e7 100644 --- a/ext/oci8/tests/persistent.phpt +++ b/ext/oci8/tests/persistent.phpt @@ -5,7 +5,7 @@ reusing persistent connections --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; var_dump(oci_pconnect($user, $password, $dbase)); var_dump(oci_pconnect($user, $password, $dbase)); diff --git a/ext/oci8/tests/prefetch.phpt b/ext/oci8/tests/prefetch.phpt index b163a89e94..fa71b5ac6a 100644 --- a/ext/oci8/tests/prefetch.phpt +++ b/ext/oci8/tests/prefetch.phpt @@ -5,7 +5,7 @@ oci_set_prefetch() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialize diff --git a/ext/oci8/tests/prefetch_old.phpt b/ext/oci8/tests/prefetch_old.phpt index 7f50993a64..58bdae7565 100644 --- a/ext/oci8/tests/prefetch_old.phpt +++ b/ext/oci8/tests/prefetch_old.phpt @@ -5,7 +5,7 @@ ocisetprefetch() --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); $stmtarray = array( "drop table prefetch_old_tab", diff --git a/ext/oci8/tests/privileged_connect.phpt b/ext/oci8/tests/privileged_connect.phpt index cb19d73907..5d9fbb0a45 100644 --- a/ext/oci8/tests/privileged_connect.phpt +++ b/ext/oci8/tests/privileged_connect.phpt @@ -5,7 +5,7 @@ privileged connect tests --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; oci_connect("", "", "", false, OCI_SYSOPER); oci_connect("", "", "", false, OCI_SYSDBA); diff --git a/ext/oci8/tests/privileged_connect1.phpt b/ext/oci8/tests/privileged_connect1.phpt index a4b8b76ba7..181dba5f1d 100644 --- a/ext/oci8/tests/privileged_connect1.phpt +++ b/ext/oci8/tests/privileged_connect1.phpt @@ -7,7 +7,7 @@ oci8.privileged_connect=1 --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; oci_connect("", "", "", false, OCI_SYSOPER); oci_connect("", "", "", false, OCI_SYSDBA); diff --git a/ext/oci8/tests/refcur_prefetch_1.phpt b/ext/oci8/tests/refcur_prefetch_1.phpt index 97fc7dce20..1f00b9b031 100644 --- a/ext/oci8/tests/refcur_prefetch_1.phpt +++ b/ext/oci8/tests/refcur_prefetch_1.phpt @@ -3,7 +3,7 @@ Prefetch with REF cursor. Test different values for prefetch with oci_set_prefet --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && ($matches[1] >= 10))) { @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Creates the necessary package and tables. $stmtarray = array( diff --git a/ext/oci8/tests/refcur_prefetch_2.phpt b/ext/oci8/tests/refcur_prefetch_2.phpt index 586aece8f0..10f0764a7a 100644 --- a/ext/oci8/tests/refcur_prefetch_2.phpt +++ b/ext/oci8/tests/refcur_prefetch_2.phpt @@ -3,7 +3,7 @@ Prefetch with REF cursor. Test No 2 --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && ($matches[1] >= 10))) { @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; // Creates the necessary package and tables. $stmtarray = array( diff --git a/ext/oci8/tests/refcur_prefetch_3.phpt b/ext/oci8/tests/refcur_prefetch_3.phpt index 8129fb2ec9..bfc2faf5bf 100644 --- a/ext/oci8/tests/refcur_prefetch_3.phpt +++ b/ext/oci8/tests/refcur_prefetch_3.phpt @@ -5,7 +5,7 @@ oci8.default_prefetch=5 --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && (($matches[1] == 11 && $matches[2] >= 2) || @@ -23,7 +23,7 @@ if (!(isset($matches[0]) && ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; //Create tables here $stmtarray = array( diff --git a/ext/oci8/tests/refcur_prefetch_4.phpt b/ext/oci8/tests/refcur_prefetch_4.phpt index 8ec4c983a3..8aee48cfee 100644 --- a/ext/oci8/tests/refcur_prefetch_4.phpt +++ b/ext/oci8/tests/refcur_prefetch_4.phpt @@ -3,7 +3,7 @@ Prefetch with REF cursor. Test No 4 --SKIPIF-- <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); if (!extension_loaded('oci8')) die("skip no oci8 extension"); -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && ($matches[1] >= 10))) { @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && ?> --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; // Creates the necessary package and tables. $stmtarray = array( diff --git a/ext/oci8/tests/select_null.phpt b/ext/oci8/tests/select_null.phpt index 23e5923b8e..a6f0c645d7 100644 --- a/ext/oci8/tests/select_null.phpt +++ b/ext/oci8/tests/select_null.phpt @@ -5,7 +5,7 @@ SELECTing NULL values --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $pc = oci_pconnect($user, $password, $dbase); diff --git a/ext/oci8/tests/serverversion.phpt b/ext/oci8/tests/serverversion.phpt index 1c4b7d7d26..2667cc5539 100644 --- a/ext/oci8/tests/serverversion.phpt +++ b/ext/oci8/tests/serverversion.phpt @@ -5,7 +5,7 @@ oci_server_version() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump($c = oci_connect($user, $password, $dbase)); diff --git a/ext/oci8/tests/statement_cache.phpt b/ext/oci8/tests/statement_cache.phpt index 8ab9ddc8c1..78d1b57c89 100644 --- a/ext/oci8/tests/statement_cache.phpt +++ b/ext/oci8/tests/statement_cache.phpt @@ -3,14 +3,14 @@ statement cache --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => true); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php // Note: with TimesTen, the column will be called "EXP" -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $pc = oci_pconnect($user, $password, $dbase); diff --git a/ext/oci8/tests/statement_type.phpt b/ext/oci8/tests/statement_type.phpt index ed71240a95..e294cac60e 100644 --- a/ext/oci8/tests/statement_type.phpt +++ b/ext/oci8/tests/statement_type.phpt @@ -5,7 +5,7 @@ oci_statement_type() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $sqls = Array( "SELECT * FROM table", diff --git a/ext/oci8/tests/statement_type_old.phpt b/ext/oci8/tests/statement_type_old.phpt index 2626d6203c..aa0565e27b 100644 --- a/ext/oci8/tests/statement_type_old.phpt +++ b/ext/oci8/tests/statement_type_old.phpt @@ -5,7 +5,7 @@ ocistatementtype() --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; if (!empty($dbase)) { var_dump($c = ocilogon($user, $password, $dbase)); diff --git a/ext/oci8/tests/testping.phpt b/ext/oci8/tests/testping.phpt index 720ba8d071..2c64c440d7 100644 --- a/ext/oci8/tests/testping.phpt +++ b/ext/oci8/tests/testping.phpt @@ -7,7 +7,7 @@ oci8.ping_interval=0 --FILE-- <?php -require(dirname(__FILE__).'/details.inc'); +require(__DIR__.'/details.inc'); for ($i = 0; $i < 2; $i++) { if (!empty($dbase)) { diff --git a/ext/oci8/tests/uncommitted.phpt b/ext/oci8/tests/uncommitted.phpt index cb90e4a514..c8e8a8d581 100644 --- a/ext/oci8/tests/uncommitted.phpt +++ b/ext/oci8/tests/uncommitted.phpt @@ -5,7 +5,7 @@ uncommitted connection --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require __DIR__."/connect.inc"; $stmt = oci_parse($c, "select 1 from dual"); oci_execute($stmt, OCI_DEFAULT); diff --git a/ext/oci8/tests/xmltype_01.phpt b/ext/oci8/tests/xmltype_01.phpt index 8fb6206f26..debbe14f83 100644 --- a/ext/oci8/tests/xmltype_01.phpt +++ b/ext/oci8/tests/xmltype_01.phpt @@ -4,12 +4,12 @@ Basic XMLType test <?php if (!extension_loaded("simplexml")) die("skip no simplexml extension"); $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require(dirname(__FILE__)."/connect.inc"); +require(__DIR__."/connect.inc"); // Initialization diff --git a/ext/oci8/tests/xmltype_02.phpt b/ext/oci8/tests/xmltype_02.phpt index a21e5e47ef..35f8750255 100644 --- a/ext/oci8/tests/xmltype_02.phpt +++ b/ext/oci8/tests/xmltype_02.phpt @@ -3,13 +3,13 @@ Basic XMLType test #2 --SKIPIF-- <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs -require(dirname(__FILE__).'/skipif.inc'); +require(__DIR__.'/skipif.inc'); if (!extension_loaded("simplexml")) die ("skip no simplexml extension"); ?> --FILE-- <?php -require(dirname(__FILE__).'/connect.inc'); +require(__DIR__.'/connect.inc'); // Initialization diff --git a/ext/odbc/tests/bug47803.phpt b/ext/odbc/tests/bug47803.phpt index aa5925df7f..e80b0de38b 100644 --- a/ext/odbc/tests/bug47803.phpt +++ b/ext/odbc/tests/bug47803.phpt @@ -5,7 +5,7 @@ Bug #47803 Executing prepared statements is successful only for the first two st --FILE-- <?php -include dirname(__FILE__) . "/config.inc"; +include __DIR__ . "/config.inc"; $create_table = "CREATE TABLE FOO( [PAR_ID] [int] NOT NULL, diff --git a/ext/odbc/tests/bug73725.phpt b/ext/odbc/tests/bug73725.phpt index f0ab6ccc9a..1ab2ba0eaa 100644 --- a/ext/odbc/tests/bug73725.phpt +++ b/ext/odbc/tests/bug73725.phpt @@ -5,7 +5,7 @@ Bug #73725 Unable to retrieve value of varchar(max) type --FILE-- <?php -include dirname(__FILE__) . "/config.inc"; +include __DIR__ . "/config.inc"; $conn = odbc_connect($dsn, $user, $pass); diff --git a/ext/opcache/tests/blacklist-win32.phpt b/ext/opcache/tests/blacklist-win32.phpt index 70c87338b5..17d75119ae 100644 --- a/ext/opcache/tests/blacklist-win32.phpt +++ b/ext/opcache/tests/blacklist-win32.phpt @@ -13,8 +13,8 @@ opcache.file_cache_only=0 <?php $conf = opcache_get_configuration(); $conf = $conf['blacklist']; -$conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]); -$conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]); +$conf[3] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[3]); +$conf[4] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[4]); print_r($conf); include("blacklist.inc"); $status = opcache_get_status(); diff --git a/ext/opcache/tests/blacklist.phpt b/ext/opcache/tests/blacklist.phpt index 635c2ae419..21139b751d 100644 --- a/ext/opcache/tests/blacklist.phpt +++ b/ext/opcache/tests/blacklist.phpt @@ -21,8 +21,8 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { <?php $conf = opcache_get_configuration(); $conf = $conf['blacklist']; -$conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]); -$conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]); +$conf[3] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[3]); +$conf[4] = preg_replace("!^\\Q".__DIR__."\\E!", "__DIR__", $conf[4]); print_r($conf); include("blacklist.inc"); $status = opcache_get_status(); diff --git a/ext/opcache/tests/issue0140.phpt b/ext/opcache/tests/issue0140.phpt index 97fc11b3c7..3ca9b50d3c 100644 --- a/ext/opcache/tests/issue0140.phpt +++ b/ext/opcache/tests/issue0140.phpt @@ -11,7 +11,7 @@ opcache.file_update_protection=0 <?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow tests excluded by request") ?> --FILE-- <?php -define("FILENAME", dirname(__FILE__) . "/issuer0140.inc.php"); +define("FILENAME", __DIR__ . "/issuer0140.inc.php"); file_put_contents(FILENAME, "1\n"); var_dump(is_readable(FILENAME)); diff --git a/ext/opcache/tests/revalidate_path_01.phpt b/ext/opcache/tests/revalidate_path_01.phpt index b924ba746b..d982613103 100644 --- a/ext/opcache/tests/revalidate_path_01.phpt +++ b/ext/opcache/tests/revalidate_path_01.phpt @@ -11,7 +11,7 @@ opcache.revalidate_path=1 server --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $dir1 = "$dir/test1"; $dir2 = "$dir/test2"; $link = "$dir/test"; @@ -56,7 +56,7 @@ echo file_get_contents('http://' . PHP_CLI_SERVER_ADDRESS . '/main.php'); ?> --CLEAN-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $dir1 = "$dir/test1"; $dir2 = "$dir/test2"; $link = "$dir/test"; diff --git a/ext/openssl/tests/bug28382.phpt b/ext/openssl/tests/bug28382.phpt index 1ff839bf4c..f64e77dbd2 100644 --- a/ext/openssl/tests/bug28382.phpt +++ b/ext/openssl/tests/bug28382.phpt @@ -6,7 +6,7 @@ if (!extension_loaded("openssl")) die("skip"); ?> --FILE-- <?php -$cert = file_get_contents(dirname(__FILE__) . "/bug28382cert.txt"); +$cert = file_get_contents(__DIR__ . "/bug28382cert.txt"); $ext = openssl_x509_parse($cert); var_dump($ext['extensions']); /* openssl 1.0 prepends the string "Full Name:" to the crlDistributionPoints array key. diff --git a/ext/openssl/tests/bug37820.phpt b/ext/openssl/tests/bug37820.phpt index 9eb27fa0f0..e5a0fd599a 100644 --- a/ext/openssl/tests/bug37820.phpt +++ b/ext/openssl/tests/bug37820.phpt @@ -6,7 +6,7 @@ if (!extension_loaded("openssl")) die("skip"); ?> --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $file_pub = $dir . '/bug37820cert.pem'; $file_key = $dir . '/bug37820key.pem'; diff --git a/ext/openssl/tests/bug39217.phpt b/ext/openssl/tests/bug39217.phpt index b9c5e50a73..a1b20233e9 100644 --- a/ext/openssl/tests/bug39217.phpt +++ b/ext/openssl/tests/bug39217.phpt @@ -6,7 +6,7 @@ if (!extension_loaded("openssl")) die("skip"); ?> --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $certs = array('bug39217cert2.txt', 'bug39217cert1.txt'); foreach($certs as $cert) { $res = openssl_x509_parse(file_get_contents($dir . '/' . $cert)); diff --git a/ext/openssl/tests/bug41033.phpt b/ext/openssl/tests/bug41033.phpt index 6f8ebc64c3..d4b372f8c0 100644 --- a/ext/openssl/tests/bug41033.phpt +++ b/ext/openssl/tests/bug41033.phpt @@ -6,8 +6,8 @@ if (!extension_loaded("openssl")) die("skip, openssl required"); ?> --FILE-- <?php -$prv = 'file://' . dirname(__FILE__) . '/' . 'bug41033.pem'; -$pub = 'file://' . dirname(__FILE__) . '/' . 'bug41033pub.pem'; +$prv = 'file://' . __DIR__ . '/' . 'bug41033.pem'; +$pub = 'file://' . __DIR__ . '/' . 'bug41033pub.pem'; $prkeyid = openssl_get_privatekey($prv, "1234"); diff --git a/ext/openssl/tests/bug70438.phpt b/ext/openssl/tests/bug70438.phpt index e25c37168b..44d5338264 100644 --- a/ext/openssl/tests/bug70438.phpt +++ b/ext/openssl/tests/bug70438.phpt @@ -11,8 +11,8 @@ if (!in_array('AES-128-CBC', openssl_get_cipher_methods(true))) { <?php $data = "openssl_seal() test"; $cipher = 'AES-128-CBC'; -$pub_key = "file://" . dirname(__FILE__) . "/public.key"; -$priv_key = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; +$pub_key = "file://" . __DIR__ . "/public.key"; +$priv_key = "file://" . __DIR__ . "/private_rsa_1024.key"; openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key), $cipher); openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key), 'sparkles', $iv); diff --git a/ext/openssl/tests/bug71917.phpt b/ext/openssl/tests/bug71917.phpt index c7f91dbb55..a68cf0162c 100644 --- a/ext/openssl/tests/bug71917.phpt +++ b/ext/openssl/tests/bug71917.phpt @@ -7,8 +7,8 @@ if (!extension_loaded("openssl")) die("skip openssl not loaded"); --FILE-- <?php function test($envkey) { - $publicKey = "file://" . dirname(__FILE__) . "/public.key"; - $privateKey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; + $publicKey = "file://" . __DIR__ . "/public.key"; + $privateKey = "file://" . __DIR__ . "/private_rsa_1024.key"; openssl_public_encrypt($envkey, $envelope, $publicKey); $sealed = openssl_encrypt( 'plaintext', diff --git a/ext/openssl/tests/bug73711.phpt b/ext/openssl/tests/bug73711.phpt index 791eec99c6..c5f5575e2c 100644 --- a/ext/openssl/tests/bug73711.phpt +++ b/ext/openssl/tests/bug73711.phpt @@ -6,7 +6,7 @@ if (!extension_loaded("openssl")) die("skip openssl not loaded"); ?> --FILE-- <?php -$cnf = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bug73711.cnf'; +$cnf = __DIR__ . DIRECTORY_SEPARATOR . 'bug73711.cnf'; var_dump(openssl_pkey_new(["private_key_type" => OPENSSL_KEYTYPE_DSA, 'config' => $cnf])); var_dump(openssl_pkey_new(["private_key_type" => OPENSSL_KEYTYPE_DH, 'config' => $cnf])); echo "DONE"; diff --git a/ext/openssl/tests/bug74022.phpt b/ext/openssl/tests/bug74022.phpt index e3ec128fdf..1bd2116241 100644 --- a/ext/openssl/tests/bug74022.phpt +++ b/ext/openssl/tests/bug74022.phpt @@ -6,7 +6,7 @@ if (!extension_loaded("openssl")) die("skip"); ?> --FILE-- <?php -$pfx = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug74022.pfx"; +$pfx = __DIR__ . DIRECTORY_SEPARATOR . "bug74022.pfx"; $cert_store = file_get_contents($pfx); var_dump(openssl_pkcs12_read($cert_store, $cert_info, "csos")); diff --git a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt index ccbd00f49a..7404bd28e3 100644 --- a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt +++ b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt @@ -4,7 +4,7 @@ openssl_csr_export_to_file() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$csrfile = dirname(__FILE__) . "/openssl_csr_export_to_file_csr.tmp"; +$csrfile = __DIR__ . "/openssl_csr_export_to_file_csr.tmp"; $wrong = "wrong"; $config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'; $phex = 'dcf93a0b883972ec0e19989ac5a2ce310e1d37717e8d9571bb7623731866e61e' . @@ -32,7 +32,7 @@ $args = array( "config" => $config, ); -$privkey_file = 'file://' . dirname(__FILE__) . '/private_rsa_2048.key'; +$privkey_file = 'file://' . __DIR__ . '/private_rsa_2048.key'; $csr = openssl_csr_new($dn, $privkey_file, $args); var_dump(openssl_csr_export_to_file($csr, $csrfile)); var_dump(file_get_contents($csrfile)); @@ -43,7 +43,7 @@ var_dump(openssl_csr_export_to_file($csr, $csrfile, false)); ?> --CLEAN-- <?php -$csrfile = dirname(__FILE__) . "/openssl_csr_export_to_file_csr.tmp"; +$csrfile = __DIR__ . "/openssl_csr_export_to_file_csr.tmp"; if (file_exists($csrfile)) { unlink($csrfile); } diff --git a/ext/openssl/tests/openssl_csr_get_public_key_basic.phpt b/ext/openssl/tests/openssl_csr_get_public_key_basic.phpt index 1958350dfb..866eeae169 100644 --- a/ext/openssl/tests/openssl_csr_get_public_key_basic.phpt +++ b/ext/openssl/tests/openssl_csr_get_public_key_basic.phpt @@ -32,9 +32,9 @@ $args = array( "config" => $config, ); -$privkey_file = 'file://' . dirname(__FILE__) . '/private_rsa_2048.key'; +$privkey_file = 'file://' . __DIR__ . '/private_rsa_2048.key'; $csr = openssl_csr_new($dn, $privkey_file, $args); -$csr_file = file_get_contents(dirname(__FILE__) . '/cert.csr'); +$csr_file = file_get_contents(__DIR__ . '/cert.csr'); var_dump(openssl_csr_get_public_key($csr)); var_dump(openssl_csr_get_public_key($csr_file)); diff --git a/ext/openssl/tests/openssl_csr_get_subject_basic.phpt b/ext/openssl/tests/openssl_csr_get_subject_basic.phpt index eba4a7ac8d..87ab824f35 100644 --- a/ext/openssl/tests/openssl_csr_get_subject_basic.phpt +++ b/ext/openssl/tests/openssl_csr_get_subject_basic.phpt @@ -32,9 +32,9 @@ $args = array( "config" => $config, ); -$privkey_file = 'file://' . dirname(__FILE__) . '/private_rsa_2048.key'; +$privkey_file = 'file://' . __DIR__ . '/private_rsa_2048.key'; $csr = openssl_csr_new($dn, $privkey_file, $args); -$csr_file = file_get_contents(dirname(__FILE__) . '/cert.csr'); +$csr_file = file_get_contents(__DIR__ . '/cert.csr'); var_dump(openssl_csr_get_subject($csr_file)); var_dump(openssl_csr_get_subject($csr, false)); diff --git a/ext/openssl/tests/openssl_csr_new_basic.phpt b/ext/openssl/tests/openssl_csr_new_basic.phpt index 816c6f9d90..83a056b061 100644 --- a/ext/openssl/tests/openssl_csr_new_basic.phpt +++ b/ext/openssl/tests/openssl_csr_new_basic.phpt @@ -10,7 +10,7 @@ var_dump(openssl_csr_new(1,$a)); var_dump(openssl_csr_new(1,$a,1,1)); $a = array(); -$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf'); +$conf = array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'); var_dump(openssl_csr_new(array(), $a, $conf, array())); // this leaks diff --git a/ext/openssl/tests/openssl_csr_sign_basic.phpt b/ext/openssl/tests/openssl_csr_sign_basic.phpt index 57c9e75c0e..969a8e1073 100644 --- a/ext/openssl/tests/openssl_csr_sign_basic.phpt +++ b/ext/openssl/tests/openssl_csr_sign_basic.phpt @@ -4,10 +4,10 @@ openssl_csr_sign() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$cert = "file://" . dirname(__FILE__) . "/cert.crt"; -$priv = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; +$cert = "file://" . __DIR__ . "/cert.crt"; +$priv = "file://" . __DIR__ . "/private_rsa_1024.key"; $wrong = "wrong"; -$pub = "file://" . dirname(__FILE__) . "/public.key"; +$pub = "file://" . __DIR__ . "/public.key"; $config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'; $config_arg = array('config' => $config); diff --git a/ext/openssl/tests/openssl_free_key.phpt b/ext/openssl/tests/openssl_free_key.phpt index aa4a3a8a35..0c8bdd92de 100644 --- a/ext/openssl/tests/openssl_free_key.phpt +++ b/ext/openssl/tests/openssl_free_key.phpt @@ -21,7 +21,7 @@ for ($z = "", $i = 0; $i < 1024; $i++) { usleep($i); } -$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf'); +$conf = array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'); $privkey = openssl_pkey_new($conf); if ($privkey === false) diff --git a/ext/openssl/tests/openssl_open_basic.phpt b/ext/openssl/tests/openssl_open_basic.phpt index 55bb9eb0e3..d564bcf8e8 100644 --- a/ext/openssl/tests/openssl_open_basic.phpt +++ b/ext/openssl/tests/openssl_open_basic.phpt @@ -5,8 +5,8 @@ openssl_open() tests --FILE-- <?php $data = "openssl_open() test"; -$pub_key = "file://" . dirname(__FILE__) . "/public.key"; -$priv_key = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; +$pub_key = "file://" . __DIR__ . "/public.key"; +$priv_key = "file://" . __DIR__ . "/private_rsa_1024.key"; $wrong = "wrong"; openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key, $pub_key)); diff --git a/ext/openssl/tests/openssl_pkcs12_export_basic.phpt b/ext/openssl/tests/openssl_pkcs12_export_basic.phpt index 65692cfe92..08e56d92a5 100644 --- a/ext/openssl/tests/openssl_pkcs12_export_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs12_export_basic.phpt @@ -4,17 +4,17 @@ openssl_pkcs12_export() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$cert_file = dirname(__FILE__) . "/public.crt"; +$cert_file = __DIR__ . "/public.crt"; $cert = file_get_contents($cert_file); $cert_path = "file://" . $cert_file; -$priv_file = dirname(__FILE__) . "/private.crt"; +$priv_file = __DIR__ . "/private.crt"; $priv = file_get_contents($priv_file); $priv_path = "file://" . $priv_file; $cert_res = openssl_x509_read($cert); $priv_res = openssl_pkey_get_private($priv); $pass = "test"; $invalid = ""; -$invalid_path = dirname(__FILE__) . "/invalid_path"; +$invalid_path = __DIR__ . "/invalid_path"; $opts = []; var_dump(openssl_pkcs12_export($cert, $output, $priv, $pass)); // read certs as a string diff --git a/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt b/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt index a360591b12..ccc9104d34 100644 --- a/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt @@ -4,19 +4,19 @@ openssl_pkcs12_export_to_file() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$pkcsfile = dirname(__FILE__) . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; +$pkcsfile = __DIR__ . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; -$cert_file = dirname(__FILE__) . "/public.crt"; +$cert_file = __DIR__ . "/public.crt"; $cert = file_get_contents($cert_file); $cert_path = "file://" . $cert_file; -$priv_file = dirname(__FILE__) . "/private.crt"; +$priv_file = __DIR__ . "/private.crt"; $priv = file_get_contents($priv_file); $priv_path = "file://" . $priv_file; $cert_res = openssl_x509_read($cert); $priv_res = openssl_pkey_get_private($priv); $pass = "test"; $invalid = ""; -$invalid_path = dirname(__FILE__) . "/invalid_path"; +$invalid_path = __DIR__ . "/invalid_path"; $opts = []; var_dump(openssl_pkcs12_export_to_file($cert, $pkcsfile, $priv, $pass)); @@ -34,7 +34,7 @@ var_dump(openssl_pkcs12_export_to_file($priv_res, $pkcsfile, $cert_res, $pass)); ?> --CLEAN-- <?php -$pkcsfile = dirname(__FILE__) . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; +$pkcsfile = __DIR__ . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; if (file_exists($pkcsfile)) { unlink($pkcsfile); } diff --git a/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt b/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt index f1e72d358e..407eb3aacd 100644 --- a/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt +++ b/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt @@ -4,14 +4,14 @@ openssl_pkcs12_export_to_file() error tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$pkcsfile = dirname(__FILE__) . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; +$pkcsfile = __DIR__ . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; -$cert_file = dirname(__FILE__) . "/public.crt"; +$cert_file = __DIR__ . "/public.crt"; $cert = file_get_contents($cert_file); $cert_path = "file://" . $cert_file; -$priv_file = dirname(__FILE__) . "/private.crt"; +$priv_file = __DIR__ . "/private.crt"; $priv = file_get_contents($priv_file); -$wrong_priv_file = dirname(__FILE__) . "/private_rsa_1024.key"; +$wrong_priv_file = __DIR__ . "/private_rsa_1024.key"; $wrong_priv = file_get_contents($wrong_priv_file); $pass = 'test'; @@ -21,7 +21,7 @@ var_dump(openssl_pkcs12_export_to_file($cert, '.', $priv, $pass)); ?> --CLEAN-- <?php -$pkcsfile = dirname(__FILE__) . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; +$pkcsfile = __DIR__ . "/openssl_pkcs12_export_to_file__pkcsfile.tmp"; if (file_exists($pkcsfile)) { unlink($pkcsfile); } diff --git a/ext/openssl/tests/openssl_pkcs12_read_basic.phpt b/ext/openssl/tests/openssl_pkcs12_read_basic.phpt index 24d038970d..b81b4d9dac 100644 --- a/ext/openssl/tests/openssl_pkcs12_read_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs12_read_basic.phpt @@ -4,7 +4,7 @@ openssl_pkcs12_read() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$p12_file = dirname(__FILE__) . "/p12_with_extra_certs.p12"; +$p12_file = __DIR__ . "/p12_with_extra_certs.p12"; $p12 = file_get_contents($p12_file); $certs = array(); $pass = "qwerty"; diff --git a/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt b/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt index 623126fc59..937180a22e 100644 --- a/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_decrypt_basic.phpt @@ -4,8 +4,8 @@ openssl_pkcs7_decrypt() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$infile = dirname(__FILE__) . "/cert.crt"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; +$infile = __DIR__ . "/cert.crt"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; $encrypted = tempnam(sys_get_temp_dir(), "ssl"); if ($encrypted === false) die("failed to get a temporary filename!"); @@ -15,7 +15,7 @@ if ($outfile === false) { die("failed to get a temporary filename!"); } -$single_cert = "file://" . dirname(__FILE__) . "/cert.crt"; +$single_cert = "file://" . __DIR__ . "/cert.crt"; $headers = array("test@test", "testing openssl_pkcs7_encrypt()"); $wrong = "wrong"; $empty = ""; diff --git a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt index 2132b402aa..f823462f9e 100644 --- a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt @@ -4,7 +4,7 @@ openssl_pkcs7_encrypt() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$infile = dirname(__FILE__) . "/cert.crt"; +$infile = __DIR__ . "/cert.crt"; $outfile = tempnam(sys_get_temp_dir(), "ssl"); if ($outfile === false) die("failed to get a temporary filename!"); @@ -12,8 +12,8 @@ $outfile2 = tempnam(sys_get_temp_dir(), "ssl"); if ($outfile2 === false) die("failed to get a temporary filename!"); -$single_cert = "file://" . dirname(__FILE__) . "/cert.crt"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; +$single_cert = "file://" . __DIR__ . "/cert.crt"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; $multi_certs = array($single_cert, $single_cert); $assoc_headers = array("To" => "test@test", "Subject" => "testing openssl_pkcs7_encrypt()"); $headers = array("test@test", "testing openssl_pkcs7_encrypt()"); diff --git a/ext/openssl/tests/openssl_pkcs7_read_basic.phpt b/ext/openssl/tests/openssl_pkcs7_read_basic.phpt index 64c7c2c130..ac3f1ad34f 100644 --- a/ext/openssl/tests/openssl_pkcs7_read_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_read_basic.phpt @@ -4,8 +4,8 @@ openssl_pkcs7_read() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$infile = file_get_contents(dirname(__FILE__) . "/cert.p7b"); -$certfile = file_get_contents(dirname(__FILE__) . "/cert.crt"); +$infile = file_get_contents(__DIR__ . "/cert.p7b"); +$certfile = file_get_contents(__DIR__ . "/cert.crt"); $result = []; var_dump(openssl_pkcs7_read()); diff --git a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt index 0e29901c7e..c11e5135f9 100644 --- a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt @@ -4,14 +4,14 @@ openssl_pkcs7_sign() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$infile = dirname(__FILE__) . "/cert.crt"; +$infile = __DIR__ . "/cert.crt"; $outfile = tempnam(sys_get_temp_dir(), "ssl"); if ($outfile === false) { die("failed to get a temporary filename!"); } -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; -$single_cert = "file://" . dirname(__FILE__) . "/cert.crt"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; +$single_cert = "file://" . __DIR__ . "/cert.crt"; $assoc_headers = array("To" => "test@test", "Subject" => "testing openssl_pkcs7_sign()"); $headers = array("test@test", "testing openssl_pkcs7_sign()"); $empty_headers = array(); diff --git a/ext/openssl/tests/openssl_pkcs7_verify_basic.phpt b/ext/openssl/tests/openssl_pkcs7_verify_basic.phpt index f3572491a1..925c28b34c 100644 --- a/ext/openssl/tests/openssl_pkcs7_verify_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_verify_basic.phpt @@ -14,10 +14,10 @@ if ($contentfile === false) { die("failed to get a temporary filename!"); } -$pkcsfile = dirname(__FILE__) . "/openssl_pkcs7_verify__pkcsfile.tmp"; +$pkcsfile = __DIR__ . "/openssl_pkcs7_verify__pkcsfile.tmp"; -$infile = dirname(__FILE__) . "/cert.crt"; -$eml = dirname(__FILE__) . "/signed.eml"; +$infile = __DIR__ . "/cert.crt"; +$eml = __DIR__ . "/signed.eml"; $wrong = "wrong"; $empty = ""; $cainfo = array(); diff --git a/ext/openssl/tests/openssl_pkey_export_basic.phpt b/ext/openssl/tests/openssl_pkey_export_basic.phpt index 4346b5a6d3..d71f8da9a3 100644 --- a/ext/openssl/tests/openssl_pkey_export_basic.phpt +++ b/ext/openssl/tests/openssl_pkey_export_basic.phpt @@ -9,7 +9,7 @@ if (!defined('OPENSSL_KEYTYPE_EC')) ?> --FILE-- <?php -$key = openssl_pkey_get_private('file://' . dirname(__FILE__) . '/private_ec.key'); +$key = openssl_pkey_get_private('file://' . __DIR__ . '/private_ec.key'); var_dump($key); $config_arg = array("config" => __DIR__ . DIRECTORY_SEPARATOR . "openssl.cnf"); @@ -28,7 +28,7 @@ $details = openssl_pkey_get_details(openssl_pkey_get_private($output, 'passphras var_dump(OPENSSL_KEYTYPE_EC === $details['type']); // Read public key -$pKey = openssl_pkey_get_public('file://' . dirname(__FILE__) . '/public_ec.key'); +$pKey = openssl_pkey_get_public('file://' . __DIR__ . '/public_ec.key'); var_dump($pKey); // The details are the same for a public or private key, expect the private key parameter 'd $detailsPKey = openssl_pkey_get_details($pKey); diff --git a/ext/openssl/tests/openssl_pkey_get_details_basic.phpt b/ext/openssl/tests/openssl_pkey_get_details_basic.phpt index 3c239af2a2..47147436dd 100644 --- a/ext/openssl/tests/openssl_pkey_get_details_basic.phpt +++ b/ext/openssl/tests/openssl_pkey_get_details_basic.phpt @@ -7,7 +7,7 @@ if (!defined("OPENSSL_KEYTYPE_EC")) die("skip no EC available"); ?> --FILE-- <?php -$key = openssl_pkey_get_private("file://" . dirname(__FILE__) . "/private_ec.key"); +$key = openssl_pkey_get_private("file://" . __DIR__ . "/private_ec.key"); print_r(openssl_pkey_get_details($key)); ?> diff --git a/ext/openssl/tests/openssl_private_decrypt_basic.phpt b/ext/openssl/tests/openssl_private_decrypt_basic.phpt index 76a08b8d55..c318fe89b1 100644 --- a/ext/openssl/tests/openssl_private_decrypt_basic.phpt +++ b/ext/openssl/tests/openssl_private_decrypt_basic.phpt @@ -5,8 +5,8 @@ openssl_private_decrypt() tests --FILE-- <?php $data = "Testing openssl_public_decrypt()"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; -$pubkey = "file://" . dirname(__FILE__) . "/public.key"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; +$pubkey = "file://" . __DIR__ . "/public.key"; $wrong = "wrong"; openssl_public_encrypt($data, $encrypted, $pubkey); diff --git a/ext/openssl/tests/openssl_private_encrypt_basic.phpt b/ext/openssl/tests/openssl_private_encrypt_basic.phpt index 968537c3c3..573e581f22 100644 --- a/ext/openssl/tests/openssl_private_encrypt_basic.phpt +++ b/ext/openssl/tests/openssl_private_encrypt_basic.phpt @@ -5,8 +5,8 @@ openssl_private_encrypt() tests --FILE-- <?php $data = "Testing openssl_private_encrypt()"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; -$pubkey = "file://" . dirname(__FILE__) . "/public.key"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; +$pubkey = "file://" . __DIR__ . "/public.key"; $wrong = "wrong"; class test { diff --git a/ext/openssl/tests/openssl_public_decrypt_basic.phpt b/ext/openssl/tests/openssl_public_decrypt_basic.phpt index 42d72b9cd4..6c6fdc90f8 100644 --- a/ext/openssl/tests/openssl_public_decrypt_basic.phpt +++ b/ext/openssl/tests/openssl_public_decrypt_basic.phpt @@ -5,8 +5,8 @@ openssl_public_decrypt() tests --FILE-- <?php $data = "Testing openssl_public_decrypt()"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; -$pubkey = "file://" . dirname(__FILE__) . "/public.key"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; +$pubkey = "file://" . __DIR__ . "/public.key"; $wrong = "wrong"; openssl_private_encrypt($data, $encrypted, $privkey); diff --git a/ext/openssl/tests/openssl_public_encrypt_basic.phpt b/ext/openssl/tests/openssl_public_encrypt_basic.phpt index 69650a65d9..9db3883b55 100644 --- a/ext/openssl/tests/openssl_public_encrypt_basic.phpt +++ b/ext/openssl/tests/openssl_public_encrypt_basic.phpt @@ -5,8 +5,8 @@ openssl_public_encrypt() tests --FILE-- <?php $data = "Testing openssl_public_encrypt()"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; -$pubkey = "file://" . dirname(__FILE__) . "/public.key"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; +$pubkey = "file://" . __DIR__ . "/public.key"; $wrong = "wrong"; class test { diff --git a/ext/openssl/tests/openssl_seal_basic.phpt b/ext/openssl/tests/openssl_seal_basic.phpt index 1899ebac3b..111bf6f094 100644 --- a/ext/openssl/tests/openssl_seal_basic.phpt +++ b/ext/openssl/tests/openssl_seal_basic.phpt @@ -17,7 +17,7 @@ var_dump(openssl_seal($b, $b, $b, "")); // tests with cert $data = "openssl_open() test"; -$pub_key = "file://" . dirname(__FILE__) . "/public.key"; +$pub_key = "file://" . __DIR__ . "/public.key"; $wrong = "wrong"; var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key))); // no output diff --git a/ext/openssl/tests/openssl_sign_basic.phpt b/ext/openssl/tests/openssl_sign_basic.phpt index 0200e5ba6e..bb2c403903 100644 --- a/ext/openssl/tests/openssl_sign_basic.phpt +++ b/ext/openssl/tests/openssl_sign_basic.phpt @@ -5,7 +5,7 @@ openssl_sign() tests --FILE-- <?php $data = "Testing openssl_sign()"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; $wrong = "wrong"; var_dump(openssl_sign($data, $sign, $privkey)); // no output diff --git a/ext/openssl/tests/openssl_spki_export_basic.phpt b/ext/openssl/tests/openssl_spki_export_basic.phpt index 8871c1016d..4085d2d5d8 100644 --- a/ext/openssl/tests/openssl_spki_export_basic.phpt +++ b/ext/openssl/tests/openssl_spki_export_basic.phpt @@ -12,7 +12,7 @@ if (!@openssl_pkey_new()) die("skip cannot create private key"); $key_sizes = array(1024, 2048, 4096); $pkeys = array(); foreach ($key_sizes as $key_size) { - $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key"; + $key_file = "file://" . __DIR__ . "/private_rsa_" . $key_size . ".key"; $pkeys[] = openssl_pkey_get_private($key_file); } diff --git a/ext/openssl/tests/openssl_spki_export_challenge_basic.phpt b/ext/openssl/tests/openssl_spki_export_challenge_basic.phpt index 2b947221bb..f44e60ec62 100644 --- a/ext/openssl/tests/openssl_spki_export_challenge_basic.phpt +++ b/ext/openssl/tests/openssl_spki_export_challenge_basic.phpt @@ -14,7 +14,7 @@ if (!@openssl_pkey_new()) die("skip cannot create private key"); $key_sizes = array(1024, 2048, 4096); $pkeys = array(); foreach ($key_sizes as $key_size) { - $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key"; + $key_file = "file://" . __DIR__ . "/private_rsa_" . $key_size . ".key"; $pkeys[] = openssl_pkey_get_private($key_file); } diff --git a/ext/openssl/tests/openssl_spki_new_basic.phpt b/ext/openssl/tests/openssl_spki_new_basic.phpt index 7f9e023618..cb54747fe0 100644 --- a/ext/openssl/tests/openssl_spki_new_basic.phpt +++ b/ext/openssl/tests/openssl_spki_new_basic.phpt @@ -11,7 +11,7 @@ if (!extension_loaded("openssl")) die("skip"); $key_sizes = array(1024, 2048, 4096); $pkeys = array(); foreach ($key_sizes as $key_size) { - $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key"; + $key_file = "file://" . __DIR__ . "/private_rsa_" . $key_size . ".key"; $pkeys[] = openssl_pkey_get_private($key_file); } diff --git a/ext/openssl/tests/openssl_spki_verify_basic.phpt b/ext/openssl/tests/openssl_spki_verify_basic.phpt index 4abfc1798c..c760d0cb83 100644 --- a/ext/openssl/tests/openssl_spki_verify_basic.phpt +++ b/ext/openssl/tests/openssl_spki_verify_basic.phpt @@ -13,7 +13,7 @@ if (!extension_loaded("openssl")) die("skip"); $key_sizes = array(1024, 2048, 4096); $pkeys = array(); foreach ($key_sizes as $key_size) { - $key_file = "file://" . dirname(__FILE__) . "/private_rsa_" . $key_size . ".key"; + $key_file = "file://" . __DIR__ . "/private_rsa_" . $key_size . ".key"; $pkeys[] = openssl_pkey_get_private($key_file); } diff --git a/ext/openssl/tests/openssl_verify_basic.phpt b/ext/openssl/tests/openssl_verify_basic.phpt index a21dfedb01..84d69502bf 100644 --- a/ext/openssl/tests/openssl_verify_basic.phpt +++ b/ext/openssl/tests/openssl_verify_basic.phpt @@ -5,8 +5,8 @@ openssl_verify() tests --FILE-- <?php $data = "Testing openssl_verify()"; -$privkey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; -$pubkey = "file://" . dirname(__FILE__) . "/public.key"; +$privkey = "file://" . __DIR__ . "/private_rsa_1024.key"; +$pubkey = "file://" . __DIR__ . "/public.key"; $wrong = "wrong"; openssl_sign($data, $sign, $privkey); diff --git a/ext/openssl/tests/openssl_x509_check_private_key_basic.phpt b/ext/openssl/tests/openssl_x509_check_private_key_basic.phpt index ca6eac948d..be56ef3066 100644 --- a/ext/openssl/tests/openssl_x509_check_private_key_basic.phpt +++ b/ext/openssl/tests/openssl_x509_check_private_key_basic.phpt @@ -4,16 +4,16 @@ openssl_x509_check_private_key() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$fp = fopen(dirname(__FILE__) . "/cert.crt","r"); +$fp = fopen(__DIR__ . "/cert.crt","r"); $a = fread($fp, 8192); fclose($fp); -$fp = fopen(dirname(__FILE__) . "/private_rsa_1024.key","r"); +$fp = fopen(__DIR__ . "/private_rsa_1024.key","r"); $b = fread($fp, 8192); fclose($fp); -$cert = "file://" . dirname(__FILE__) . "/cert.crt"; -$key = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; +$cert = "file://" . __DIR__ . "/cert.crt"; +$key = "file://" . __DIR__ . "/private_rsa_1024.key"; var_dump(openssl_x509_check_private_key($cert, $key)); var_dump(openssl_x509_check_private_key("", $key)); diff --git a/ext/openssl/tests/openssl_x509_checkpurpose_basic.phpt b/ext/openssl/tests/openssl_x509_checkpurpose_basic.phpt index 9634663556..99b4f0bdff 100644 --- a/ext/openssl/tests/openssl_x509_checkpurpose_basic.phpt +++ b/ext/openssl/tests/openssl_x509_checkpurpose_basic.phpt @@ -8,11 +8,11 @@ if (OPENSSL_VERSION_NUMBER < 0x10000000) die("skip Output requires OpenSSL 1.0") ?> --FILE-- <?php -$cert = "file://" . dirname(__FILE__) . "/cert.crt"; -$bert = "file://" . dirname(__FILE__) . "/bug41033.pem"; -$sert = "file://" . dirname(__FILE__) . "/san-cert.pem"; -$cpca = dirname(__FILE__) . "/san-ca.pem"; -$utfl = dirname(__FILE__) . "/sni_server_uk.pem"; +$cert = "file://" . __DIR__ . "/cert.crt"; +$bert = "file://" . __DIR__ . "/bug41033.pem"; +$sert = "file://" . __DIR__ . "/san-cert.pem"; +$cpca = __DIR__ . "/san-ca.pem"; +$utfl = __DIR__ . "/sni_server_uk.pem"; $rcrt = openssl_x509_read($cert); /* int openssl_x509_checkpurpose ( mixed $x509cert , int $purpose); */ diff --git a/ext/openssl/tests/openssl_x509_export_basic.phpt b/ext/openssl/tests/openssl_x509_export_basic.phpt index 94cb4fa48c..aecf569489 100644 --- a/ext/openssl/tests/openssl_x509_export_basic.phpt +++ b/ext/openssl/tests/openssl_x509_export_basic.phpt @@ -4,7 +4,7 @@ openssl_x509_export() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$cert_file = dirname(__FILE__) . "/cert.crt"; +$cert_file = __DIR__ . "/cert.crt"; $a = file_get_contents($cert_file); $b = "file://" . $cert_file; diff --git a/ext/openssl/tests/openssl_x509_export_to_file_basic.phpt b/ext/openssl/tests/openssl_x509_export_to_file_basic.phpt index 04e6d9e565..7fb6c02168 100644 --- a/ext/openssl/tests/openssl_x509_export_to_file_basic.phpt +++ b/ext/openssl/tests/openssl_x509_export_to_file_basic.phpt @@ -4,8 +4,8 @@ openssl_x509_export_to_file() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$outfilename = dirname(__FILE__) . "/openssl_x509_export_to_file__outfilename.tmp"; -$cert_file = dirname(__FILE__) . "/cert.crt"; +$outfilename = __DIR__ . "/openssl_x509_export_to_file__outfilename.tmp"; +$cert_file = __DIR__ . "/cert.crt"; $a = file_get_contents($cert_file); $b = "file://" . $cert_file; @@ -23,7 +23,7 @@ var_dump($exists = file_exists($outfilename)); ?> --CLEAN-- <?php -$outfilename = dirname(__FILE__) . "/openssl_x509_export_to_file__outfilename.tmp"; +$outfilename = __DIR__ . "/openssl_x509_export_to_file__outfilename.tmp"; if (file_exists($outfilename)) { unlink($outfilename); } diff --git a/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt index ceaafc2234..bc6715f375 100644 --- a/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt +++ b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt @@ -5,7 +5,7 @@ openssl_x509_fingerprint() tests --FILE-- <?php -$cert = "file://" . dirname(__FILE__) . "/cert.crt"; +$cert = "file://" . __DIR__ . "/cert.crt"; echo "** Testing with no parameters **\n"; var_dump(openssl_x509_fingerprint()); diff --git a/ext/openssl/tests/openssl_x509_free_basic.phpt b/ext/openssl/tests/openssl_x509_free_basic.phpt index 663adccc2c..378b0e5e0a 100644 --- a/ext/openssl/tests/openssl_x509_free_basic.phpt +++ b/ext/openssl/tests/openssl_x509_free_basic.phpt @@ -4,7 +4,7 @@ openssl_x509_free() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -var_dump($res = openssl_x509_read("file://" . dirname(__FILE__) . "/cert.crt")); +var_dump($res = openssl_x509_read("file://" . __DIR__ . "/cert.crt")); openssl_x509_free($res); var_dump($res); openssl_x509_free(false); diff --git a/ext/openssl/tests/openssl_x509_parse_basic.phpt b/ext/openssl/tests/openssl_x509_parse_basic.phpt index 8c04b791fc..b80c1f71f1 100644 --- a/ext/openssl/tests/openssl_x509_parse_basic.phpt +++ b/ext/openssl/tests/openssl_x509_parse_basic.phpt @@ -4,7 +4,7 @@ openssl_x509_parse() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$cert = "file://" . dirname(__FILE__) . "/cert.crt"; +$cert = "file://" . __DIR__ . "/cert.crt"; $parsedCert = openssl_x509_parse($cert); var_dump($parsedCert === openssl_x509_parse(openssl_x509_read($cert))); diff --git a/ext/openssl/tests/openssl_x509_read_basic.phpt b/ext/openssl/tests/openssl_x509_read_basic.phpt index 062c6bf1cb..f7579c7e81 100644 --- a/ext/openssl/tests/openssl_x509_read_basic.phpt +++ b/ext/openssl/tests/openssl_x509_read_basic.phpt @@ -4,11 +4,11 @@ openssl_x509_read() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$fp = fopen(dirname(__FILE__) . "/cert.crt","r"); +$fp = fopen(__DIR__ . "/cert.crt","r"); $a = fread($fp,8192); fclose($fp); -$b = "file://" . dirname(__FILE__) . "/cert.crt"; +$b = "file://" . __DIR__ . "/cert.crt"; $c = "invalid cert"; $d = openssl_x509_read($a); $e = array(); diff --git a/ext/openssl/tests/openssl_x509_verify.phpt b/ext/openssl/tests/openssl_x509_verify.phpt index 293c004b90..f93a1eab0e 100644 --- a/ext/openssl/tests/openssl_x509_verify.phpt +++ b/ext/openssl/tests/openssl_x509_verify.phpt @@ -4,17 +4,17 @@ openssl_x509_verify() tests <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php -$fp = fopen(dirname(__FILE__) . "/cert.crt","r"); +$fp = fopen(__DIR__ . "/cert.crt","r"); $a = fread($fp, 8192); fclose($fp); -$fp = fopen(dirname(__FILE__) . "/public.key","r"); +$fp = fopen(__DIR__ . "/public.key","r"); $b = fread($fp, 8192); fclose($fp); -$cert = "file://" . dirname(__FILE__) . "/cert.crt"; -$key = "file://" . dirname(__FILE__) . "/public.key"; -$wrongKey = "file://" . dirname(__FILE__) . "/public_rsa_2048.key"; +$cert = "file://" . __DIR__ . "/cert.crt"; +$key = "file://" . __DIR__ . "/public.key"; +$wrongKey = "file://" . __DIR__ . "/public_rsa_2048.key"; var_dump(openssl_x509_verify($cert, $key)); var_dump(openssl_x509_verify("", $key)); diff --git a/ext/pdo/tests/bug_34630.phpt b/ext/pdo/tests/bug_34630.phpt index 5642b2130e..32a60643db 100644 --- a/ext/pdo/tests/bug_34630.phpt +++ b/ext/pdo/tests/bug_34630.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_34687.phpt b/ext/pdo/tests/bug_34687.phpt index 312272dbb6..f25da54893 100644 --- a/ext/pdo/tests/bug_34687.phpt +++ b/ext/pdo/tests/bug_34687.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_35671.phpt b/ext/pdo/tests/bug_35671.phpt index 6709ea6180..fae84652f8 100644 --- a/ext/pdo/tests/bug_35671.phpt +++ b/ext/pdo/tests/bug_35671.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_36428.phpt b/ext/pdo/tests/bug_36428.phpt index cbbe930118..3cb32d47e8 100644 --- a/ext/pdo/tests/bug_36428.phpt +++ b/ext/pdo/tests/bug_36428.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_36798.phpt b/ext/pdo/tests/bug_36798.phpt index 0ca0beaa8e..1ce192acc9 100644 --- a/ext/pdo/tests/bug_36798.phpt +++ b/ext/pdo/tests/bug_36798.phpt @@ -17,7 +17,7 @@ if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))){ --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_38253.phpt b/ext/pdo/tests/bug_38253.phpt index 1e8707060c..f20ec2385a 100644 --- a/ext/pdo/tests/bug_38253.phpt +++ b/ext/pdo/tests/bug_38253.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $pdo = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_38394.phpt b/ext/pdo/tests/bug_38394.phpt index 81982b6035..6ec897fed7 100644 --- a/ext/pdo/tests/bug_38394.phpt +++ b/ext/pdo/tests/bug_38394.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_39398.phpt b/ext/pdo/tests/bug_39398.phpt index 9d0ef6bc4e..7d76adca55 100644 --- a/ext/pdo/tests/bug_39398.phpt +++ b/ext/pdo/tests/bug_39398.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_39656.phpt b/ext/pdo/tests/bug_39656.phpt index eacb693918..a33e285432 100644 --- a/ext/pdo/tests/bug_39656.phpt +++ b/ext/pdo/tests/bug_39656.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_40285.phpt b/ext/pdo/tests/bug_40285.phpt index 213777a808..35d6850d4a 100644 --- a/ext/pdo/tests/bug_40285.phpt +++ b/ext/pdo/tests/bug_40285.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_42917.phpt b/ext/pdo/tests/bug_42917.phpt index 7c837f9bdb..814086a56a 100644 --- a/ext/pdo/tests/bug_42917.phpt +++ b/ext/pdo/tests/bug_42917.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_43130.phpt b/ext/pdo/tests/bug_43130.phpt index 98e7ba5f31..4fea1a78ae 100644 --- a/ext/pdo/tests/bug_43130.phpt +++ b/ext/pdo/tests/bug_43130.phpt @@ -15,7 +15,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_43139.phpt b/ext/pdo/tests/bug_43139.phpt index 2ad97251c6..066eb2ed18 100644 --- a/ext/pdo/tests/bug_43139.phpt +++ b/ext/pdo/tests/bug_43139.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_43663.phpt b/ext/pdo/tests/bug_43663.phpt index d1b7837c2e..9e72a384d0 100644 --- a/ext/pdo/tests/bug_43663.phpt +++ b/ext/pdo/tests/bug_43663.phpt @@ -20,7 +20,7 @@ class test extends PDO{ } } -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $a = new test('sqlite::memory:'); diff --git a/ext/pdo/tests/bug_44173.phpt b/ext/pdo/tests/bug_44173.phpt index aab73d87a6..abf9ac7275 100644 --- a/ext/pdo/tests/bug_44173.phpt +++ b/ext/pdo/tests/bug_44173.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_44409.phpt b/ext/pdo/tests/bug_44409.phpt index cab317e04d..f32eb879bd 100644 --- a/ext/pdo/tests/bug_44409.phpt +++ b/ext/pdo/tests/bug_44409.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_44861.phpt b/ext/pdo/tests/bug_44861.phpt index 36988dc3fa..ec2d779fb5 100644 --- a/ext/pdo/tests/bug_44861.phpt +++ b/ext/pdo/tests/bug_44861.phpt @@ -20,7 +20,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_50458.phpt b/ext/pdo/tests/bug_50458.phpt index 8ce16f2515..f248f5f387 100644 --- a/ext/pdo/tests/bug_50458.phpt +++ b/ext/pdo/tests/bug_50458.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_52098.phpt b/ext/pdo/tests/bug_52098.phpt index 55e12d75fc..681af4c594 100644 --- a/ext/pdo/tests/bug_52098.phpt +++ b/ext/pdo/tests/bug_52098.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_60665.phpt b/ext/pdo/tests/bug_60665.phpt index bae3d603d7..99cc07171a 100644 --- a/ext/pdo/tests/bug_60665.phpt +++ b/ext/pdo/tests/bug_60665.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); switch ($db->getAttribute(PDO::ATTR_DRIVER_NAME)) { diff --git a/ext/pdo/tests/bug_61292.phpt b/ext/pdo/tests/bug_61292.phpt index 0a6885cf7c..f82619d20e 100644 --- a/ext/pdo/tests/bug_61292.phpt +++ b/ext/pdo/tests/bug_61292.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; class Database_SQL extends PDO diff --git a/ext/pdo/tests/bug_64172.phpt b/ext/pdo/tests/bug_64172.phpt index 021df3a9fd..9a729c90c1 100644 --- a/ext/pdo/tests/bug_64172.phpt +++ b/ext/pdo/tests/bug_64172.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_65946.phpt b/ext/pdo/tests/bug_65946.phpt index 447af58517..db7671de99 100644 --- a/ext/pdo/tests/bug_65946.phpt +++ b/ext/pdo/tests/bug_65946.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); diff --git a/ext/pdo/tests/bug_69356.phpt b/ext/pdo/tests/bug_69356.phpt index 6c9b14c8a4..4fca242a91 100644 --- a/ext/pdo/tests/bug_69356.phpt +++ b/ext/pdo/tests/bug_69356.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_71447.phpt b/ext/pdo/tests/bug_71447.phpt index 8b5c0732f1..8705717df1 100644 --- a/ext/pdo/tests/bug_71447.phpt +++ b/ext/pdo/tests/bug_71447.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/bug_72788.phpt b/ext/pdo/tests/bug_72788.phpt index 80609a21ba..975d303065 100644 --- a/ext/pdo/tests/bug_72788.phpt +++ b/ext/pdo/tests/bug_72788.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; putenv("PDOTEST_ATTR=" . serialize(array(PDO::ATTR_PERSISTENT => true))); diff --git a/ext/pdo/tests/bug_73234.phpt b/ext/pdo/tests/bug_73234.phpt index 43b484e9b2..451cc4849c 100644 --- a/ext/pdo/tests/bug_73234.phpt +++ b/ext/pdo/tests/bug_73234.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/debug_emulated_prepares.phpt b/ext/pdo/tests/debug_emulated_prepares.phpt index 13252382fe..57cf937578 100644 --- a/ext/pdo/tests/debug_emulated_prepares.phpt +++ b/ext/pdo/tests/debug_emulated_prepares.phpt @@ -14,7 +14,7 @@ if (!$db->getAttribute(PDO::ATTR_EMULATE_PREPARES) && !$db->setAttribute(PDO::AT ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_001.phpt b/ext/pdo/tests/pdo_001.phpt index 0cfb1568dc..f4131b69bc 100644 --- a/ext/pdo/tests/pdo_001.phpt +++ b/ext/pdo/tests/pdo_001.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_002.phpt b/ext/pdo/tests/pdo_002.phpt index 1b0d2faf76..740c51e2de 100644 --- a/ext/pdo/tests/pdo_002.phpt +++ b/ext/pdo/tests/pdo_002.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_003.phpt b/ext/pdo/tests/pdo_003.phpt index 2d91354400..8b340d6ef3 100644 --- a/ext/pdo/tests/pdo_003.phpt +++ b/ext/pdo/tests/pdo_003.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_004.phpt b/ext/pdo/tests/pdo_004.phpt index fa973fa34f..39323f9c36 100644 --- a/ext/pdo/tests/pdo_004.phpt +++ b/ext/pdo/tests/pdo_004.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_005.phpt b/ext/pdo/tests/pdo_005.phpt index ed6bfe92d7..6e89aad744 100644 --- a/ext/pdo/tests/pdo_005.phpt +++ b/ext/pdo/tests/pdo_005.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_006.phpt b/ext/pdo/tests/pdo_006.phpt index 132b8f90ad..816102ffb6 100644 --- a/ext/pdo/tests/pdo_006.phpt +++ b/ext/pdo/tests/pdo_006.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_007.phpt b/ext/pdo/tests/pdo_007.phpt index 69086dbf73..33932212bb 100644 --- a/ext/pdo/tests/pdo_007.phpt +++ b/ext/pdo/tests/pdo_007.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_008.phpt b/ext/pdo/tests/pdo_008.phpt index eaf4fcceb3..4c850ae0eb 100644 --- a/ext/pdo/tests/pdo_008.phpt +++ b/ext/pdo/tests/pdo_008.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_009.phpt b/ext/pdo/tests/pdo_009.phpt index 28d331bcc0..bc63aa66fd 100644 --- a/ext/pdo/tests/pdo_009.phpt +++ b/ext/pdo/tests/pdo_009.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_010.phpt b/ext/pdo/tests/pdo_010.phpt index 7ca6342248..f5b6bafbb9 100644 --- a/ext/pdo/tests/pdo_010.phpt +++ b/ext/pdo/tests/pdo_010.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_011.phpt b/ext/pdo/tests/pdo_011.phpt index 27a923ef7e..e014ff9c9b 100644 --- a/ext/pdo/tests/pdo_011.phpt +++ b/ext/pdo/tests/pdo_011.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_012.phpt b/ext/pdo/tests/pdo_012.phpt index f5c968bb59..0570f446cf 100644 --- a/ext/pdo/tests/pdo_012.phpt +++ b/ext/pdo/tests/pdo_012.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_013.phpt b/ext/pdo/tests/pdo_013.phpt index ee6d714d30..ab40738051 100644 --- a/ext/pdo/tests/pdo_013.phpt +++ b/ext/pdo/tests/pdo_013.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_014.phpt b/ext/pdo/tests/pdo_014.phpt index d766c1b9cb..5c7774f2cd 100644 --- a/ext/pdo/tests/pdo_014.phpt +++ b/ext/pdo/tests/pdo_014.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_015.phpt b/ext/pdo/tests/pdo_015.phpt index 8ae2322136..bc19309670 100644 --- a/ext/pdo/tests/pdo_015.phpt +++ b/ext/pdo/tests/pdo_015.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_016.phpt b/ext/pdo/tests/pdo_016.phpt index 9642353134..6879faa5b9 100644 --- a/ext/pdo/tests/pdo_016.phpt +++ b/ext/pdo/tests/pdo_016.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_016a.phpt b/ext/pdo/tests/pdo_016a.phpt index 870e2b6728..9f07516f8e 100644 --- a/ext/pdo/tests/pdo_016a.phpt +++ b/ext/pdo/tests/pdo_016a.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_017.phpt b/ext/pdo/tests/pdo_017.phpt index fea8c35a67..32018da6e1 100644 --- a/ext/pdo/tests/pdo_017.phpt +++ b/ext/pdo/tests/pdo_017.phpt @@ -16,7 +16,7 @@ try { } if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../pdo_mysql/tests/mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . '../../pdo_mysql/tests/mysql_pdo_test.inc'); if (false === MySQLPDOTest::detect_transactional_mysql_engine($db)) { die('skip your mysql configuration does not support working transactions'); } @@ -24,12 +24,12 @@ if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') { - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../../pdo_mysql/tests/mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . '../../pdo_mysql/tests/mysql_pdo_test.inc'); $suf = ' ENGINE=' . MySQLPDOTest::detect_transactional_mysql_engine($db); } else { $suf = ''; diff --git a/ext/pdo/tests/pdo_018.phpt b/ext/pdo/tests/pdo_018.phpt index f86229396b..b99cb80968 100644 --- a/ext/pdo/tests/pdo_018.phpt +++ b/ext/pdo/tests/pdo_018.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_019.phpt b/ext/pdo/tests/pdo_019.phpt index 505b436bc8..68c5311b41 100644 --- a/ext/pdo/tests/pdo_019.phpt +++ b/ext/pdo/tests/pdo_019.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_020.phpt b/ext/pdo/tests/pdo_020.phpt index 1d6ba69b08..32f53d840e 100644 --- a/ext/pdo/tests/pdo_020.phpt +++ b/ext/pdo/tests/pdo_020.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_021.phpt b/ext/pdo/tests/pdo_021.phpt index 709ebafba1..10b8029c20 100644 --- a/ext/pdo/tests/pdo_021.phpt +++ b/ext/pdo/tests/pdo_021.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_022.phpt b/ext/pdo/tests/pdo_022.phpt index 57a3171a45..bf3b40b4a8 100644 --- a/ext/pdo/tests/pdo_022.phpt +++ b/ext/pdo/tests/pdo_022.phpt @@ -21,7 +21,7 @@ PDOTest::skip(); This feature is not yet finalized, no test makes sense --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_023.phpt b/ext/pdo/tests/pdo_023.phpt index 300a9efd26..e021e67881 100644 --- a/ext/pdo/tests/pdo_023.phpt +++ b/ext/pdo/tests/pdo_023.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; class PDOStatementX extends PDOStatement diff --git a/ext/pdo/tests/pdo_024.phpt b/ext/pdo/tests/pdo_024.phpt index 5b3a5525a7..042322871f 100644 --- a/ext/pdo/tests/pdo_024.phpt +++ b/ext/pdo/tests/pdo_024.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_025.phpt b/ext/pdo/tests/pdo_025.phpt index 3c513cfefa..43cc542a00 100644 --- a/ext/pdo/tests/pdo_025.phpt +++ b/ext/pdo/tests/pdo_025.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_026.phpt b/ext/pdo/tests/pdo_026.phpt index 0f18d31e6f..8f72aff6e1 100644 --- a/ext/pdo/tests/pdo_026.phpt +++ b/ext/pdo/tests/pdo_026.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $data = array( diff --git a/ext/pdo/tests/pdo_027.phpt b/ext/pdo/tests/pdo_027.phpt index 2e6658f4f1..e10ab0aa75 100644 --- a/ext/pdo/tests/pdo_027.phpt +++ b/ext/pdo/tests/pdo_027.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_028.phpt b/ext/pdo/tests/pdo_028.phpt index 0a4482f21a..726c28b2b8 100644 --- a/ext/pdo/tests/pdo_028.phpt +++ b/ext/pdo/tests/pdo_028.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_029.phpt b/ext/pdo/tests/pdo_029.phpt index 19afc3195d..8204de236a 100644 --- a/ext/pdo/tests/pdo_029.phpt +++ b/ext/pdo/tests/pdo_029.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $data = array( diff --git a/ext/pdo/tests/pdo_030.phpt b/ext/pdo/tests/pdo_030.phpt index e723d28abd..bc697d7108 100644 --- a/ext/pdo/tests/pdo_030.phpt +++ b/ext/pdo/tests/pdo_030.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $data = array( diff --git a/ext/pdo/tests/pdo_031.phpt b/ext/pdo/tests/pdo_031.phpt index 3b3169a3c2..689f7624ce 100644 --- a/ext/pdo/tests/pdo_031.phpt +++ b/ext/pdo/tests/pdo_031.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $data = array( diff --git a/ext/pdo/tests/pdo_032.phpt b/ext/pdo/tests/pdo_032.phpt index b856df51f8..9fc0cf1117 100644 --- a/ext/pdo/tests/pdo_032.phpt +++ b/ext/pdo/tests/pdo_032.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_033.phpt b/ext/pdo/tests/pdo_033.phpt index 68fec9a8c4..22f0e15ccb 100644 --- a/ext/pdo/tests/pdo_033.phpt +++ b/ext/pdo/tests/pdo_033.phpt @@ -11,7 +11,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_034.phpt b/ext/pdo/tests/pdo_034.phpt index 0f00e20849..dafcca1c71 100644 --- a/ext/pdo/tests/pdo_034.phpt +++ b/ext/pdo/tests/pdo_034.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pdo_038.phpt b/ext/pdo/tests/pdo_038.phpt index 7570d383ad..3ff2d090a8 100644 --- a/ext/pdo/tests/pdo_038.phpt +++ b/ext/pdo/tests/pdo_038.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; function fetchColumn($stmt, $index) { diff --git a/ext/pdo/tests/pecl_bug_5217.phpt b/ext/pdo/tests/pecl_bug_5217.phpt index 74dfc37ba7..458092d25f 100644 --- a/ext/pdo/tests/pecl_bug_5217.phpt +++ b/ext/pdo/tests/pecl_bug_5217.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); try { diff --git a/ext/pdo/tests/pecl_bug_5772.phpt b/ext/pdo/tests/pecl_bug_5772.phpt index b297ba7f17..5363d80cee 100644 --- a/ext/pdo/tests/pecl_bug_5772.phpt +++ b/ext/pdo/tests/pecl_bug_5772.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo/tests/pecl_bug_5809.phpt b/ext/pdo/tests/pecl_bug_5809.phpt index dc9e953633..60bde2859f 100644 --- a/ext/pdo/tests/pecl_bug_5809.phpt +++ b/ext/pdo/tests/pecl_bug_5809.phpt @@ -10,7 +10,7 @@ PDOTest::skip(); ?> --FILE-- <?php -if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); +if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.__DIR__ . '/../../pdo/tests/'); require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); diff --git a/ext/pdo_dblib/tests/batch_stmt_ins_exec.phpt b/ext/pdo_dblib/tests/batch_stmt_ins_exec.phpt index 5d218051e8..810460de49 100644 --- a/ext/pdo_dblib/tests/batch_stmt_ins_exec.phpt +++ b/ext/pdo_dblib/tests/batch_stmt_ins_exec.phpt @@ -3,13 +3,13 @@ PDO_DBLIB: driver supports a batch of queries containing SELECT, INSERT, UPDATE, --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; if (!driver_supports_batch_statements_without_select($db)) die('xfail test will fail with this version of FreeTDS'); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; // creating a proc need to be a statement in it's own batch, so we need to do a little setup first $db->query("create table #php_pdo(id int); "); diff --git a/ext/pdo_dblib/tests/batch_stmt_ins_sel_up_del.phpt b/ext/pdo_dblib/tests/batch_stmt_ins_sel_up_del.phpt index e2c5f6ac47..828ffbfaad 100644 --- a/ext/pdo_dblib/tests/batch_stmt_ins_sel_up_del.phpt +++ b/ext/pdo_dblib/tests/batch_stmt_ins_sel_up_del.phpt @@ -3,13 +3,13 @@ PDO_DBLIB: driver supports a batch of queries containing SELECT, INSERT, UPDATE --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; if (!driver_supports_batch_statements_without_select($db)) die('xfail test will fail with this version of FreeTDS'); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->query( "create table #php_pdo(id int);" . diff --git a/ext/pdo_dblib/tests/batch_stmt_ins_up.phpt b/ext/pdo_dblib/tests/batch_stmt_ins_up.phpt index 8f162e7a6d..1e45e34cac 100644 --- a/ext/pdo_dblib/tests/batch_stmt_ins_up.phpt +++ b/ext/pdo_dblib/tests/batch_stmt_ins_up.phpt @@ -3,13 +3,13 @@ PDO_DBLIB: driver supports multiple queries in a single \PDO::query() call that --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; if (!driver_supports_batch_statements_without_select($db)) die('xfail test will fail with this version of FreeTDS'); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->query( "create table #php_pdo(id int);" . diff --git a/ext/pdo_dblib/tests/batch_stmt_rowcount.phpt b/ext/pdo_dblib/tests/batch_stmt_rowcount.phpt index 287a7e3528..0779b97969 100644 --- a/ext/pdo_dblib/tests/batch_stmt_rowcount.phpt +++ b/ext/pdo_dblib/tests/batch_stmt_rowcount.phpt @@ -3,13 +3,13 @@ PDO_DBLIB: driver supports SET ROWCOUNT and SELECT @@ROWCOUNT in batch statement --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; if (!driver_supports_batch_statements_without_select($db)) die('xfail test will fail with this version of FreeTDS'); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->query( "create table #php_pdo(id int); " . diff --git a/ext/pdo_dblib/tests/batch_stmt_transaction.phpt b/ext/pdo_dblib/tests/batch_stmt_transaction.phpt index d811f6786f..7e02796d91 100644 --- a/ext/pdo_dblib/tests/batch_stmt_transaction.phpt +++ b/ext/pdo_dblib/tests/batch_stmt_transaction.phpt @@ -3,13 +3,13 @@ PDO_DBLIB: driver supports a batch of queries containing SELECT, INSERT, UPDATE --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; if (!driver_supports_batch_statements_without_select($db)) die('xfail test will fail with this version of FreeTDS'); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->query( "create table #php_pdo(id int);" . diff --git a/ext/pdo_dblib/tests/batch_stmt_try.phpt b/ext/pdo_dblib/tests/batch_stmt_try.phpt index 0f74d0b701..2b29e4c6eb 100644 --- a/ext/pdo_dblib/tests/batch_stmt_try.phpt +++ b/ext/pdo_dblib/tests/batch_stmt_try.phpt @@ -3,13 +3,13 @@ PDO_DBLIB: driver supports exceptions --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; if (!driver_supports_batch_statements_without_select($db)) die('xfail test will fail with this version of FreeTDS'); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->query( "create table #php_pdo(id int);" . diff --git a/ext/pdo_dblib/tests/bug_38955.phpt b/ext/pdo_dblib/tests/bug_38955.phpt index 57adbf6c40..cdd596cad8 100644 --- a/ext/pdo_dblib/tests/bug_38955.phpt +++ b/ext/pdo_dblib/tests/bug_38955.phpt @@ -3,11 +3,11 @@ --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; /*We see these rows */ $db->query("CREATE table php_test(val int)"); diff --git a/ext/pdo_dblib/tests/bug_45876.phpt b/ext/pdo_dblib/tests/bug_45876.phpt index 2e99e2b94f..7328cdc9bb 100644 --- a/ext/pdo_dblib/tests/bug_45876.phpt +++ b/ext/pdo_dblib/tests/bug_45876.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: Does not support get column meta --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->prepare("select top 1 ic1.* from information_schema.columns ic1"); $stmt->execute(); diff --git a/ext/pdo_dblib/tests/bug_47588.phpt b/ext/pdo_dblib/tests/bug_47588.phpt index 262720f632..26ea25c66e 100644 --- a/ext/pdo_dblib/tests/bug_47588.phpt +++ b/ext/pdo_dblib/tests/bug_47588.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: Quoted field names --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $db->query('CREATE TABLE "Test Table" ("My Field" int, "Another Field" varchar(32) not null default \'test_string\')'); $db->query('INSERT INTO "Test Table" ("My Field") values(1)'); diff --git a/ext/pdo_dblib/tests/bug_50755.phpt b/ext/pdo_dblib/tests/bug_50755.phpt index 95d1a8bc70..33b776c145 100644 --- a/ext/pdo_dblib/tests/bug_50755.phpt +++ b/ext/pdo_dblib/tests/bug_50755.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: Out of memory on large recordsets --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; /* This should be sufficient to overflow any buffers */ $stmt = $db->prepare("select * diff --git a/ext/pdo_dblib/tests/bug_54648.phpt b/ext/pdo_dblib/tests/bug_54648.phpt index 93cde8e415..568f6a7e83 100644 --- a/ext/pdo_dblib/tests/bug_54648.phpt +++ b/ext/pdo_dblib/tests/bug_54648.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: Does not force correct dateformat --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $db->query('set dateformat ymd'); $rs = $db->query("select cast('1950-01-18 23:00:00' as smalldatetime) as sdt, cast('2030-01-01 23:59:59' as datetime) as dt"); var_dump($rs->fetchAll(PDO::FETCH_ASSOC)); diff --git a/ext/pdo_dblib/tests/bug_67130.phpt b/ext/pdo_dblib/tests/bug_67130.phpt index 4cfb66f2c6..a1aeaecc23 100644 --- a/ext/pdo_dblib/tests/bug_67130.phpt +++ b/ext/pdo_dblib/tests/bug_67130.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: \PDOStatement::nextRowset() should succeed when all rows in current r --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->query('SELECT 1; SELECT 2; SELECT 3;'); var_dump($stmt->fetch()); diff --git a/ext/pdo_dblib/tests/bug_68957.phpt b/ext/pdo_dblib/tests/bug_68957.phpt index d500fd498b..19e721f405 100644 --- a/ext/pdo_dblib/tests/bug_68957.phpt +++ b/ext/pdo_dblib/tests/bug_68957.phpt @@ -3,11 +3,11 @@ PDO_DBLIB bug #68957 PDO::query doesn't support several queries --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $query = "declare @myInt int = 1; select @myInt;"; $stmt = $db->query($query); diff --git a/ext/pdo_dblib/tests/bug_69592.phpt b/ext/pdo_dblib/tests/bug_69592.phpt index 98936618d1..42c12ef2bb 100644 --- a/ext/pdo_dblib/tests/bug_69592.phpt +++ b/ext/pdo_dblib/tests/bug_69592.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS for skip junk resultsets on SET NO --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $sql = ' SET NOCOUNT ON diff --git a/ext/pdo_dblib/tests/bug_71667.phpt b/ext/pdo_dblib/tests/bug_71667.phpt index 3721f01954..3c1a817808 100644 --- a/ext/pdo_dblib/tests/bug_71667.phpt +++ b/ext/pdo_dblib/tests/bug_71667.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: Emulate how mssql extension names "computed" columns --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->prepare("SELECT 1, 2 AS named, 3"); $stmt->execute(); diff --git a/ext/pdo_dblib/tests/bug_73396.phpt b/ext/pdo_dblib/tests/bug_73396.phpt index 909e1194c0..86ad59f43f 100644 --- a/ext/pdo_dblib/tests/bug_73396.phpt +++ b/ext/pdo_dblib/tests/bug_73396.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: bigint columns are returned as strings --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; // on 64-bit machines, these columns should come back as ints // on 32-bit machines, they will come back as strings because zend_long isn't big enough diff --git a/ext/pdo_dblib/tests/pdo_dblib_param_str_natl.phpt b/ext/pdo_dblib/tests/pdo_dblib_param_str_natl.phpt index 4753a91a51..8e4062e359 100644 --- a/ext/pdo_dblib/tests/pdo_dblib_param_str_natl.phpt +++ b/ext/pdo_dblib/tests/pdo_dblib_param_str_natl.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: national character set values are quoted correctly in queries --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $stmt = $db->prepare('SELECT :value'); $stmt->bindValue(':value', 'foo', PDO::PARAM_STR | PDO::PARAM_STR_NATL); diff --git a/ext/pdo_dblib/tests/pdo_dblib_quote.phpt b/ext/pdo_dblib/tests/pdo_dblib_quote.phpt index 854e14cb9d..c5f2a4b620 100644 --- a/ext/pdo_dblib/tests/pdo_dblib_quote.phpt +++ b/ext/pdo_dblib/tests/pdo_dblib_quote.phpt @@ -3,11 +3,11 @@ PDO_DBLIB: Ensure quote function returns expected results --SKIPIF-- <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; var_dump($db->quote(true, PDO::PARAM_BOOL)); var_dump($db->quote(false, PDO::PARAM_BOOL)); var_dump($db->quote(42, PDO::PARAM_INT)); diff --git a/ext/pdo_dblib/tests/timeout.phpt b/ext/pdo_dblib/tests/timeout.phpt index d711f2a3a0..c0485c6d51 100644 --- a/ext/pdo_dblib/tests/timeout.phpt +++ b/ext/pdo_dblib/tests/timeout.phpt @@ -4,11 +4,11 @@ PDO_DBLIB: Set query timeouts <?php if (!extension_loaded('pdo_dblib')) die('skip not loaded'); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/config.inc'; $sql = 'WAITFOR DELAY \'00:00:02\''; diff --git a/ext/pdo_mysql/tests/bug41125.phpt b/ext/pdo_mysql/tests/bug41125.phpt index 66ecbc7d4d..2212bb621d 100644 --- a/ext/pdo_mysql/tests/bug41125.phpt +++ b/ext/pdo_mysql/tests/bug41125.phpt @@ -2,17 +2,17 @@ Bug #41125 (PDO mysql + quote() + prepare() can result in seg fault) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $search = "o'"; $sql = "SELECT 1 FROM DUAL WHERE 'o''riley' LIKE " . $db->quote('%' . $search . '%'); diff --git a/ext/pdo_mysql/tests/bug44327.phpt b/ext/pdo_mysql/tests/bug44327.phpt index cb2fbda097..27a926295c 100644 --- a/ext/pdo_mysql/tests/bug44327.phpt +++ b/ext/pdo_mysql/tests/bug44327.phpt @@ -2,14 +2,14 @@ Bug #44327 (PDORow::queryString property & numeric offsets / Crash) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $stmt = $db->prepare("SELECT 1 AS \"one\""); diff --git a/ext/pdo_mysql/tests/bug46292.phpt b/ext/pdo_mysql/tests/bug46292.phpt index 8885384f1c..fd2ef759e5 100644 --- a/ext/pdo_mysql/tests/bug46292.phpt +++ b/ext/pdo_mysql/tests/bug46292.phpt @@ -2,14 +2,14 @@ Bug #46292 (PDO::setFetchMode() shouldn't requires the 2nd arg when using FETCH_CLASSTYPE) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $pdoDb = MySQLPDOTest::factory(); @@ -51,7 +51,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS testz'); ?> diff --git a/ext/pdo_mysql/tests/bug53551.phpt b/ext/pdo_mysql/tests/bug53551.phpt index 865dceaa1b..cb7e0fa2b6 100644 --- a/ext/pdo_mysql/tests/bug53551.phpt +++ b/ext/pdo_mysql/tests/bug53551.phpt @@ -2,8 +2,8 @@ Bug #44327 (PDORow::queryString property & numeric offsets / Crash) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> diff --git a/ext/pdo_mysql/tests/bug53782.phpt b/ext/pdo_mysql/tests/bug53782.phpt index 4f81cceef2..6620abc065 100644 --- a/ext/pdo_mysql/tests/bug53782.phpt +++ b/ext/pdo_mysql/tests/bug53782.phpt @@ -3,15 +3,15 @@ PDO MySQL Bug #53782 (foreach throws irrelevant exception) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$conn = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$conn = PDOTest::test_factory(__DIR__ . '/common.phpt'); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); @@ -31,7 +31,7 @@ echo "DONE"; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/bug54929.phpt b/ext/pdo_mysql/tests/bug54929.phpt index d7b4c7ad7f..6f2c2b0b80 100644 --- a/ext/pdo_mysql/tests/bug54929.phpt +++ b/ext/pdo_mysql/tests/bug54929.phpt @@ -2,17 +2,17 @@ Bug #54929 (Parse error with single quote in sql comment (pdo-mysql)) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); -$pdodb = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$pdodb = PDOTest::test_factory(__DIR__ . '/common.phpt'); function testQuery($query) { diff --git a/ext/pdo_mysql/tests/bug63176.phpt b/ext/pdo_mysql/tests/bug63176.phpt index c5be644450..ed462c0c53 100644 --- a/ext/pdo_mysql/tests/bug63176.phpt +++ b/ext/pdo_mysql/tests/bug63176.phpt @@ -2,13 +2,13 @@ Bug #63176 (Segmentation fault when instantiate 2 persistent PDO to the same db server) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__). DIRECTORY_SEPARATOR . 'config.inc'); +require(__DIR__. DIRECTORY_SEPARATOR . 'config.inc'); class PDO2 extends PDO { protected $transLevel; } diff --git a/ext/pdo_mysql/tests/bug66141.phpt b/ext/pdo_mysql/tests/bug66141.phpt index bddf08e9f2..6d16a14a1c 100644 --- a/ext/pdo_mysql/tests/bug66141.phpt +++ b/ext/pdo_mysql/tests/bug66141.phpt @@ -2,8 +2,8 @@ Bug #66141 (mysqlnd quote function is wrong with NO_BACKSLASH_ESCAPES after failed query) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_mysql/tests/bug68371.phpt b/ext/pdo_mysql/tests/bug68371.phpt index 77ddc3183e..f5046f0375 100644 --- a/ext/pdo_mysql/tests/bug68371.phpt +++ b/ext/pdo_mysql/tests/bug68371.phpt @@ -2,13 +2,13 @@ PDO MySQL Bug #38671 (PDO#getAttribute() cannot be called with platform-specific attribute names) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $pdo = MySQLPDOTest::factory(); $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); diff --git a/ext/pdo_mysql/tests/bug70272.phpt b/ext/pdo_mysql/tests/bug70272.phpt index cd9b9d7da2..eba1203868 100644 --- a/ext/pdo_mysql/tests/bug70272.phpt +++ b/ext/pdo_mysql/tests/bug70272.phpt @@ -2,8 +2,8 @@ Bug #70272 (Segfault in pdo_mysql) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --INI-- @@ -12,11 +12,11 @@ report_memleaks=off <?php $a = new Stdclass(); $a->a = &$a; -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $dummy = new StdClass(); -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $dummy = NULL; $a->c = $db; diff --git a/ext/pdo_mysql/tests/bug70389.phpt b/ext/pdo_mysql/tests/bug70389.phpt index 2245459b94..09f439804e 100644 --- a/ext/pdo_mysql/tests/bug70389.phpt +++ b/ext/pdo_mysql/tests/bug70389.phpt @@ -2,13 +2,13 @@ Bug #70389 (PDO constructor changes unrelated variables) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__). DIRECTORY_SEPARATOR . 'config.inc'); +require(__DIR__. DIRECTORY_SEPARATOR . 'config.inc'); $flags = [ PDO::MYSQL_ATTR_FOUND_ROWS => true, PDO::MYSQL_ATTR_LOCAL_INFILE => true, diff --git a/ext/pdo_mysql/tests/bug70862.phpt b/ext/pdo_mysql/tests/bug70862.phpt index 527d9544de..d54d19f17b 100644 --- a/ext/pdo_mysql/tests/bug70862.phpt +++ b/ext/pdo_mysql/tests/bug70862.phpt @@ -2,13 +2,13 @@ MySQL Prepared Statements and BLOBs --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); @@ -37,7 +37,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/bug71569.phpt b/ext/pdo_mysql/tests/bug71569.phpt index 32c14b4622..15dfd82cd1 100644 --- a/ext/pdo_mysql/tests/bug71569.phpt +++ b/ext/pdo_mysql/tests/bug71569.phpt @@ -2,13 +2,13 @@ Bug #71569 (#70389 fix causes segmentation fault) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__). DIRECTORY_SEPARATOR . 'config.inc'); +require(__DIR__. DIRECTORY_SEPARATOR . 'config.inc'); try { new PDO(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, [ diff --git a/ext/pdo_mysql/tests/bug75177.phpt b/ext/pdo_mysql/tests/bug75177.phpt index abdfd3954b..3a9127cb1e 100644 --- a/ext/pdo_mysql/tests/bug75177.phpt +++ b/ext/pdo_mysql/tests/bug75177.phpt @@ -2,13 +2,13 @@ PDO MySQL Bug #75177 Type 'bit' is fetched as unexpected string --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $pdo = MySQLPDOTest::factory(); $tbl = "tbl_bug75177"; diff --git a/ext/pdo_mysql/tests/bug77289.phpt b/ext/pdo_mysql/tests/bug77289.phpt index db67524260..e8ea91262e 100644 --- a/ext/pdo_mysql/tests/bug77289.phpt +++ b/ext/pdo_mysql/tests/bug77289.phpt @@ -2,13 +2,13 @@ Bug #77289: PDO MySQL segfaults with persistent connection --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $dsn = MySQLPDOTest::getDSN(); $user = PDO_MYSQL_TEST_USER; diff --git a/ext/pdo_mysql/tests/bug_33689.phpt b/ext/pdo_mysql/tests/bug_33689.phpt index bd193fa9ac..0755112f5f 100644 --- a/ext/pdo_mysql/tests/bug_33689.phpt +++ b/ext/pdo_mysql/tests/bug_33689.phpt @@ -3,15 +3,15 @@ PDO MySQL Bug #33689 (query() execute() and fetch() return false on valid select --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->exec('CREATE TABLE test (bar INT NOT NULL)'); $db->exec('INSERT INTO test VALUES(1)'); @@ -36,7 +36,7 @@ print_r($tmp); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/bug_37445.phpt b/ext/pdo_mysql/tests/bug_37445.phpt index 6a51233cc4..d43bedd619 100644 --- a/ext/pdo_mysql/tests/bug_37445.phpt +++ b/ext/pdo_mysql/tests/bug_37445.phpt @@ -3,14 +3,14 @@ PDO MySQL Bug #37445 (Premature stmt object destruction) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO :: ATTR_EMULATE_PREPARES, true); $stmt = $db->prepare("SELECT 1"); diff --git a/ext/pdo_mysql/tests/bug_39483.phpt b/ext/pdo_mysql/tests/bug_39483.phpt Binary files differindex 559cad65ba..e0f1fd2ea3 100644 --- a/ext/pdo_mysql/tests/bug_39483.phpt +++ b/ext/pdo_mysql/tests/bug_39483.phpt diff --git a/ext/pdo_mysql/tests/bug_39858.phpt b/ext/pdo_mysql/tests/bug_39858.phpt index ec4c9586cc..0d850ede16 100644 --- a/ext/pdo_mysql/tests/bug_39858.phpt +++ b/ext/pdo_mysql/tests/bug_39858.phpt @@ -3,8 +3,8 @@ Bug #39858 (Lost connection to MySQL server during query by a repeated call stor --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); @@ -22,7 +22,7 @@ if ($version < 50000) nextRowset() problem with stored proc & emulation mode & mysqlnd --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); @@ -66,7 +66,7 @@ print "done!"; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec("DROP PROCEDURE IF EXISTS p"); ?> diff --git a/ext/pdo_mysql/tests/bug_41125.phpt b/ext/pdo_mysql/tests/bug_41125.phpt index a1d8dd1ae4..6d9041889e 100644 --- a/ext/pdo_mysql/tests/bug_41125.phpt +++ b/ext/pdo_mysql/tests/bug_41125.phpt @@ -2,8 +2,8 @@ Bug #41125 (PDO mysql + quote() + prepare() can result in segfault) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); @@ -20,7 +20,7 @@ if ($version < 40100) ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->exec("DROP TABLE IF EXISTS test"); @@ -40,7 +40,7 @@ print "done!"; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec("DROP TABLE IF EXISTS test"); ?> diff --git a/ext/pdo_mysql/tests/bug_41698.phpt b/ext/pdo_mysql/tests/bug_41698.phpt index 637a0910b1..5b60da9daa 100644 --- a/ext/pdo_mysql/tests/bug_41698.phpt +++ b/ext/pdo_mysql/tests/bug_41698.phpt @@ -3,15 +3,15 @@ PDO MySQL Bug #41698 (float parameters truncated to integer in prepared statemen --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); setlocale(LC_ALL, "de","de_DE","de_DE.ISO8859-1","de_DE.ISO_8859-1","de_DE.UTF-8"); diff --git a/ext/pdo_mysql/tests/bug_41997.phpt b/ext/pdo_mysql/tests/bug_41997.phpt index 3a90244365..9d06a2f14b 100644 --- a/ext/pdo_mysql/tests/bug_41997.phpt +++ b/ext/pdo_mysql/tests/bug_41997.phpt @@ -4,8 +4,8 @@ PDO MySQL Bug #41997 (stored procedure call returning single rowset blocks futur nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); @@ -21,7 +21,7 @@ if ($version < 50000) ?> --FILE-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP PROCEDURE IF EXISTS p'); diff --git a/ext/pdo_mysql/tests/bug_42499.phpt b/ext/pdo_mysql/tests/bug_42499.phpt index e218e0c14e..a691d275d2 100644 --- a/ext/pdo_mysql/tests/bug_42499.phpt +++ b/ext/pdo_mysql/tests/bug_42499.phpt @@ -3,8 +3,8 @@ Bug #42499 (Multi-statement execution via PDO::exec() makes connection unusable) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); @@ -21,7 +21,7 @@ if ($version < 41000) $matches[0], $matches[1], $matches[2], $version)); --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function bug_42499($db) { diff --git a/ext/pdo_mysql/tests/bug_43371.phpt b/ext/pdo_mysql/tests/bug_43371.phpt index 88c3a9bc6f..80c2149f61 100644 --- a/ext/pdo_mysql/tests/bug_43371.phpt +++ b/ext/pdo_mysql/tests/bug_43371.phpt @@ -2,13 +2,13 @@ Bug #43371 (Memory errors in PDO constructor) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $dsn = MySQLPDOTest::getDSN(); $db = new PDO($dsn, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, array(PDO::ATTR_PERSISTENT => true)); diff --git a/ext/pdo_mysql/tests/bug_44454.phpt b/ext/pdo_mysql/tests/bug_44454.phpt index eb93d97952..d21cf3a4e2 100644 --- a/ext/pdo_mysql/tests/bug_44454.phpt +++ b/ext/pdo_mysql/tests/bug_44454.phpt @@ -3,15 +3,15 @@ Bug #44454 (Unexpected exception thrown in foreach() statement) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); function bug_44454($db) { @@ -69,7 +69,7 @@ print "done!"; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/bug_44707.phpt b/ext/pdo_mysql/tests/bug_44707.phpt index d5d4539fcc..025b92e1fc 100644 --- a/ext/pdo_mysql/tests/bug_44707.phpt +++ b/ext/pdo_mysql/tests/bug_44707.phpt @@ -3,8 +3,8 @@ Bug #44707 (The MySQL PDO driver resets variable content after bindParam on tiny --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); @@ -22,9 +22,9 @@ if ($version < 41000) ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); function bug_44707($db) { diff --git a/ext/pdo_mysql/tests/bug_45120.phpt b/ext/pdo_mysql/tests/bug_45120.phpt index db5da823f7..bc2ea76629 100644 --- a/ext/pdo_mysql/tests/bug_45120.phpt +++ b/ext/pdo_mysql/tests/bug_45120.phpt @@ -3,15 +3,15 @@ Bug #45120 (PDOStatement->execute() returns true then false for same statement) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); function bug_45120($db) { diff --git a/ext/pdo_mysql/tests/bug_50323.phpt b/ext/pdo_mysql/tests/bug_50323.phpt index 30f856efc8..3997ccf398 100644 --- a/ext/pdo_mysql/tests/bug_50323.phpt +++ b/ext/pdo_mysql/tests/bug_50323.phpt @@ -3,14 +3,14 @@ Bug #50323 (No ability to connect to database named 't;', no chance to escape se --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); function changeDSN($original, $new_options) { $old_options = array(); @@ -51,8 +51,8 @@ echo 'done!'; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); @$db->exec('DROP DATABASE IF EXISTS `crazy;dbname`'); ?> diff --git a/ext/pdo_mysql/tests/bug_51670.phpt b/ext/pdo_mysql/tests/bug_51670.phpt index b2a1219991..22b3e63470 100644 --- a/ext/pdo_mysql/tests/bug_51670.phpt +++ b/ext/pdo_mysql/tests/bug_51670.phpt @@ -3,14 +3,14 @@ Bug #51670 (getColumnMeta causes segfault when re-executing query after calling --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $query = $db->prepare('SELECT 1 AS num'); $query->execute(); if(!is_array($query->getColumnMeta(0))) die('FAIL!'); diff --git a/ext/pdo_mysql/tests/bug_61207.phpt b/ext/pdo_mysql/tests/bug_61207.phpt index 411b39a70b..346c1687e7 100644 --- a/ext/pdo_mysql/tests/bug_61207.phpt +++ b/ext/pdo_mysql/tests/bug_61207.phpt @@ -2,14 +2,14 @@ PDO MySQL Bug #61207 (PDO::nextRowset() after a multi-statement query doesn't always work) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->query('DROP TABLE IF EXISTS test'); @@ -84,7 +84,7 @@ $db->query("DROP TABLE test"); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/bug_61411.phpt b/ext/pdo_mysql/tests/bug_61411.phpt index d840f222f1..7c7ae98db1 100644 --- a/ext/pdo_mysql/tests/bug_61411.phpt +++ b/ext/pdo_mysql/tests/bug_61411.phpt @@ -3,8 +3,8 @@ Bug #61411 (PDO Segfaults with PERSISTENT == TRUE && EMULATE_PREPARES == FALSE) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); @@ -20,7 +20,7 @@ if ($version < 40106) ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $attr = getenv('PDOTEST_ATTR'); if (!$attr) { diff --git a/ext/pdo_mysql/tests/bug_61755.phpt b/ext/pdo_mysql/tests/bug_61755.phpt index a6f55f5938..ccd8a964dd 100644 --- a/ext/pdo_mysql/tests/bug_61755.phpt +++ b/ext/pdo_mysql/tests/bug_61755.phpt @@ -3,14 +3,14 @@ Bug #61755 (A parsing bug in the prepared statements can lead to access violatio --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/ext/pdo_mysql/tests/bug_74376.phpt b/ext/pdo_mysql/tests/bug_74376.phpt index 1d2acfdc69..5abc546d15 100644 --- a/ext/pdo_mysql/tests/bug_74376.phpt +++ b/ext/pdo_mysql/tests/bug_74376.phpt @@ -3,13 +3,13 @@ Bug #74376 (Invalid free of persistent results on error/connection loss) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $attr = getenv('PDOTEST_ATTR'); $attr = $attr ? unserialize($attr) : []; diff --git a/ext/pdo_mysql/tests/bug_pecl_12925.phpt b/ext/pdo_mysql/tests/bug_pecl_12925.phpt index a893fb81b7..361ef719d0 100644 --- a/ext/pdo_mysql/tests/bug_pecl_12925.phpt +++ b/ext/pdo_mysql/tests/bug_pecl_12925.phpt @@ -3,14 +3,14 @@ PDO MySQL PECL bug #1295 (http://pecl.php.net/bugs/bug.php?id=12925) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function bug_pecl_1295($db) { diff --git a/ext/pdo_mysql/tests/bug_pecl_7976.phpt b/ext/pdo_mysql/tests/bug_pecl_7976.phpt index 8a1362599b..ee5d5e95b1 100644 --- a/ext/pdo_mysql/tests/bug_pecl_7976.phpt +++ b/ext/pdo_mysql/tests/bug_pecl_7976.phpt @@ -3,8 +3,8 @@ PECL Bug #7976 (Calling stored procedure several times) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); @@ -20,7 +20,7 @@ if ($version < 50000) ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function bug_pecl_7976($db) { @@ -52,7 +52,7 @@ print "done!"; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP PROCEDURE IF EXISTS p'); ?> diff --git a/ext/pdo_mysql/tests/last_insert_id.phpt b/ext/pdo_mysql/tests/last_insert_id.phpt index c819efe1e6..4b32d1cda2 100644 --- a/ext/pdo_mysql/tests/last_insert_id.phpt +++ b/ext/pdo_mysql/tests/last_insert_id.phpt @@ -3,14 +3,14 @@ PDO MySQL auto_increment / last insert id --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); print_r($db->query("CREATE TABLE test (id int auto_increment primary key, num int)")); diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index 219678c671..b849f274be 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -2,13 +2,13 @@ MySQL PDO->__construct() - Generic + DSN --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function tryandcatch($offset, $code) { diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_ini.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_ini.phpt index e24f66c09d..a03ad7f324 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_ini.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_ini.phpt @@ -2,8 +2,8 @@ MySQL PDO->__construct() - URI --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); /* TODO - fix this limitation */ if (getenv('PDO_MYSQL_TEST_DSN') !== "mysql:dbname=phptest;unix_socket=/tmp/mysql.sock") @@ -13,7 +13,7 @@ if (getenv('PDO_MYSQL_TEST_DSN') !== "mysql:dbname=phptest;unix_socket=/tmp/mysq pdo.dsn.mysql="mysql:dbname=phptest;socket=/tmp/mysql.sock" --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $found = false; $values = ini_get_all(); diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt index 08cd8eb942..9482a13bfa 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt @@ -2,13 +2,13 @@ MySQL PDO->__construct(), options --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function set_option_and_check($offset, $option, $value, $option_desc) { diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt index 133d42215d..d01ef0a69a 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt @@ -2,15 +2,15 @@ MySQL PDO->__construct(), libmysql only options --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); if (MySQLPDOTest::isPDOMySQLnd()) die("skip libmysql only options") ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function set_option_and_check($offset, $option, $value, $option_desc, $ignore_diff = false) { diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt index b4609b1629..73f2ddf4a1 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_uri-win32.phpt @@ -5,13 +5,13 @@ MySQL PDO->__construct() - URI if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip only for Windows'); } -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); try { diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt index 0b1cf3fe65..6cd7107001 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt @@ -5,13 +5,13 @@ MySQL PDO->__construct() - URI if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for Windows'); } -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); try { diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_autocommit.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_autocommit.phpt index 95e6ff9875..361750260b 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_autocommit.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_autocommit.phpt @@ -2,14 +2,14 @@ PDO::ATTR_AUTOCOMMIT --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); // autocommit should be on by default @@ -91,7 +91,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt index 6c39467b12..a011c864c5 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_case.phpt @@ -2,14 +2,14 @@ PDO::ATTR_CASE --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -86,7 +86,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_client_version.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_client_version.phpt index 19831da979..ce50df80eb 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_client_version.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_client_version.phpt @@ -2,14 +2,14 @@ PDO::ATTR_CLIENT_VERSION --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); assert(('' == $db->errorCode()) || ('00000' == $db->errorCode())); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_connection_status.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_connection_status.phpt index 9fd9bf9b26..8abb16a1c7 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_connection_status.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_connection_status.phpt @@ -2,14 +2,14 @@ PDO::ATTR_CONNECTION_STATUS --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $status = $db->getAttribute(PDO::ATTR_CONNECTION_STATUS); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_driver_name.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_driver_name.phpt index 708e3a2efc..65ab531ffd 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_driver_name.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_driver_name.phpt @@ -2,14 +2,14 @@ PDO::ATTR_DRIVER_NAME --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); assert(('' == $db->errorCode()) || ('00000' == $db->errorCode())); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt index 4db50f074f..f0dc29b8d4 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_errmode.phpt @@ -2,8 +2,8 @@ PDO::ATTR_ERRMODE --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> @@ -11,7 +11,7 @@ $db = MySQLPDOTest::factory(); error_reporting=E_ALL --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $valid = array(PDO::ERRMODE_SILENT, PDO::ERRMODE_WARNING, PDO::ERRMODE_EXCEPTION); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_fetch_table_names.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_fetch_table_names.phpt index b85ba236f8..a19e680de1 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_fetch_table_names.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_fetch_table_names.phpt @@ -2,13 +2,13 @@ PDO::ATTR_FETCH_TABLE_NAMES --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt index 4ef6e52976..cd3b40d6d1 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_init_command.phpt @@ -2,8 +2,8 @@ PDO::MYSQL_ATTR_INIT_COMMAND --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> @@ -11,7 +11,7 @@ $db = MySQLPDOTest::factory(); error_reporting=E_ALL --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $dsn = MySQLPDOTest::getDSN(); $user = PDO_MYSQL_TEST_USER; diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_max_buffer_size.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_max_buffer_size.phpt index c9aa5aaac4..c988b2b3cb 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_max_buffer_size.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_max_buffer_size.phpt @@ -2,15 +2,15 @@ MySQL PDO->__construct(), PDO::MYSQL_ATTR_MAX_BUFFER_SIZE --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); if (MySQLPDOTest::isPDOMySQLnd()) die("skip PDO::MYSQL_ATTR_MAX_BUFFER_SIZE not supported with mysqlnd"); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function try_buffer_size($offset, $buffer_size) { @@ -65,7 +65,7 @@ if (MySQLPDOTest::isPDOMySQLnd()) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt index b10e82afcb..92bab1d30d 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_multi_statements.phpt @@ -2,8 +2,8 @@ PDO::MYSQL_ATTR_MULTI_STATEMENTS --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> @@ -11,7 +11,7 @@ $db = MySQLPDOTest::factory(); error_reporting=E_ALL --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $dsn = MySQLPDOTest::getDSN(); $user = PDO_MYSQL_TEST_USER; diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt index 3a937c7dee..44503c1053 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_oracle_nulls.phpt @@ -2,13 +2,13 @@ PDO::ATTR_ORACLE_NULLS --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_prefetch.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_prefetch.phpt index 41dcf06f40..f1ca4be1de 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_prefetch.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_prefetch.phpt @@ -2,14 +2,14 @@ PDO::ATTR_PREFETCH --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); var_dump($db->getAttribute(PDO::ATTR_PREFETCH)); var_dump($db->setAttribute(PDO::ATTR_PREFETCH, true)); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt index 9c3087384b..206b236311 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt @@ -2,14 +2,14 @@ PDO::ATTR_SERVER_INFO --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); assert(('' == $db->errorCode()) || ('00000' == $db->errorCode())); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_server_version.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_server_version.phpt index 0a50c8d46a..a635c3771a 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_server_version.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_server_version.phpt @@ -2,14 +2,14 @@ PDO::ATTR_SERVER_VERSION --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); assert(('' == $db->errorCode()) || ('00000' == $db->errorCode())); diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt index e280ded294..ddc76d4b60 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_statement_class.phpt @@ -2,14 +2,14 @@ PDO::ATTR_STATEMENT_CLASS --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); diff --git a/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt b/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt index 1cd24f0dbf..f2653f4b6b 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_begintransaction.phpt @@ -2,8 +2,8 @@ PDO->beginTransaction() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) @@ -11,7 +11,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -183,7 +183,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_bit.phpt b/ext/pdo_mysql/tests/pdo_mysql_bit.phpt index f27e3d8c78..caa81e96ac 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_bit.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_bit.phpt @@ -2,8 +2,8 @@ MySQL PDO->exec(), BIT columns - remove after fix! --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); if (MySQLPDOTest::isPDOMySQLnd()) die("skip Known bug - mysqlnd handles BIT incorrectly!"); @@ -11,7 +11,7 @@ if (MySQLPDOTest::isPDOMySQLnd()) --FILE-- <?php /* TODO: remove this test after fix and enable the BIT test in pdo_mysql_types.phpt again */ - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function test_type(&$db, $offset, $sql_type, $value, $ret_value = NULL, $pattern = NULL) { @@ -49,7 +49,7 @@ if (MySQLPDOTest::isPDOMySQLnd()) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt index 090f97d043..05f3151e8b 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_class_constants.phpt @@ -2,16 +2,16 @@ PDO MySQL specific class constants --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); if (!extension_loaded('mysqli') && !extension_loaded('mysqlnd')) { /* Need connection to detect library version */ - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); } ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $expected = array( 'MYSQL_ATTR_USE_BUFFERED_QUERY' => true, diff --git a/ext/pdo_mysql/tests/pdo_mysql_commit.phpt b/ext/pdo_mysql/tests/pdo_mysql_commit.phpt index 2219ae8ed4..6141ff611b 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_commit.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_commit.phpt @@ -2,8 +2,8 @@ MySQL PDO->commit() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) @@ -11,7 +11,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -81,7 +81,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) print "done!"; --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test_commit'); MySQLPDOTest::dropTestTable($db); diff --git a/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt b/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt index f7dede52ef..84ce556d32 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_connect_charset.phpt @@ -2,13 +2,13 @@ PDO_MYSQL: Defining a connection charset in the DSN --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); /* Connect to mysql to determine the current charset so we can diffinate it */ $link = MySQLPDOTest::factory(); diff --git a/ext/pdo_mysql/tests/pdo_mysql_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_errorcode.phpt index a974f29df9..5bf6c10448 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_errorcode.phpt @@ -2,14 +2,14 @@ MySQL PDO->errorCode() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -79,7 +79,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_errorinfo.phpt b/ext/pdo_mysql/tests/pdo_mysql_errorinfo.phpt index dca3b2305b..487f8ab97a 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_errorinfo.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_errorinfo.phpt @@ -2,14 +2,14 @@ MySQL PDO->errorInfo() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -98,7 +98,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_exec.phpt b/ext/pdo_mysql/tests/pdo_mysql_exec.phpt index acd90904f7..cdca014108 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_exec.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_exec.phpt @@ -2,8 +2,8 @@ MySQL PDO->exec(), affected rows --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- @@ -29,7 +29,7 @@ MySQLPDOTest::skip(); return true; } - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -174,7 +174,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); @$db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_exec_ddl.phpt b/ext/pdo_mysql/tests/pdo_mysql_exec_ddl.phpt index 8afd07bef0..0b2428cc1c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_exec_ddl.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_exec_ddl.phpt @@ -2,8 +2,8 @@ MySQL PDO->exec(), affected rows --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- @@ -33,7 +33,7 @@ MySQLPDOTest::skip(); return true; } - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -79,7 +79,7 @@ MySQLPDOTest::skip(); print "done!"; --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); MySQLPDOTest::dropTestTable($db); // clean up diff --git a/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt b/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt index e1ca9e1e16..50b35618b3 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_exec_load_data.phpt @@ -2,8 +2,8 @@ MySQL PDO->exec(), affected rows --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); // Run test only locally - not against remote hosts @@ -58,7 +58,7 @@ if (($row = $stmt->fetch(PDO::FETCH_ASSOC)) && ($row['value'] != '')) { return true; } - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); putenv('PDOTEST_ATTR='.serialize([PDO::MYSQL_ATTR_LOCAL_INFILE=>true])); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -112,7 +112,7 @@ if (($row = $stmt->fetch(PDO::FETCH_ASSOC)) && ($row['value'] != '')) { ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt b/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt index f8900a0ef3..901a4ad9a8 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_exec_select.phpt @@ -2,8 +2,8 @@ MySQL PDO->exec(), SELECT --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- @@ -29,7 +29,7 @@ MySQLPDOTest::skip(); return true; } - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -55,7 +55,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); @$db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt b/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt index 9303a3119d..0e53d40deb 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_fetch_both.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->fetch() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function fetch($offset, &$db, $query, $expect = null) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt b/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt index 8ab2c98b4c..2eb34cd076 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt @@ -2,8 +2,8 @@ MySQL PDO->getAttribute() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) @@ -11,7 +11,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -98,7 +98,7 @@ PDO::ATTR_SERVER_INFO ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_interface.phpt b/ext/pdo_mysql/tests/pdo_mysql_interface.phpt index 306778614b..cc949b265d 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_interface.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_interface.phpt @@ -2,8 +2,8 @@ MySQL PDO class interface --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) @@ -11,7 +11,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $expected = array( diff --git a/ext/pdo_mysql/tests/pdo_mysql_last_insert_id.phpt b/ext/pdo_mysql/tests/pdo_mysql_last_insert_id.phpt index 0ce9e1e539..d9dec0bcd3 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_last_insert_id.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_last_insert_id.phpt @@ -2,14 +2,14 @@ MySQL PDO->lastInsertId() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -112,7 +112,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_local_infile_default_off.phpt b/ext/pdo_mysql/tests/pdo_mysql_local_infile_default_off.phpt index a47bbbed31..1f1e6d9668 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_local_infile_default_off.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_local_infile_default_off.phpt @@ -2,16 +2,16 @@ ensure default for local infile is off --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); if (!MYSQLPDOTest::isPDOMySQLnd()) die("skip mysqlnd only test"); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'config.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $dsn = MySQLPDOTest::getDSN(); $user = PDO_MYSQL_TEST_USER; diff --git a/ext/pdo_mysql/tests/pdo_mysql_local_infile_set_on.phpt b/ext/pdo_mysql/tests/pdo_mysql_local_infile_set_on.phpt index 3b942a4d2e..13df9024a2 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_local_infile_set_on.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_local_infile_set_on.phpt @@ -2,16 +2,16 @@ enable local infile --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); if (!MYSQLPDOTest::isPDOMySQLnd()) die("skip mysqlnd only test"); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'config.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $dsn = MySQLPDOTest::getDSN(); $user = PDO_MYSQL_TEST_USER; diff --git a/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt index 6398a83928..199a758a82 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_multi_stmt_nextrowset.phpt @@ -2,8 +2,8 @@ MySQL PDOStatement->nextRowSet() with PDO::MYSQL_ATTR_MULTI_STATEMENTS either true or false --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); $row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC); @@ -21,7 +21,7 @@ if (!MySQLPDOTest::isPDOMySQLnd()) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); @@ -83,7 +83,7 @@ if (!MySQLPDOTest::isPDOMySQLnd()) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_param_str_natl.phpt b/ext/pdo_mysql/tests/pdo_mysql_param_str_natl.phpt index 56b94483f3..01964c0cd9 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_param_str_natl.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_param_str_natl.phpt @@ -3,15 +3,15 @@ PDO MySQL national character set parameters don't affect true prepared statement --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); @@ -29,7 +29,7 @@ foreach ($db->query('SELECT * from test') as $row) { ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt b/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt index 880f10b875..3656e71a0c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_pconnect.phpt @@ -2,13 +2,13 @@ MySQL PDO->__construct(), PDO::ATTR_PERSISTENT --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); try { diff --git a/ext/pdo_mysql/tests/pdo_mysql_phpinfo.phpt b/ext/pdo_mysql/tests/pdo_mysql_phpinfo.phpt index 74b4a73584..a230b3c19f 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_phpinfo.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_phpinfo.phpt @@ -2,14 +2,14 @@ MySQL PDO phpinfo() output --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); ob_start(); diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt index 437ea7a458..8db812ee19 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), emulated PS --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function prepex($offset, &$db, $query, $input_params = null, $error_info = null) { @@ -320,7 +320,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt index 3f63ffcb01..e8b5cb39ae 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_anonymous.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), emulated PS, anonymous placeholder --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -60,7 +60,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_placeholder_everywhere.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_placeholder_everywhere.phpt index 3a77d5eee1..5ad3c85641 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_placeholder_everywhere.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_emulated_placeholder_everywhere.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), emulated PS, anonymous placeholder --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); // TODO: This test is MySQL version specific - for whatever reason ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -56,7 +56,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt index 958068f035..0e7dc4b3ab 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_load_data.phpt @@ -2,8 +2,8 @@ MySQL PDO->prepare() and 1295 (ER_UNSUPPORTED_PS) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); // Run test only locally - not against remote hosts @@ -58,7 +58,7 @@ if (($row = $stmt->fetch(PDO::FETCH_ASSOC)) && ($row['value'] != '')) { return true; } - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); // Run with native PS. // The test is about checking the fallback to emulation @@ -116,7 +116,7 @@ if (($row = $stmt->fetch(PDO::FETCH_ASSOC)) && ($row['value'] != '')) { ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_match_against.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_match_against.phpt index 12cf051647..f77c420d67 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_match_against.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_match_against.phpt @@ -2,13 +2,13 @@ Bug #41876 (bindParam() and bindValue() do not work with MySQL MATCH () AGAINST ()) --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -40,7 +40,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt index 13b9034788..c88b90663b 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), native PS --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function prepex($offset, &$db, $query, $input_params = null, $error_info = null, $suppress_warning = false) { @@ -337,7 +337,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt index 000e44b731..48bd33fda5 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_clear_error.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), native PS, clear line after error --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -70,7 +70,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_column.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_column.phpt index 8a942d0d32..1ee1c3a43b 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_column.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_column.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), native PS, named placeholder --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -30,7 +30,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_dup_named_placeholder.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_dup_named_placeholder.phpt index e382dff375..c9465b62a2 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_dup_named_placeholder.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_dup_named_placeholder.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), native PS, named placeholder II --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -96,7 +96,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt index d56f7c6549..e706b92616 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_mixed_style.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), native PS, mixed, wired style --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -28,7 +28,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt index 896d9cd2a3..12acdcc0b1 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_named_placeholder.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(), native PS, named placeholder --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -68,7 +68,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt index 442e710e74..8df6961f93 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_prepare_native_placeholder_everywhere.phpt @@ -2,14 +2,14 @@ MySQL PDO->prepare(),native PS, anonymous placeholder --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { $db->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERY, 1); @@ -61,7 +61,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_quote.phpt b/ext/pdo_mysql/tests/pdo_mysql_quote.phpt index 3d094a4136..efb38ba576 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_quote.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_quote.phpt @@ -2,13 +2,13 @@ MySQL ensure quote function returns expected results --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); var_dump($db->quote('foo', PDO::PARAM_STR)); diff --git a/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt b/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt index 108975bcf8..30f1d56f88 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt @@ -2,8 +2,8 @@ PDO::rollBack() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) @@ -11,7 +11,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db)); @@ -83,7 +83,7 @@ if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); $db->exec('DROP TABLE IF EXISTS test2'); diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindcolumn.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindcolumn.phpt index 1dd3ca0fa6..bf56cbc835 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindcolumn.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindcolumn.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->bindColumn() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -103,7 +103,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam.phpt index 4c3716de4b..422c519355 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam.phpt @@ -2,13 +2,13 @@ MySQL PDOStatement->bindParam() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); @@ -118,7 +118,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam_types.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam_types.phpt index c23ef4b2fd..c6860fa539 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam_types.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindparam_types.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->bindParam() - SQL column types --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -166,7 +166,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindvalue.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindvalue.phpt index 42f01d5332..173105a48e 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_bindvalue.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_bindvalue.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->bindValue() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -297,7 +297,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_blobfromsteam.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_blobfromsteam.phpt index 2dedf35958..bea8773a23 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_blobfromsteam.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_blobfromsteam.phpt @@ -2,8 +2,8 @@ MySQL PDOStatement - inserting BLOB from stream --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $tmp = MySQLPDOTest::getTempDir(); @@ -28,7 +28,7 @@ unlink($file); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function blob_from_stream($offset, $db, $file, $blob) { @@ -137,7 +137,7 @@ unlink($file); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); @unlink(MySQLPDOTest::getTempDir() . DIRECTORY_SEPARATOR . 'pdoblob.tst'); diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt index bec8b70caf..a247de534e 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_blobs.phpt @@ -2,13 +2,13 @@ MySQL Prepared Statements and BLOBs --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $blobs = array( @@ -90,7 +90,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor.phpt index 455b17d1ef..d0da7a8e16 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor.phpt @@ -2,15 +2,15 @@ MySQL PDOStatement->closeCursor() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php /* TODO the results look wrong, why do we get 2014 with buffered AND unbuffered queries */ - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function pdo_mysql_stmt_closecursor($db) { @@ -146,7 +146,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor_empty.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor_empty.phpt index 6b4e4d225f..77f663584a 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor_empty.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_closecursor_empty.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->closeCursor() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); @@ -63,7 +63,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_columncount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_columncount.phpt index 69e0d35e17..a701469ed1 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_columncount.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_columncount.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->columnCount() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -56,7 +56,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt index b4c75ebee1..f77ba60f75 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorcode.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->errorCode(); --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS ihopeitdoesnotexist'); diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt index 9254568db0..e9dbeab3a6 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_errorinfo.phpt @@ -2,14 +2,14 @@ MySQL PDOStatement->errorInfo(); --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -61,7 +61,7 @@ $db = MySQLPDOTest::factory(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt index 255cd383a6..46ab4f911c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_non_select.phpt @@ -2,13 +2,13 @@ MySQL PDOStatement->execute()/fetch(), Non-SELECT --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -184,7 +184,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt index f23f9572c1..37dda2c0f5 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt @@ -2,13 +2,13 @@ MySQL PDOStatement->fetch(), PDO::FETCH_SERIALIZE --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -115,7 +115,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt index 890c7b73cb..bfc907dbcb 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize_simple.phpt @@ -2,13 +2,13 @@ MySQL PDOStatement->fetch(), PDO::FETCH_SERIALIZE --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt index e35f95a86f..ae14c056f3 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt @@ -2,8 +2,8 @@ MySQL PDO: PDOStatement->fetchObject() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); @@ -19,7 +19,7 @@ if (!$ok) ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -77,7 +77,7 @@ print "done!"; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt index 10ccba2291..529858fc2b 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_getcolumnmeta.phpt @@ -2,8 +2,8 @@ MySQL: PDOStatement->getColumnMeta() --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); // Too many differences among MySQL version - run only with a recent one $db = MySQLPDOTest::factory(); @@ -15,7 +15,7 @@ if ($version < 51) ?> --FILE-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); MySQLPDOTest::createTestTable($db); diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt index d2a2316272..9e36714d54 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_multiquery.phpt @@ -2,13 +2,13 @@ PDOStatements and multi query --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function mysql_stmt_multiquery_wrong_usage($db) { @@ -53,7 +53,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt index e971ce9513..c5e66cf18a 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_nextrowset.phpt @@ -4,8 +4,8 @@ MySQL PDOStatement->nextRowSet() nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); $row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC); @@ -23,7 +23,7 @@ if (!MySQLPDOTest::isPDOMySQLnd()) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); @@ -110,7 +110,7 @@ if (!MySQLPDOTest::isPDOMySQLnd()) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_rowcount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_rowcount.phpt index 1e89c8900c..713945e98d 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_rowcount.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_rowcount.phpt @@ -2,13 +2,13 @@ MySQL PDOStatement->rowCount() @ SELECT --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); MySQLPDOTest::createTestTable($db); @@ -29,7 +29,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECT-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt index 1dc203fa9e..35d4ba3cba 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_unbuffered_2050.phpt @@ -2,8 +2,8 @@ MySQL PDO:query() vs. PDO::prepare() and MySQL error 2050 --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); if (MYSQLPDOTest::isPDOMySQLnd()) @@ -11,7 +11,7 @@ if (MYSQLPDOTest::isPDOMySQLnd()) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); try { @@ -112,7 +112,7 @@ if (MYSQLPDOTest::isPDOMySQLnd()) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; MySQLPDOTest::dropTestTable(); ?> --EXPECTF-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt index 02f8c682b2..e1b57a753e 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_variable_columncount.phpt @@ -4,8 +4,8 @@ MySQL Prepared Statements and different column counts nextRowset() problem with stored proc & emulation mode & mysqlnd --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); $db = MySQLPDOTest::factory(); @@ -21,7 +21,7 @@ if ($version < 50000) ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); $db = MySQLPDOTest::factory(); function check_result($offset, $stmt, $columns) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt b/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt index 773537b12c..915df7d69f 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_subclass.phpt @@ -2,13 +2,13 @@ MySQL PDOStatement->execute()/fetch(), Non-SELECT --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); // No silly strict mode warnings, please! error_reporting(E_ALL^E_STRICT); @@ -74,7 +74,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_types.phpt b/ext/pdo_mysql/tests/pdo_mysql_types.phpt index 7fb9fe51ed..fee1aff514 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_types.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_types.phpt @@ -2,13 +2,13 @@ MySQL PDO->exec(), native types wo ZEROFILL --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function test_type(&$db, $offset, $sql_type, $value, $ret_value = NULL, $pattern = NULL, $alternative_type = NULL) { @@ -176,7 +176,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_types_zerofill.phpt b/ext/pdo_mysql/tests/pdo_mysql_types_zerofill.phpt index 1d8c529378..1ef5ab1370 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_types_zerofill.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_types_zerofill.phpt @@ -2,13 +2,13 @@ MySQL PDO->exec(), native types - ZEROFILL --SKIPIF-- <?php -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); MySQLPDOTest::skip(); ?> --FILE-- <?php - require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); + require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); function test_type(&$db, $offset, $sql_type, $value, $ret_value = NULL, $pattern = NULL) { @@ -120,7 +120,7 @@ MySQLPDOTest::skip(); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pecl_bug_5200.phpt b/ext/pdo_mysql/tests/pecl_bug_5200.phpt index ff5b0e4c3e..d44a5c2282 100644 --- a/ext/pdo_mysql/tests/pecl_bug_5200.phpt +++ b/ext/pdo_mysql/tests/pecl_bug_5200.phpt @@ -3,14 +3,14 @@ PDO MySQL PECL Bug #5200 (Describe table gives unexpected result mysql and type --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__). '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__. '/common.phpt'); $db->exec("CREATE TABLE test (bar INT NOT NULL, phase enum('please_select', 'I', 'II', 'IIa', 'IIb', 'III', 'IV'))"); @@ -20,7 +20,7 @@ foreach ($db->query('DESCRIBE test phase')->fetchAll(PDO::FETCH_ASSOC) as $row) ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/pecl_bug_5780.phpt b/ext/pdo_mysql/tests/pecl_bug_5780.phpt index 95c82d7603..6838cebd37 100644 --- a/ext/pdo_mysql/tests/pecl_bug_5780.phpt +++ b/ext/pdo_mysql/tests/pecl_bug_5780.phpt @@ -3,14 +3,14 @@ PDO MySQL PECL Bug #5780 (Failure to produce an error when one is expected) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__). '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__. '/common.phpt'); $db->exec("CREATE TABLE test (login varchar(32) NOT NULL, data varchar(64) NOT NULL)"); $db->exec("CREATE TABLE test2 (login varchar(32) NOT NULL, password varchar(64) NOT NULL)"); @@ -28,7 +28,7 @@ var_dump($info); ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); $db->exec('DROP TABLE IF EXISTS test2'); diff --git a/ext/pdo_mysql/tests/pecl_bug_5802.phpt b/ext/pdo_mysql/tests/pecl_bug_5802.phpt index 1eec07fa04..01e95343c6 100644 --- a/ext/pdo_mysql/tests/pecl_bug_5802.phpt +++ b/ext/pdo_mysql/tests/pecl_bug_5802.phpt @@ -3,14 +3,14 @@ PDO MySQL PECL Bug #5802 (bindParam/bindValue retain the is_null flag) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__). '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__. '/common.phpt'); $db->exec('create table test ( bar char(3) NULL )'); $stmt = $db->prepare('insert into test (bar) values(:bar)') or var_dump($db->errorInfo()); @@ -36,7 +36,7 @@ print "done!"; ?> --CLEAN-- <?php -require dirname(__FILE__) . '/mysql_pdo_test.inc'; +require __DIR__ . '/mysql_pdo_test.inc'; $db = MySQLPDOTest::factory(); $db->exec('DROP TABLE IF EXISTS test'); ?> diff --git a/ext/pdo_mysql/tests/show_tables.phpt b/ext/pdo_mysql/tests/show_tables.phpt index 1b1ef67680..d6b1337412 100644 --- a/ext/pdo_mysql/tests/show_tables.phpt +++ b/ext/pdo_mysql/tests/show_tables.phpt @@ -3,14 +3,14 @@ PDO MySQL SHOW TABLES --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); print_r($db->query('SHOW TABLES')); --EXPECT-- diff --git a/ext/pdo_oci/tests/bug41996.phpt b/ext/pdo_oci/tests/bug41996.phpt index 56846e3928..39c2fb3fd2 100644 --- a/ext/pdo_oci/tests/bug41996.phpt +++ b/ext/pdo_oci/tests/bug41996.phpt @@ -3,7 +3,7 @@ PDO OCI Bug #41996 (Problem accessing Oracle ROWID) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/bug44301.phpt b/ext/pdo_oci/tests/bug44301.phpt index 1a3d8ad797..979a72d840 100644 --- a/ext/pdo_oci/tests/bug44301.phpt +++ b/ext/pdo_oci/tests/bug44301.phpt @@ -3,7 +3,7 @@ PDO OCI Bug #44301 (Segfault when an exception is thrown on persistent connectio --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/bug46274.phpt b/ext/pdo_oci/tests/bug46274.phpt index b6165b05d5..91aa5c883f 100644 --- a/ext/pdo_oci/tests/bug46274.phpt +++ b/ext/pdo_oci/tests/bug46274.phpt @@ -4,7 +4,7 @@ Bug #46274 (pdo_pgsql - Segfault when using PDO::ATTR_STRINGIFY_FETCHES and blob <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/bug46274_2.phpt b/ext/pdo_oci/tests/bug46274_2.phpt index 3430877b9f..434cdbc218 100644 --- a/ext/pdo_oci/tests/bug46274_2.phpt +++ b/ext/pdo_oci/tests/bug46274_2.phpt @@ -4,7 +4,7 @@ Bug #46274 (pdo_pgsql - Segfault when using PDO::ATTR_STRINGIFY_FETCHES and blob <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/bug54379.phpt b/ext/pdo_oci/tests/bug54379.phpt index 6137388931..655773e976 100644 --- a/ext/pdo_oci/tests/bug54379.phpt +++ b/ext/pdo_oci/tests/bug54379.phpt @@ -4,7 +4,7 @@ Bug #54379 (PDO_OCI: UTF-8 output gets truncated) <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; if (!preg_match('/charset=.*utf8/i', getenv('PDOTEST_DSN'))) die('skip not UTF8 DSN'); PDOTest::skip(); diff --git a/ext/pdo_oci/tests/bug57702.phpt b/ext/pdo_oci/tests/bug57702.phpt index 82b50f9ce0..ff64399a9a 100644 --- a/ext/pdo_oci/tests/bug57702.phpt +++ b/ext/pdo_oci/tests/bug57702.phpt @@ -3,7 +3,7 @@ PDO OCI Bug #57702 (Multi-row BLOB fetches) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/bug60994.phpt b/ext/pdo_oci/tests/bug60994.phpt index 890ecb47c7..07b06c1deb 100644 --- a/ext/pdo_oci/tests/bug60994.phpt +++ b/ext/pdo_oci/tests/bug60994.phpt @@ -6,7 +6,7 @@ ashnazg@php.net --SKIPIF-- <?php if (!extension_loaded('mbstring') || !extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; if (!strpos(strtolower(getenv('PDOTEST_DSN')), 'charset=al32utf8')) die('skip expected output valid for AL32UTF8 character set'); PDOTest::skip(); ?> diff --git a/ext/pdo_oci/tests/bug_33707.phpt b/ext/pdo_oci/tests/bug_33707.phpt index 0692a08bdf..9b682cac95 100644 --- a/ext/pdo_oci/tests/bug_33707.phpt +++ b/ext/pdo_oci/tests/bug_33707.phpt @@ -3,7 +3,7 @@ PDO OCI Bug #33707 (Errors in select statements not reported) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/checkliveness.phpt b/ext/pdo_oci/tests/checkliveness.phpt index 5f1a11ace3..00634b95d8 100644 --- a/ext/pdo_oci/tests/checkliveness.phpt +++ b/ext/pdo_oci/tests/checkliveness.phpt @@ -3,7 +3,7 @@ PDO OCI checkliveness (code coverage) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'; +require __DIR__.'/../../pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/pdo_oci_attr_action.phpt b/ext/pdo_oci/tests/pdo_oci_attr_action.phpt index b4b9a8c78b..19d549a8ce 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_action.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_action.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Setting session action --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $query = 'select action from v$session where sid = sys_context(\'USERENV\', \'SID\')'; diff --git a/ext/pdo_oci/tests/pdo_oci_attr_autocommit_1.phpt b/ext/pdo_oci/tests/pdo_oci_attr_autocommit_1.phpt index 0c02a01e53..d9a9bd46a3 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_autocommit_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_autocommit_1.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Basic autocommit functionality --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_attr_autocommit_2.phpt b/ext/pdo_oci/tests/pdo_oci_attr_autocommit_2.phpt index 9addca8835..f208fd56d9 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_autocommit_2.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_autocommit_2.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: beginTransaction and native transactions --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); diff --git a/ext/pdo_oci/tests/pdo_oci_attr_autocommit_3.phpt b/ext/pdo_oci/tests/pdo_oci_attr_autocommit_3.phpt index 4066db6a8f..a07f70237a 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_autocommit_3.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_autocommit_3.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: closing a connection in non-autocommit mode commits data --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); // Check connection can be created with AUTOCOMMIT off putenv('PDOTEST_ATTR='.serialize(array(PDO::ATTR_AUTOCOMMIT=>false))); diff --git a/ext/pdo_oci/tests/pdo_oci_attr_case.phpt b/ext/pdo_oci/tests/pdo_oci_attr_case.phpt index 4c19d6c737..5ad89af6b1 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_case.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_case.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Column Case --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); function do_query1($dbh) { diff --git a/ext/pdo_oci/tests/pdo_oci_attr_client.phpt b/ext/pdo_oci/tests/pdo_oci_attr_client.phpt index eadb028e0f..3febab71ea 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_client.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_client.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Client version --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_attr_client_identifier.phpt b/ext/pdo_oci/tests/pdo_oci_attr_client_identifier.phpt index 3d49eb0411..1130082929 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_client_identifier.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_client_identifier.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Setting session client identifier --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $query = 'select client_identifier from v$session where sid = sys_context(\'USERENV\', \'SID\')'; diff --git a/ext/pdo_oci/tests/pdo_oci_attr_client_info.phpt b/ext/pdo_oci/tests/pdo_oci_attr_client_info.phpt index 6bf936645f..381248ba63 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_client_info.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_client_info.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Setting session client info --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $query = 'select client_info from v$session where sid = sys_context(\'USERENV\', \'SID\')'; diff --git a/ext/pdo_oci/tests/pdo_oci_attr_drivername.phpt b/ext/pdo_oci/tests/pdo_oci_attr_drivername.phpt index 7934e79538..b8609d8f19 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_drivername.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_drivername.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: verify driver name --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'; +require __DIR__ . '/../../pdo/tests/pdo_test.inc'; $dbh = PDOTest::factory(); var_dump($dbh->getAttribute(PDO::ATTR_DRIVER_NAME)); diff --git a/ext/pdo_oci/tests/pdo_oci_attr_module.phpt b/ext/pdo_oci/tests/pdo_oci_attr_module.phpt index d10304d585..15757bb2e2 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_module.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_module.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Setting session module --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $query = 'select module from v$session where sid = sys_context(\'USERENV\', \'SID\')'; diff --git a/ext/pdo_oci/tests/pdo_oci_attr_nulls_1.phpt b/ext/pdo_oci/tests/pdo_oci_attr_nulls_1.phpt index 7c104b20ba..2a38341b27 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_nulls_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_nulls_1.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Oracle Nulls --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); function do_query($dbh) { diff --git a/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt b/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt index 0b42ecb660..c9a3b1fb24 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_prefetch_1.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Set prefetch on connection --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_attr_prefetch_2.phpt b/ext/pdo_oci/tests/pdo_oci_attr_prefetch_2.phpt index 4b8fd80794..0eec677902 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_prefetch_2.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_prefetch_2.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: prefetch on statements --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_attr_server.phpt b/ext/pdo_oci/tests/pdo_oci_attr_server.phpt index dba5a19851..566bd0749d 100644 --- a/ext/pdo_oci/tests/pdo_oci_attr_server.phpt +++ b/ext/pdo_oci/tests/pdo_oci_attr_server.phpt @@ -3,13 +3,13 @@ PDO_OCI: Attribute: Server version and info --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_class_constants.phpt b/ext/pdo_oci/tests/pdo_oci_class_constants.phpt index e910b995fc..265e84b9ba 100644 --- a/ext/pdo_oci/tests/pdo_oci_class_constants.phpt +++ b/ext/pdo_oci/tests/pdo_oci_class_constants.phpt @@ -3,13 +3,13 @@ PDO OCI specific class constants --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $expected = [ 'OCI_ATTR_CLIENT_INFO' => true, diff --git a/ext/pdo_oci/tests/pdo_oci_fread_1.phpt b/ext/pdo_oci/tests/pdo_oci_fread_1.phpt index dac53dbea7..0fa06c9ce4 100644 --- a/ext/pdo_oci/tests/pdo_oci_fread_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_fread_1.phpt @@ -3,14 +3,14 @@ PDO_OCI: check fread() EOF --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); if (!strpos(strtolower(getenv('PDOTEST_DSN')), 'charset=we8mswin1252')) die('skip expected output valid for WE8MSWIN1252 character set'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_quote1.phpt b/ext/pdo_oci/tests/pdo_oci_quote1.phpt index 1ee83fde4f..b71ff17e80 100644 --- a/ext/pdo_oci/tests/pdo_oci_quote1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_quote1.phpt @@ -3,13 +3,13 @@ Test PDO->quote() for PDO_OCI --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'; +require __DIR__ . '/../../pdo/tests/pdo_test.inc'; $db = PDOTest::factory(); @$db->exec("drop table poq_tab"); diff --git a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt index a973e9524f..b56ff9a4f0 100644 --- a/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stmt_getcolumnmeta.phpt @@ -3,7 +3,7 @@ PDO_OCI: PDOStatement->getColumnMeta --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- @@ -11,7 +11,7 @@ PDOTest::skip(); echo "Preparations before the test\n"; -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); try { $db = PDOTest::factory(); $db->exec(<<<SQL diff --git a/ext/pdo_oci/tests/pdo_oci_stream_1.phpt b/ext/pdo_oci/tests/pdo_oci_stream_1.phpt index 68bec157eb..ee2008d33f 100644 --- a/ext/pdo_oci/tests/pdo_oci_stream_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stream_1.phpt @@ -3,14 +3,14 @@ PDO_OCI: stream_get_contents length & offset test --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); if (!strpos(strtolower(getenv('PDOTEST_DSN')), 'charset=we8mswin1252')) die('skip expected output valid for WE8MSWIN1252 character set'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $dbh = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_stream_2a.phpt b/ext/pdo_oci/tests/pdo_oci_stream_2a.phpt index 8096fe17f7..bd4cb8ad11 100644 --- a/ext/pdo_oci/tests/pdo_oci_stream_2a.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stream_2a.phpt @@ -4,13 +4,13 @@ PDO OCI: Inserts 10K with 1 number and 2 LOB columns (stress test) <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'); +require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); $db = PDOTest::factory(); diff --git a/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt b/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt index ef5ff3d706..7164f5ad6f 100644 --- a/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stream_2b.phpt @@ -4,7 +4,7 @@ PDO OCI: Fetches 10K records from a table that contains 1 number and 2 LOB colum <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/pdo_oci_templob_1.phpt b/ext/pdo_oci/tests/pdo_oci_templob_1.phpt index 0dddd4f7e5..845eab8ed6 100644 --- a/ext/pdo_oci/tests/pdo_oci_templob_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_templob_1.phpt @@ -3,7 +3,7 @@ PDO OCI: Test to verify all implicitly created temporary LOB are cleaned up --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/pecl_bug_11345.phpt b/ext/pdo_oci/tests/pecl_bug_11345.phpt index 31f691d7ef..56c225609f 100644 --- a/ext/pdo_oci/tests/pecl_bug_11345.phpt +++ b/ext/pdo_oci/tests/pecl_bug_11345.phpt @@ -3,7 +3,7 @@ PECL PDO_OCI Bug #11345 (Test invalid character set name) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/pecl_bug_6364.phpt b/ext/pdo_oci/tests/pecl_bug_6364.phpt index e8ed6ee62d..054d58a0f8 100644 --- a/ext/pdo_oci/tests/pecl_bug_6364.phpt +++ b/ext/pdo_oci/tests/pecl_bug_6364.phpt @@ -3,13 +3,13 @@ PECL PDO_OCI Bug #6364 (segmentation fault on stored procedure call with OUT bin --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); -require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +require(__DIR__.'/../../pdo/tests/pdo_test.inc'); PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc'; +require __DIR__ . '/../../pdo/tests/pdo_test.inc'; $dbh = PDOTest::factory(); @$dbh->exec ("drop table bug_6364_t"); diff --git a/ext/pdo_odbc/tests/common.phpt b/ext/pdo_odbc/tests/common.phpt index 5b1cf83194..5606ad4b86 100644 --- a/ext/pdo_odbc/tests/common.phpt +++ b/ext/pdo_odbc/tests/common.phpt @@ -46,7 +46,7 @@ if (false !== getenv('PDOTEST_DSN')) { // on Windows and user didn't set PDOTEST_DSN, try this as a fallback: // check if MS Access DB is installed, and if yes, try using it. create a temporary MS access database. // - $path = realpath(dirname(__FILE__)) . '\pdo_odbc.mdb'; + $path = realpath(__DIR__) . '\pdo_odbc.mdb'; if (!file_exists($path)) { try { // try to create database diff --git a/ext/pdo_pgsql/tests/bug36727.phpt b/ext/pdo_pgsql/tests/bug36727.phpt index d5f8e49f96..e6b5ab7f28 100644 --- a/ext/pdo_pgsql/tests/bug36727.phpt +++ b/ext/pdo_pgsql/tests/bug36727.phpt @@ -3,15 +3,15 @@ Bug #36727 (segfault in bindValue() when no parameters are defined) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require dirname(__FILE__) . '/config.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $stmt = $db->prepare('SELECT * FROM child'); var_dump($stmt->bindValue(':test', 1, PDO::PARAM_INT)); diff --git a/ext/pdo_pgsql/tests/bug43925.phpt b/ext/pdo_pgsql/tests/bug43925.phpt index 6f2d5ee0d5..d90f36fbbc 100644 --- a/ext/pdo_pgsql/tests/bug43925.phpt +++ b/ext/pdo_pgsql/tests/bug43925.phpt @@ -3,14 +3,14 @@ Bug #43925 (Incorrect argument counter in prepared statements with pgsql) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$dbh = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$dbh = PDOTest::test_factory(__DIR__ . '/common.phpt'); @$dbh->query('DROP TABLE nodes'); diff --git a/ext/pdo_pgsql/tests/bug46274.phpt b/ext/pdo_pgsql/tests/bug46274.phpt index 92ac6a668e..0ae6849b41 100644 --- a/ext/pdo_pgsql/tests/bug46274.phpt +++ b/ext/pdo_pgsql/tests/bug46274.phpt @@ -3,14 +3,14 @@ Bug #46274 (pdo_pgsql - Segfault when using PDO::ATTR_STRINGIFY_FETCHES and blob --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); diff --git a/ext/pdo_pgsql/tests/bug46274_2.phpt b/ext/pdo_pgsql/tests/bug46274_2.phpt index df60f34540..54a32f82e3 100644 --- a/ext/pdo_pgsql/tests/bug46274_2.phpt +++ b/ext/pdo_pgsql/tests/bug46274_2.phpt @@ -3,14 +3,14 @@ Bug #46274 (pdo_pgsql - Segfault when using PDO::ATTR_STRINGIFY_FETCHES and blob --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); diff --git a/ext/pdo_pgsql/tests/bug48764.phpt b/ext/pdo_pgsql/tests/bug48764.phpt index cfe29cd7c3..1f890267e5 100644 --- a/ext/pdo_pgsql/tests/bug48764.phpt +++ b/ext/pdo_pgsql/tests/bug48764.phpt @@ -3,8 +3,8 @@ Bug #48764 (PDO_pgsql::query always uses implicit prepared statements if v3 prot --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); $db = PDOTest::factory(); @@ -19,8 +19,8 @@ if (version_compare($server_version, '7.4', '<') || version_compare($client_vers ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Test 1\n"; diff --git a/ext/pdo_pgsql/tests/bug61267.phpt b/ext/pdo_pgsql/tests/bug61267.phpt index f91eceecdf..f1eee993b1 100644 --- a/ext/pdo_pgsql/tests/bug61267.phpt +++ b/ext/pdo_pgsql/tests/bug61267.phpt @@ -3,15 +3,15 @@ PDO::exec() returns 0 when the statement is a SELECT. --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require_once dirname(__FILE__) . '/config.inc'; +require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require_once __DIR__ . '/config.inc'; PDOTest::skip(); ?> --FILE-- <?php -require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require_once dirname(__FILE__) . '/config.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require_once __DIR__ . '/config.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $res = $db->exec('SELECT * from generate_series(1, 42);'); var_dump($res); diff --git a/ext/pdo_pgsql/tests/bug62479.phpt b/ext/pdo_pgsql/tests/bug62479.phpt index 389240f8e1..3e78098d0c 100644 --- a/ext/pdo_pgsql/tests/bug62479.phpt +++ b/ext/pdo_pgsql/tests/bug62479.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #62479 (PDO-psql cannot connect if password contains spaces) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); $dsn = getenv('PDOTEST_DSN'); if (empty($dsn)) die('skip no dsn found in env'); -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); @@ -37,9 +37,9 @@ $db->exec("DROP USER $user"); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $rand = rand(5, 400); $user = "pdo_test_$rand"; diff --git a/ext/pdo_pgsql/tests/bug62498-32bit.phpt b/ext/pdo_pgsql/tests/bug62498-32bit.phpt index edcf52048c..dc5622e68b 100644 --- a/ext/pdo_pgsql/tests/bug62498-32bit.phpt +++ b/ext/pdo_pgsql/tests/bug62498-32bit.phpt @@ -3,8 +3,8 @@ PDO PgSQL Bug #62498 (pdo_pgsql inefficient when getColumnMeta() is used), 32-bi --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); if (PHP_INT_SIZE > 4) die("skip relevant for 32-bit only"); ?> @@ -12,8 +12,8 @@ if (PHP_INT_SIZE > 4) die("skip relevant for 32-bit only"); <?php echo "Begin test...\n"; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); // create the table diff --git a/ext/pdo_pgsql/tests/bug62498.phpt b/ext/pdo_pgsql/tests/bug62498.phpt index 53d42fc3fa..1620e7e77a 100644 --- a/ext/pdo_pgsql/tests/bug62498.phpt +++ b/ext/pdo_pgsql/tests/bug62498.phpt @@ -3,8 +3,8 @@ PDO PgSQL Bug #62498 (pdo_pgsql inefficient when getColumnMeta() is used), 64-bi --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); if (PHP_INT_SIZE < 8) die("skip valid for 64-bit only"); ?> @@ -12,8 +12,8 @@ if (PHP_INT_SIZE < 8) die("skip valid for 64-bit only"); <?php echo "Begin test...\n"; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); // create the table diff --git a/ext/pdo_pgsql/tests/bug62593.phpt b/ext/pdo_pgsql/tests/bug62593.phpt index 1b5b3c05aa..598307a652 100644 --- a/ext/pdo_pgsql/tests/bug62593.phpt +++ b/ext/pdo_pgsql/tests/bug62593.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #62593 (Emulate prepares behave strangely with PARAM_BOOL) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $errors = array(); diff --git a/ext/pdo_pgsql/tests/bug64953.phpt b/ext/pdo_pgsql/tests/bug64953.phpt index 6e72bcab68..f0c57a3e57 100644 --- a/ext/pdo_pgsql/tests/bug64953.phpt +++ b/ext/pdo_pgsql/tests/bug64953.phpt @@ -3,16 +3,16 @@ PDO PgSQL Bug #64953 (Postgres prepared statement positional parameter casting) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php echo "Test\n"; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); echo "Taken from the bug report:\n"; diff --git a/ext/pdo_pgsql/tests/bug66584.phpt b/ext/pdo_pgsql/tests/bug66584.phpt index 1a430f0c13..7c98046a30 100644 --- a/ext/pdo_pgsql/tests/bug66584.phpt +++ b/ext/pdo_pgsql/tests/bug66584.phpt @@ -4,14 +4,14 @@ PDO PgSQL Bug #66584 (Segmentation fault on statement deallocation) <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); if (!extension_loaded('json')) die('skip json ext not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); diff --git a/ext/pdo_pgsql/tests/bug67462.phpt b/ext/pdo_pgsql/tests/bug67462.phpt index 888b19c248..11a39a5f12 100644 --- a/ext/pdo_pgsql/tests/bug67462.phpt +++ b/ext/pdo_pgsql/tests/bug67462.phpt @@ -3,15 +3,15 @@ PDO PgSQL Bug #67462 (PDO_PGSQL::beginTransaction() wrongly throws exception whe --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $pdo->beginTransaction(); diff --git a/ext/pdo_pgsql/tests/bug68199.phpt b/ext/pdo_pgsql/tests/bug68199.phpt index b27d3ecf9d..0c79faeeb9 100644 --- a/ext/pdo_pgsql/tests/bug68199.phpt +++ b/ext/pdo_pgsql/tests/bug68199.phpt @@ -3,8 +3,8 @@ Bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); $db = PDOTest::factory(); @@ -15,8 +15,8 @@ if (version_compare($db->getAttribute(PDO::ATTR_SERVER_VERSION), '9.0.0') < 0) { ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // pgsqlGetPid should return something meaningful diff --git a/ext/pdo_pgsql/tests/bug68371.phpt b/ext/pdo_pgsql/tests/bug68371.phpt index 350708b97d..24dc5f501f 100644 --- a/ext/pdo_pgsql/tests/bug68371.phpt +++ b/ext/pdo_pgsql/tests/bug68371.phpt @@ -3,15 +3,15 @@ PDO PgSQL Bug #38671 (PDO#getAttribute() cannot be called with platform-specific --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $attrs = array( diff --git a/ext/pdo_pgsql/tests/bug69344.phpt b/ext/pdo_pgsql/tests/bug69344.phpt index d8e5d25b0a..14d45d0ddb 100644 --- a/ext/pdo_pgsql/tests/bug69344.phpt +++ b/ext/pdo_pgsql/tests/bug69344.phpt @@ -3,15 +3,15 @@ PDO PgSQL Bug #69344 (PDO PgSQL Incorrect binding numeric array with gaps) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $pdo->setAttribute (\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC); diff --git a/ext/pdo_pgsql/tests/bug69362.phpt b/ext/pdo_pgsql/tests/bug69362.phpt index 3db58d5fcc..1fd4e80e7d 100644 --- a/ext/pdo_pgsql/tests/bug69362.phpt +++ b/ext/pdo_pgsql/tests/bug69362.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #69362 (PDO-pgsql fails to connect if password contains a leading --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); $dsn = getenv('PDOTEST_DSN'); if (empty($dsn)) die('skip no dsn found in env'); -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); @@ -37,9 +37,9 @@ $db->exec("DROP USER $user"); ?> --FILE-- <?php -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $rand = rand(5, 400); $user = "pdo_test_$rand"; diff --git a/ext/pdo_pgsql/tests/bug69752.phpt b/ext/pdo_pgsql/tests/bug69752.phpt index e83855f218..4b6bce9619 100644 --- a/ext/pdo_pgsql/tests/bug69752.phpt +++ b/ext/pdo_pgsql/tests/bug69752.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #69752 (memory leak with closeCursor) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); diff --git a/ext/pdo_pgsql/tests/bug70313.phpt b/ext/pdo_pgsql/tests/bug70313.phpt index 14c3b7bfcc..f734442f8c 100644 --- a/ext/pdo_pgsql/tests/bug70313.phpt +++ b/ext/pdo_pgsql/tests/bug70313.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #70313 (PDO statement fails to throw exception) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); diff --git a/ext/pdo_pgsql/tests/bug70861.phpt b/ext/pdo_pgsql/tests/bug70861.phpt index 7edebba1e6..2da08e6e03 100644 --- a/ext/pdo_pgsql/tests/bug70861.phpt +++ b/ext/pdo_pgsql/tests/bug70861.phpt @@ -3,14 +3,14 @@ Bug #70861 Segmentation fault in pdo_parse_params() during Drupal 8 test suite --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); diff --git a/ext/pdo_pgsql/tests/bug71573.phpt b/ext/pdo_pgsql/tests/bug71573.phpt index d3046bff6b..66562344ef 100644 --- a/ext/pdo_pgsql/tests/bug71573.phpt +++ b/ext/pdo_pgsql/tests/bug71573.phpt @@ -3,15 +3,15 @@ Bug #71573 (Segfault (core dumped) if paramno beyond bound) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require_once dirname(__FILE__) . '/config.inc'; +require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require_once __DIR__ . '/config.inc'; PDOTest::skip(); ?> --FILE-- <?php -require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require_once dirname(__FILE__) . '/config.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require_once __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require_once __DIR__ . '/config.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $statement = $db->prepare('select ?'); $statement->execute([ 'test', 'test', 'test' ]); diff --git a/ext/pdo_pgsql/tests/bug72294.phpt b/ext/pdo_pgsql/tests/bug72294.phpt index 46c462417b..9ef4a424bb 100644 --- a/ext/pdo_pgsql/tests/bug72294.phpt +++ b/ext/pdo_pgsql/tests/bug72294.phpt @@ -3,13 +3,13 @@ Bug #72294 Segmentation fault/invalid pointer in connection with pgsql_stmt_dtor --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; function handleError($errno, $errstr, $errfile, $errline) { @@ -110,7 +110,7 @@ class DatabaseTest extends PHPUnit_Framework_TestCase { public function testIt() { - $pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); + $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $prepared_statement_cache = new PreparedStatementCache( $pdo ); @@ -125,7 +125,7 @@ SQL public function test_construct() { - $pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); + $pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); $pdo->exec( 'CREATE TEMPORARY TABLE temp_table ( test_column INT NOT NULL );' ); diff --git a/ext/pdo_pgsql/tests/bug72570.phpt b/ext/pdo_pgsql/tests/bug72570.phpt index 76329b1996..b479974484 100644 --- a/ext/pdo_pgsql/tests/bug72570.phpt +++ b/ext/pdo_pgsql/tests/bug72570.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #72570 (Segmentation fault when binding parameters on a query with --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); diff --git a/ext/pdo_pgsql/tests/bug72633.phpt b/ext/pdo_pgsql/tests/bug72633.phpt index 06bd25e626..1c11311fc5 100644 --- a/ext/pdo_pgsql/tests/bug72633.phpt +++ b/ext/pdo_pgsql/tests/bug72633.phpt @@ -3,16 +3,16 @@ PDO PgSQL Bug #72633 (Postgres PDO lastInsertId() should work without specifying --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); diff --git a/ext/pdo_pgsql/tests/bug73959.phpt b/ext/pdo_pgsql/tests/bug73959.phpt index c04b4acd52..7a73632916 100644 --- a/ext/pdo_pgsql/tests/bug73959.phpt +++ b/ext/pdo_pgsql/tests/bug73959.phpt @@ -3,15 +3,15 @@ Bug #73959 (lastInsertId fails to throw an exception) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require dirname(__FILE__) . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -require dirname(__FILE__) . '/config.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_PERSISTENT, false); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true); diff --git a/ext/pdo_pgsql/tests/bug75402.phpt b/ext/pdo_pgsql/tests/bug75402.phpt index 065bf80984..9c7460b871 100644 --- a/ext/pdo_pgsql/tests/bug75402.phpt +++ b/ext/pdo_pgsql/tests/bug75402.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #75402 Possible Memory Leak using PDO::CURSOR_SCROLL option --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $resp = new \stdClass(); $resp->entries = []; diff --git a/ext/pdo_pgsql/tests/bug_33876.phpt b/ext/pdo_pgsql/tests/bug_33876.phpt index 31a76c9a63..bce84fa9bf 100644 --- a/ext/pdo_pgsql/tests/bug_33876.phpt +++ b/ext/pdo_pgsql/tests/bug_33876.phpt @@ -3,14 +3,14 @@ PDO PgSQL Bug #33876 (PDO misquotes/miscasts bool(false)) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $db->exec("SET LC_MESSAGES='C'"); diff --git a/ext/pdo_pgsql/tests/bug_49985.phpt b/ext/pdo_pgsql/tests/bug_49985.phpt index be5a4297bd..76d12f3f13 100644 --- a/ext/pdo_pgsql/tests/bug_49985.phpt +++ b/ext/pdo_pgsql/tests/bug_49985.phpt @@ -3,14 +3,14 @@ Bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction) --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->exec("CREATE TABLE test (a int PRIMARY KEY)"); diff --git a/ext/pdo_pgsql/tests/copy_from.phpt b/ext/pdo_pgsql/tests/copy_from.phpt index f3e054e622..7491e1836b 100644 --- a/ext/pdo_pgsql/tests/copy_from.phpt +++ b/ext/pdo_pgsql/tests/copy_from.phpt @@ -3,14 +3,14 @@ PDO PgSQL pgsqlCopyFromArray and pgsqlCopyFromFile --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); diff --git a/ext/pdo_pgsql/tests/copy_to.phpt b/ext/pdo_pgsql/tests/copy_to.phpt index 7e93fd3b64..c790fa5729 100644 --- a/ext/pdo_pgsql/tests/copy_to.phpt +++ b/ext/pdo_pgsql/tests/copy_to.phpt @@ -3,14 +3,14 @@ PDO PgSQL pgsqlCopyToArray and pgsqlCopyToFile --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); diff --git a/ext/pdo_pgsql/tests/debug_emulated_prepares.phpt b/ext/pdo_pgsql/tests/debug_emulated_prepares.phpt index ddbe4fea59..dfbbcb4ad4 100644 --- a/ext/pdo_pgsql/tests/debug_emulated_prepares.phpt +++ b/ext/pdo_pgsql/tests/debug_emulated_prepares.phpt @@ -3,14 +3,14 @@ PDO PgSQL PDOStatement::debugDumpParams() with emulated prepares --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); $stmt = $db->prepare('SELECT :bool, :int, :string, :null'); diff --git a/ext/pdo_pgsql/tests/disable_prepares.phpt b/ext/pdo_pgsql/tests/disable_prepares.phpt index 99a7695404..bbc6a62e87 100644 --- a/ext/pdo_pgsql/tests/disable_prepares.phpt +++ b/ext/pdo_pgsql/tests/disable_prepares.phpt @@ -3,14 +3,14 @@ PDO PgSQL PGSQL_ATTR_DISABLE_PREPARES --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_COLUMN); diff --git a/ext/pdo_pgsql/tests/getnotify.phpt b/ext/pdo_pgsql/tests/getnotify.phpt index f09c3a15d2..ad540e6c88 100644 --- a/ext/pdo_pgsql/tests/getnotify.phpt +++ b/ext/pdo_pgsql/tests/getnotify.phpt @@ -3,14 +3,14 @@ PDO PgSQL LISTEN/NOTIFY support --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // pgsqlGetPid should return something meaningful diff --git a/ext/pdo_pgsql/tests/is_in_transaction.phpt b/ext/pdo_pgsql/tests/is_in_transaction.phpt index b1df816420..f5e950a047 100644 --- a/ext/pdo_pgsql/tests/is_in_transaction.phpt +++ b/ext/pdo_pgsql/tests/is_in_transaction.phpt @@ -3,14 +3,14 @@ PDO PgSQL isInTransaction --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); diff --git a/ext/pdo_pgsql/tests/large_objects.phpt b/ext/pdo_pgsql/tests/large_objects.phpt index 491351d78a..6215e49cb5 100644 --- a/ext/pdo_pgsql/tests/large_objects.phpt +++ b/ext/pdo_pgsql/tests/large_objects.phpt @@ -3,14 +3,14 @@ PDO PgSQL Large Objects --SKIPIF-- <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); -require dirname(__FILE__) . '/config.inc'; -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +require __DIR__ . '/config.inc'; +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; PDOTest::skip(); ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); diff --git a/ext/pdo_sqlite/tests/bug33841.phpt b/ext/pdo_sqlite/tests/bug33841.phpt index b053b6ee3a..1c9fe201f4 100644 --- a/ext/pdo_sqlite/tests/bug33841.phpt +++ b/ext/pdo_sqlite/tests/bug33841.phpt @@ -6,8 +6,8 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->exec('CREATE TABLE test (text)'); diff --git a/ext/pdo_sqlite/tests/bug46139.phpt b/ext/pdo_sqlite/tests/bug46139.phpt index c361d7a9b1..c85d1b91af 100644 --- a/ext/pdo_sqlite/tests/bug46139.phpt +++ b/ext/pdo_sqlite/tests/bug46139.phpt @@ -7,8 +7,8 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); class Person { public $test = NULL; diff --git a/ext/pdo_sqlite/tests/bug52487.phpt b/ext/pdo_sqlite/tests/bug52487.phpt index 4861f6204f..ff586d2f64 100644 --- a/ext/pdo_sqlite/tests/bug52487.phpt +++ b/ext/pdo_sqlite/tests/bug52487.phpt @@ -6,8 +6,8 @@ if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?> --FILE-- <?php -require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; -$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $stmt = $db->prepare("select 1 as attr"); for ($i = 0; $i < 10; $i++) { diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt index 89cb6c89bd..0023f91031 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt @@ -5,7 +5,7 @@ PDO_sqlite: Testing open flags --FILE-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . "pdo_sqlite_open_flags.db"; +$filename = __DIR__ . DIRECTORY_SEPARATOR . "pdo_sqlite_open_flags.db"; // Default open flag is read-write|create $db = new PDO('sqlite:' . $filename, null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); @@ -18,7 +18,7 @@ var_dump($db->exec('CREATE TABLE test2 (id INT);')); ?> --CLEAN-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . "pdo_sqlite_open_flags.db"; +$filename = __DIR__ . DIRECTORY_SEPARATOR . "pdo_sqlite_open_flags.db"; if (file_exists($filename)) { unlink($filename); } diff --git a/ext/pgsql/tests/05large_object.phpt b/ext/pgsql/tests/05large_object.phpt index a6f30195ae..e091d6072a 100644 --- a/ext/pgsql/tests/05large_object.phpt +++ b/ext/pgsql/tests/05large_object.phpt @@ -55,7 +55,7 @@ pg_lo_unlink($db, (string)$oid) or print("pg_lo_unlink() error 3\n"); pg_exec ($db, "commit"); echo "import/export LO\n"; -$path = dirname(__FILE__) . '/'; +$path = __DIR__ . '/'; pg_query($db, 'begin'); $oid = pg_lo_import($db, $path . 'php.gif'); pg_query($db, 'commit'); diff --git a/ext/pgsql/tests/08escape.phpt b/ext/pgsql/tests/08escape.phpt index 1bea35bf14..9120b455e7 100644 --- a/ext/pgsql/tests/08escape.phpt +++ b/ext/pgsql/tests/08escape.phpt @@ -6,7 +6,7 @@ PostgreSQL escape functions <?php include 'config.inc'; -define('FILE_NAME', dirname(__FILE__) . '/php.gif'); +define('FILE_NAME', __DIR__ . '/php.gif'); // pg_escape_string() test $before = "ABC\\ABC\'"; diff --git a/ext/pgsql/tests/18pg_escape_bytea_before.phpt b/ext/pgsql/tests/18pg_escape_bytea_before.phpt index 492517733f..ca2acd9ce7 100644 --- a/ext/pgsql/tests/18pg_escape_bytea_before.phpt +++ b/ext/pgsql/tests/18pg_escape_bytea_before.phpt @@ -8,7 +8,7 @@ PostgreSQL pg_escape_bytea() functions (before connection) include('config.inc'); -$image = file_get_contents(dirname(__FILE__) . '/php.gif'); +$image = file_get_contents(__DIR__ . '/php.gif'); $esc_image = pg_escape_bytea($image); $db = pg_connect($conn_str); diff --git a/ext/pgsql/tests/18pg_escape_bytea_esc.phpt b/ext/pgsql/tests/18pg_escape_bytea_esc.phpt index 38e5777c3e..263adad40c 100644 --- a/ext/pgsql/tests/18pg_escape_bytea_esc.phpt +++ b/ext/pgsql/tests/18pg_escape_bytea_esc.phpt @@ -11,7 +11,7 @@ include('config.inc'); $db = pg_connect($conn_str); @pg_query($db, "SET bytea_output = 'escape'"); -$image = file_get_contents(dirname(__FILE__) . '/php.gif'); +$image = file_get_contents(__DIR__ . '/php.gif'); $esc_image = pg_escape_bytea($image); pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, \''.$esc_image.'\');'); diff --git a/ext/pgsql/tests/18pg_escape_bytea_hex.phpt b/ext/pgsql/tests/18pg_escape_bytea_hex.phpt index 04630bbbf8..5af7bbebef 100644 --- a/ext/pgsql/tests/18pg_escape_bytea_hex.phpt +++ b/ext/pgsql/tests/18pg_escape_bytea_hex.phpt @@ -14,7 +14,7 @@ include('config.inc'); $db = pg_connect($conn_str); @pg_query($db, "SET bytea_output = 'hex'"); -$image = file_get_contents(dirname(__FILE__) . '/php.gif'); +$image = file_get_contents(__DIR__ . '/php.gif'); $esc_image = pg_escape_bytea($image); pg_query($db, 'INSERT INTO '.$table_name.' (num, bin) VALUES (9876, \''.$esc_image.'\');'); diff --git a/ext/pgsql/tests/80_bug14383.phpt b/ext/pgsql/tests/80_bug14383.phpt index 97fcfe6dcb..1331f146cc 100644 --- a/ext/pgsql/tests/80_bug14383.phpt +++ b/ext/pgsql/tests/80_bug14383.phpt @@ -2,7 +2,7 @@ Bug #14383 (8.0+) (using postgres with DBA causes DBA not to be able to find any keys) --SKIPIF-- <?php -require_once(dirname(__FILE__).'/../../dba/tests/skipif.inc'); +require_once(__DIR__.'/../../dba/tests/skipif.inc'); require_once('skipif.inc'); ?> --FILE-- @@ -15,8 +15,8 @@ if (!$dbh) { } pg_close($dbh); -require_once(dirname(__FILE__).'/../../dba/tests/test.inc'); -require_once(dirname(__FILE__).'/../../dba/tests/dba_handler.inc'); +require_once(__DIR__.'/../../dba/tests/test.inc'); +require_once(__DIR__.'/../../dba/tests/dba_handler.inc'); ?> --EXPECTF-- diff --git a/ext/pgsql/tests/80_bug27597.phpt b/ext/pgsql/tests/80_bug27597.phpt index 36e85044d5..6411d9ba36 100644 --- a/ext/pgsql/tests/80_bug27597.phpt +++ b/ext/pgsql/tests/80_bug27597.phpt @@ -7,7 +7,7 @@ require_once('skipif.inc'); --FILE-- <?php -require_once(dirname(__FILE__) . '/config.inc'); +require_once(__DIR__ . '/config.inc'); $dbh = @pg_connect($conn_str); if (!$dbh) { diff --git a/ext/pgsql/tests/80_bug36625.phpt b/ext/pgsql/tests/80_bug36625.phpt index 86d40ce4dc..b36ff4e890 100644 --- a/ext/pgsql/tests/80_bug36625.phpt +++ b/ext/pgsql/tests/80_bug36625.phpt @@ -14,7 +14,7 @@ if (!$dbh) { die ('Could not connect to the server'); } -$tracefile = dirname(__FILE__) . '/trace.tmp'; +$tracefile = __DIR__ . '/trace.tmp'; @unlink($tracefile); var_dump(file_exists($tracefile)); @@ -44,7 +44,7 @@ var_dump(file_exists($tracefile)); --CLEAN-- <?php -$tracefile = dirname(__FILE__) . '/trace.tmp'; +$tracefile = __DIR__ . '/trace.tmp'; unlink($tracefile); diff --git a/ext/phar/tests/008.phpt b/ext/phar/tests/008.phpt index 664ffea5cb..27d16cfd33 100644 --- a/ext/phar/tests/008.phpt +++ b/ext/phar/tests/008.phpt @@ -8,14 +8,14 @@ $file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; $file .= pack('V', 500) . 'notenough'; -file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); +file_put_contents(__DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { -include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +include __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; } catch (Exception $e) { echo $e->getMessage(); } ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- internal corruption of phar "%s" (truncated manifest header) diff --git a/ext/phar/tests/009.phpt b/ext/phar/tests/009.phpt index d2570fb881..fe20d92dcd 100644 --- a/ext/phar/tests/009.phpt +++ b/ext/phar/tests/009.phpt @@ -10,14 +10,14 @@ $file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; $file .= pack('VVnVVV', 500, 500, 0x1000, 0x00000000, 0, 0) . str_repeat('A', 500); -file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); +file_put_contents(__DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { -include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +include __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; } catch (Exception $e) { echo $e->getMessage(); } ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- internal corruption of phar "%s009.phar.php" (too many manifest entries for size of manifest) diff --git a/ext/phar/tests/010.phpt b/ext/phar/tests/010.phpt index 3dce5f8f4c..f424e17680 100644 --- a/ext/phar/tests/010.phpt +++ b/ext/phar/tests/010.phpt @@ -15,15 +15,15 @@ __HALT_COMPILER(); ?>"; $manifest = pack('V', 1) . 'a' . pack('VVVVVV', 0, time(), 0, crc32(''), 0x00000000, 0); $file .= pack('VVnVV', strlen($manifest), 1, 0x1000, 0x00000000, 3) . 'hio' . pack('V', 0) . $manifest; -file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); +file_put_contents(__DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php', $file); try { -include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +include __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; echo file_get_contents('phar://hio/a'); } catch (Exception $e) { echo $e->getMessage(); } ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- internal corruption of phar "%s" (too many manifest entries for size of manifest) diff --git a/ext/phar/tests/011.phpt b/ext/phar/tests/011.phpt index 83bae148e0..481086474c 100644 --- a/ext/phar/tests/011.phpt +++ b/ext/phar/tests/011.phpt @@ -6,7 +6,7 @@ Phar::mapPhar filesize too small in manifest phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -25,6 +25,6 @@ echo $e->getMessage(); } ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- internal corruption of phar "%s" (compressed and uncompressed size does not match for uncompressed entry) diff --git a/ext/phar/tests/012.phpt b/ext/phar/tests/012.phpt index 3246eff468..9e35bbbeb5 100644 --- a/ext/phar/tests/012.phpt +++ b/ext/phar/tests/012.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -23,6 +23,6 @@ echo file_get_contents('phar://hio/a'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- a diff --git a/ext/phar/tests/013.phpt b/ext/phar/tests/013.phpt index ae3ae72936..7667a98db9 100644 --- a/ext/phar/tests/013.phpt +++ b/ext/phar/tests/013.phpt @@ -6,7 +6,7 @@ Phar::mapPhar filesize mismatch phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; // filesize should be 1, and is 2 @@ -18,6 +18,6 @@ include 'files/phar_test.inc'; echo file_get_contents($pname.'/a'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (%s file "a") in %s on line %d diff --git a/ext/phar/tests/014.phpt b/ext/phar/tests/014.phpt index d08e6550b6..08247d1743 100644 --- a/ext/phar/tests/014.phpt +++ b/ext/phar/tests/014.phpt @@ -6,7 +6,7 @@ Phar::mapPhar filesize mismatch phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; // wrong crc32 @@ -18,6 +18,6 @@ include 'files/phar_test.inc'; echo file_get_contents($pname.'/a'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (crc32 mismatch on file "a") in %s on line %d diff --git a/ext/phar/tests/015.phpt b/ext/phar/tests/015.phpt index b93b77e9fb..0916002704 100644 --- a/ext/phar/tests/015.phpt +++ b/ext/phar/tests/015.phpt @@ -7,7 +7,7 @@ Phar::mapPhar valid file (gzipped) phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -18,6 +18,6 @@ include 'files/phar_test.inc'; echo file_get_contents($pname .'/a'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- a diff --git a/ext/phar/tests/015b.phpt b/ext/phar/tests/015b.phpt index 08ead2d9c0..1534467a19 100644 --- a/ext/phar/tests/015b.phpt +++ b/ext/phar/tests/015b.phpt @@ -7,7 +7,7 @@ Phar::mapPhar valid file (bzip2) phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -18,6 +18,6 @@ include 'files/phar_test.inc'; var_dump(file_get_contents($pname . '/a')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(11) "Hello World" diff --git a/ext/phar/tests/016.phpt b/ext/phar/tests/016.phpt index 302d06d3cb..e94a17f059 100644 --- a/ext/phar/tests/016.phpt +++ b/ext/phar/tests/016.phpt @@ -7,7 +7,7 @@ Phar::mapPhar invalid file (gzipped file length is too short) phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; // file length is too short @@ -26,7 +26,7 @@ var_dump(file_get_contents($pname . '/c')); var_dump(file_get_contents($pname . '/d')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line %d bool(false) diff --git a/ext/phar/tests/016b.phpt b/ext/phar/tests/016b.phpt index 8fe66826d6..fa2727bede 100644 --- a/ext/phar/tests/016b.phpt +++ b/ext/phar/tests/016b.phpt @@ -7,7 +7,7 @@ Phar::mapPhar invalid file (gzipped file length is too short) phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; // file length is too short @@ -19,6 +19,6 @@ include 'files/phar_test.inc'; echo file_get_contents($pname . '/a'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: file_get_contents(phar://%s/a): failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line %d diff --git a/ext/phar/tests/017.phpt b/ext/phar/tests/017.phpt index c04880604d..69169b7a0b 100644 --- a/ext/phar/tests/017.phpt +++ b/ext/phar/tests/017.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -24,7 +24,7 @@ include $pname; $dir = opendir('phar://hio'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- string(%d) "%s017.phar.php" bool(true) diff --git a/ext/phar/tests/018.phpt b/ext/phar/tests/018.phpt index fb7e0fee95..0f97b361d5 100644 --- a/ext/phar/tests/018.phpt +++ b/ext/phar/tests/018.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -27,7 +27,7 @@ while (false !== ($a = readdir($dir))) { } ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" bool(false) diff --git a/ext/phar/tests/019.phpt b/ext/phar/tests/019.phpt index 860edad236..44e2580f18 100644 --- a/ext/phar/tests/019.phpt +++ b/ext/phar/tests/019.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -33,7 +33,7 @@ if ($dir) { ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- %s(1) "a" bool(false) diff --git a/ext/phar/tests/019b.phpt b/ext/phar/tests/019b.phpt index e594e7c791..99415eaa95 100644 --- a/ext/phar/tests/019b.phpt +++ b/ext/phar/tests/019b.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -45,7 +45,7 @@ dump('phar://hio', '/'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(11) "phar://hio/" string(2) "/a" diff --git a/ext/phar/tests/019c.phpt b/ext/phar/tests/019c.phpt index 9f899d7184..5eaac90ac7 100644 --- a/ext/phar/tests/019c.phpt +++ b/ext/phar/tests/019c.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -49,7 +49,7 @@ dump('phar://hio', '/'); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(11) "phar://hio/" string(2) "/a" diff --git a/ext/phar/tests/020.phpt b/ext/phar/tests/020.phpt index 1c2b4b1abe..6d1bac8a54 100644 --- a/ext/phar/tests/020.phpt +++ b/ext/phar/tests/020.phpt @@ -6,13 +6,13 @@ Phar: url stat phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); __HALT_COMPILER(); ?>"; -$pfile = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$pfile = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $files = array(); $files['a'] = 'a'; $files['b/a'] = 'b'; @@ -24,7 +24,7 @@ include $fname; var_dump(stat('phar://hio/a'), stat('phar://hio/b')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- array(26) { [0]=> diff --git a/ext/phar/tests/021.phpt b/ext/phar/tests/021.phpt index 010136f779..9a87f04fe1 100644 --- a/ext/phar/tests/021.phpt +++ b/ext/phar/tests/021.phpt @@ -6,7 +6,7 @@ Phar: stream stat phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -27,7 +27,7 @@ var_dump(fstat($fp)); fclose($fp); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- array(26) { [0]=> diff --git a/ext/phar/tests/022.phpt b/ext/phar/tests/022.phpt index 20c24a0214..4442f65bc0 100644 --- a/ext/phar/tests/022.phpt +++ b/ext/phar/tests/022.phpt @@ -6,7 +6,7 @@ Phar: stream stat phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -66,7 +66,7 @@ fclose($fp); ?> --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); exit(0); ?> --EXPECT-- diff --git a/ext/phar/tests/023.phpt b/ext/phar/tests/023.phpt index 808f91deae..f6920a48e0 100644 --- a/ext/phar/tests/023.phpt +++ b/ext/phar/tests/023.phpt @@ -6,7 +6,7 @@ Phar: phar:// file_get_contents phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -24,7 +24,7 @@ var_dump(file_get_contents($pname . '/b/c.php')); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(28) "<?php echo "This is a\n"; ?>" string(28) "<?php echo "This is b\n"; ?>" diff --git a/ext/phar/tests/024.phpt b/ext/phar/tests/024.phpt index ad30d2644d..8ec0911e74 100644 --- a/ext/phar/tests/024.phpt +++ b/ext/phar/tests/024.phpt @@ -6,7 +6,7 @@ Phar: phar:// include phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -24,7 +24,7 @@ include $pname . '/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- This is a This is b diff --git a/ext/phar/tests/025.phpt b/ext/phar/tests/025.phpt index bbb5bc4e83..76f2b1eb77 100644 --- a/ext/phar/tests/025.phpt +++ b/ext/phar/tests/025.phpt @@ -6,7 +6,7 @@ Phar: phar:// include (repeated names) phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -24,7 +24,7 @@ include $pname . '/b/b'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- This is a This is b diff --git a/ext/phar/tests/026.phpt b/ext/phar/tests/026.phpt index e59a07239b..d58555343f 100644 --- a/ext/phar/tests/026.phpt +++ b/ext/phar/tests/026.phpt @@ -6,7 +6,7 @@ Phar: phar:// require from within phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -24,7 +24,7 @@ require $pname . '/a.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- This is a This is b diff --git a/ext/phar/tests/027.phpt b/ext/phar/tests/027.phpt index 5cf6661200..935f92c2d2 100644 --- a/ext/phar/tests/027.phpt +++ b/ext/phar/tests/027.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -23,7 +23,7 @@ include 'files/phar_test.inc'; function dump($phar, $base) { - var_dump(str_replace(dirname(__FILE__), '*', $phar) . $base); + var_dump(str_replace(__DIR__, '*', $phar) . $base); $dir = opendir($phar . $base); if ($base == '/') { @@ -58,7 +58,7 @@ var_dump(opendir("phar://foo.phar/hi")); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- string(%d) "phar://*/027.phar.php/" string(6) "/a.php" diff --git a/ext/phar/tests/028.phpt b/ext/phar/tests/028.phpt index b60926e634..19f1d988a3 100644 --- a/ext/phar/tests/028.phpt +++ b/ext/phar/tests/028.phpt @@ -6,7 +6,7 @@ Phar::loadPhar phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://hio'; $file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>'; $alias = ''; @@ -31,7 +31,7 @@ include $pname . '/a.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- This is a This is b diff --git a/ext/phar/tests/029.phpt b/ext/phar/tests/029.phpt index 58eddb7273..dc7f3acb63 100644 --- a/ext/phar/tests/029.phpt +++ b/ext/phar/tests/029.phpt @@ -6,8 +6,8 @@ Phar::loadPhar overloading alias names phar.require_hash=0 --FILE-- <?php -$fname1 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname1 = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; $fname = $fname1; $alias = ''; $pname = 'phar://hio'; @@ -40,8 +40,8 @@ catch (Exception $e) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> --EXPECTF-- bool(true) diff --git a/ext/phar/tests/030.phpt b/ext/phar/tests/030.phpt index 343be7f084..7132383d80 100644 --- a/ext/phar/tests/030.phpt +++ b/ext/phar/tests/030.phpt @@ -6,7 +6,7 @@ Phar::loadPhar ignoring alias phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>'; @@ -35,7 +35,7 @@ echo $e->getMessage(),"\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- This is a diff --git a/ext/phar/tests/031.phpt b/ext/phar/tests/031.phpt index ec44624d3f..03ffb90a6a 100644 --- a/ext/phar/tests/031.phpt +++ b/ext/phar/tests/031.phpt @@ -22,7 +22,7 @@ require $pname; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/031.phar.php'); +unlink(__DIR__ . '/files/031.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/032.phpt b/ext/phar/tests/032.phpt index 0878482d0a..481d26055c 100644 --- a/ext/phar/tests/032.phpt +++ b/ext/phar/tests/032.phpt @@ -21,7 +21,7 @@ echo $e->getMessage(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/032.phar.php'); +unlink(__DIR__ . '/files/032.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/033.phpt b/ext/phar/tests/033.phpt index a0b1f659f5..9beb281912 100644 --- a/ext/phar/tests/033.phpt +++ b/ext/phar/tests/033.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php'; $pname = 'phar://hio'; $file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>'; @@ -33,7 +33,7 @@ var_dump($a['dir']->isReadable()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> --EXPECT-- bool(false) diff --git a/ext/phar/tests/033a.phpt b/ext/phar/tests/033a.phpt index 8dcdfc4074..548121f842 100644 --- a/ext/phar/tests/033a.phpt +++ b/ext/phar/tests/033a.phpt @@ -7,7 +7,7 @@ phar.readonly=1 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php'; $pname = 'phar://hio'; $file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>'; @@ -28,7 +28,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> --EXPECTF-- bool(false) diff --git a/ext/phar/tests/addfuncs.phpt b/ext/phar/tests/addfuncs.phpt index ab10736a8a..a099dc4ed9 100644 --- a/ext/phar/tests/addfuncs.phpt +++ b/ext/phar/tests/addfuncs.phpt @@ -6,7 +6,7 @@ Phar: addFile/addFromString phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $phar = new Phar($fname); $phar->addFromString('a', 'hi'); @@ -24,7 +24,7 @@ $phar->addFile($pname . '/a', 'a'); echo $e->getMessage() . "\n"; } try { -$phar->addFile(dirname(__FILE__) . '/does/not/exist'); +$phar->addFile(__DIR__ . '/does/not/exist'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } @@ -41,7 +41,7 @@ echo $e->getMessage() . "\n"; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- hi hi diff --git a/ext/phar/tests/alias_acrobatics.phpt b/ext/phar/tests/alias_acrobatics.phpt index 1bb20a4b3a..56391def63 100644 --- a/ext/phar/tests/alias_acrobatics.phpt +++ b/ext/phar/tests/alias_acrobatics.phpt @@ -7,8 +7,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar'; $p = new Phar($fname); @@ -35,8 +35,8 @@ echo $e->getMessage(),"\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar'); ?> --EXPECTF-- alias "foo" is already used for archive "%salias_acrobatics.phar" cannot be overloaded with "%salias_acrobatics.2.phar" diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index e8ddb1f62a..c5ea1d216f 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -22,19 +22,19 @@ try { print_exception($e); } try { - $a = new Phar(dirname(__FILE__) . '/files/frontcontroller10.phar'); + $a = new Phar(__DIR__ . '/files/frontcontroller10.phar'); } catch (PharException $e) { print_exception($e); } $a->convertToExecutable(array()); $a->convertToData(array()); try { - $b = new PharData(dirname(__FILE__) . '/whatever.tar'); + $b = new PharData(__DIR__ . '/whatever.tar'); } catch (PharException $e) { print_exception($e); } try { - $c = new PharData(dirname(__FILE__) . '/whatever.zip'); + $c = new PharData(__DIR__ . '/whatever.zip'); } catch (PharException $e) { print_exception($e); } diff --git a/ext/phar/tests/bug13727.phpt b/ext/phar/tests/bug13727.phpt index 4996c2eb21..2db6637efc 100644 --- a/ext/phar/tests/bug13727.phpt +++ b/ext/phar/tests/bug13727.phpt @@ -8,8 +8,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$dirName = dirname(__FILE__); +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$dirName = __DIR__; $pname = 'phar://' . $fname; $pArchive="DataArchive.phar"; $p = new Phar($fname, 0, $pArchive); @@ -25,7 +25,7 @@ echo("\n Written Files($i)\n"); ===DONE=== --CLEAN-- <?php -$dirName = dirname(__FILE__); +$dirName = __DIR__; $fileDir="$dirName/test_data"; for ($i = 0; $i < 4*1024; $i++){ unlink("$fileDir/$i"); diff --git a/ext/phar/tests/bug13786.phpt b/ext/phar/tests/bug13786.phpt index 8ed0697bff..1fc1cfd502 100644 --- a/ext/phar/tests/bug13786.phpt +++ b/ext/phar/tests/bug13786.phpt @@ -11,7 +11,7 @@ phar.readonly=0 try { for ($i = 0; $i < 2; $i++) { $fname = "DataArchive.phar"; - $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $fname; + $path = __DIR__ . DIRECTORY_SEPARATOR . $fname; $phar = new Phar($path); $phar->addFromString($i, "file $i in $fname"); var_dump(file_get_contents($phar[$i])); diff --git a/ext/phar/tests/bug45218_SLOWTEST.phpt b/ext/phar/tests/bug45218_SLOWTEST.phpt index 28db3de7b5..c71a2be618 100644 --- a/ext/phar/tests/bug45218_SLOWTEST.phpt +++ b/ext/phar/tests/bug45218_SLOWTEST.phpt @@ -10,8 +10,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.txt'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.txt'; file_put_contents($fname2, 'a'); class myIterator implements Iterator { @@ -39,7 +39,7 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); + chdir(__DIR__); $phar = new Phar($fname); $ret = $phar->buildFromIterator(new myIterator); foreach ($ret as $a => $val) { @@ -54,8 +54,8 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.txt'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.txt'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/bug46032.phpt b/ext/phar/tests/bug46032.phpt index 57f3fc2daf..a20e95d3ed 100644 --- a/ext/phar/tests/bug46032.phpt +++ b/ext/phar/tests/bug46032.phpt @@ -6,7 +6,7 @@ Phar: bug #46032: PharData::__construct wrong memory read --FILE-- <?php -$a = dirname(__FILE__) .'/mytest'; +$a = __DIR__ .'/mytest'; try { new phar($a); diff --git a/ext/phar/tests/bug46060.phpt b/ext/phar/tests/bug46060.phpt index e4ecf9fd6e..02a4a7e867 100644 --- a/ext/phar/tests/bug46060.phpt +++ b/ext/phar/tests/bug46060.phpt @@ -7,8 +7,8 @@ Phar: Bug #46060: addEmptyDir() breaks phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.tar'; $phar = new PharData($fname); $phar->addEmptyDir('blah/'); @@ -22,8 +22,8 @@ var_dump($phar['blah']->isDir(), $phar['test']->isDir()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/bug46178.phpt b/ext/phar/tests/bug46178.phpt index 1496ae1c33..0bb8a2df21 100644 --- a/ext/phar/tests/bug46178.phpt +++ b/ext/phar/tests/bug46178.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $phar = new Phar($fname); $phar['long/path/name.txt'] = 'hi'; @@ -15,6 +15,6 @@ $phar->addEmptyDir('long/path'); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar');?> --EXPECT-- ===DONE=== diff --git a/ext/phar/tests/bug47085.phpt b/ext/phar/tests/bug47085.phpt index 5c2504f675..d1fcf506f6 100644 --- a/ext/phar/tests/bug47085.phpt +++ b/ext/phar/tests/bug47085.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $phar = new Phar($fname, 0, 'a.phar'); $phar['x'] = 'hi'; @@ -17,7 +17,7 @@ var_dump(rename("phar://a.phar/x", "phar://a.phar/y")); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar');?> --EXPECTF-- Warning: rename(): phar error: cannot rename "phar://a.phar/x" to "phar://a.phar/y" from extracted phar archive, source does not exist in %sbug47085.php on line %d bool(false) diff --git a/ext/phar/tests/bug48377.2.phpt b/ext/phar/tests/bug48377.2.phpt index 380f3e381f..130aaa8646 100644 --- a/ext/phar/tests/bug48377.2.phpt +++ b/ext/phar/tests/bug48377.2.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.zip'; $phar = new PharData($fname); $phar['x'] = 'hi'; @@ -19,7 +19,7 @@ try { ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.zip');?> --EXPECTF-- data phar "%sbug48377.2.phar.zip" has invalid extension phar.zip ===DONE=== diff --git a/ext/phar/tests/bug48377.phpt b/ext/phar/tests/bug48377.phpt index f466ea4532..6c16654ef1 100644 --- a/ext/phar/tests/bug48377.phpt +++ b/ext/phar/tests/bug48377.phpt @@ -7,8 +7,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.zip'; touch($fname2); @@ -22,8 +22,8 @@ try { ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar');?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip');?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar');?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.zip');?> --EXPECTF-- phar "%sbug48377.zip" exists and must be unlinked prior to conversion ===DONE=== diff --git a/ext/phar/tests/bug52013.phpt b/ext/phar/tests/bug52013.phpt index 5ee37e7d4e..12f1ae2500 100644 --- a/ext/phar/tests/bug52013.phpt +++ b/ext/phar/tests/bug52013.phpt @@ -16,11 +16,11 @@ phar.readonly=0 open_basedir= --FILE-- <?php -mkdir(dirname(__FILE__) . '/testdir'); -file_put_contents(dirname(__FILE__) . '/testdir/1.php', str_repeat(' ', 1455)); +mkdir(__DIR__ . '/testdir'); +file_put_contents(__DIR__ . '/testdir/1.php', str_repeat(' ', 1455)); -$phar = new Phar(dirname(__FILE__) . '/compressed.phar'); -$phar->buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.php$/'); +$phar = new Phar(__DIR__ . '/compressed.phar'); +$phar->buildFromDirectory(__DIR__ . '/testdir', '/\.php$/'); $phar->setSignatureAlgorithm(Phar::SHA1); $phar->compressFiles(Phar::GZ); $phar->decompressFiles(); @@ -29,12 +29,12 @@ echo 'ok'; ?> --CLEAN-- <?php -if (is_file(dirname(__FILE__) . '/testdir/1.php')) - unlink(dirname(__FILE__) . '/testdir/1.php'); -if (is_dir(dirname(__FILE__) . '/testdir')) - rmdir(dirname(__FILE__) . '/testdir'); -if (is_file(dirname(__FILE__) . '/compressed.phar')) - unlink(dirname(__FILE__) . '/compressed.phar'); +if (is_file(__DIR__ . '/testdir/1.php')) + unlink(__DIR__ . '/testdir/1.php'); +if (is_dir(__DIR__ . '/testdir')) + rmdir(__DIR__ . '/testdir'); +if (is_file(__DIR__ . '/compressed.phar')) + unlink(__DIR__ . '/compressed.phar'); ?> --EXPECT-- ok diff --git a/ext/phar/tests/bug69324.phpt b/ext/phar/tests/bug69324.phpt index 7768ffbd66..b3311c8651 100644 --- a/ext/phar/tests/bug69324.phpt +++ b/ext/phar/tests/bug69324.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("phar")) die("skip"); --FILE-- <?php try { -$p = new Phar(dirname(__FILE__).'/bug69324.phar', 0); +$p = new Phar(__DIR__.'/bug69324.phar', 0); $meta=$p->getMetadata(); var_dump($meta); } catch(Exception $e) { diff --git a/ext/phar/tests/bug69441.phpt b/ext/phar/tests/bug69441.phpt index 3536c3a835..91e2dcf146 100644 --- a/ext/phar/tests/bug69441.phpt +++ b/ext/phar/tests/bug69441.phpt @@ -4,7 +4,7 @@ Phar: bug #69441: Buffer Overflow when parsing tar/zip/phar in phar_set_inode <?php if (!extension_loaded("phar")) die("skip"); ?> --FILE-- <?php -$fname = dirname(__FILE__) . '/bug69441.phar'; +$fname = __DIR__ . '/bug69441.phar'; try { $r = new Phar($fname, 0); } catch(UnexpectedValueException $e) { diff --git a/ext/phar/tests/bug69453.phpt b/ext/phar/tests/bug69453.phpt index 6f280a5351..3309d367c6 100644 --- a/ext/phar/tests/bug69453.phpt +++ b/ext/phar/tests/bug69453.phpt @@ -4,7 +4,7 @@ Phar: bug #69453: Memory Corruption in phar_parse_tarfile when entry filename st <?php if (!extension_loaded("phar")) die("skip"); ?> --FILE-- <?php -$fname = dirname(__FILE__) . '/bug69453.tar.phar'; +$fname = __DIR__ . '/bug69453.tar.phar'; try { $r = new Phar($fname, 0); } catch(UnexpectedValueException $e) { diff --git a/ext/phar/tests/bug74196.phpt b/ext/phar/tests/bug74196.phpt index 4cd238d654..54b9eeb557 100644 --- a/ext/phar/tests/bug74196.phpt +++ b/ext/phar/tests/bug74196.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.2.3.phar.tar.gz'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.2.3.phar.tar.gz'; $decompressed_name = str_replace( ".gz", "", $fname); var_dump(file_exists($fname)); diff --git a/ext/phar/tests/cache_list/copyonwrite4a.phpt b/ext/phar/tests/cache_list/copyonwrite4a.phpt index 039113288b..948edced47 100644 --- a/ext/phar/tests/cache_list/copyonwrite4a.phpt +++ b/ext/phar/tests/cache_list/copyonwrite4a.phpt @@ -8,9 +8,9 @@ phar.readonly=0 <?php if (!extension_loaded("phar")) die("skip"); ?> --FILE-- <?php -var_dump(file_exists('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt')); -Phar::mount('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt', 'phar://' . dirname(__FILE__) . '/files/write4.phar/tobemounted'); -var_dump(file_exists('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt'), file_get_contents('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt')); +var_dump(file_exists('phar://' . __DIR__ . '/files/write4.phar/testit.txt')); +Phar::mount('phar://' . __DIR__ . '/files/write4.phar/testit.txt', 'phar://' . __DIR__ . '/files/write4.phar/tobemounted'); +var_dump(file_exists('phar://' . __DIR__ . '/files/write4.phar/testit.txt'), file_get_contents('phar://' . __DIR__ . '/files/write4.phar/testit.txt')); ?> ===DONE=== --EXPECT-- diff --git a/ext/phar/tests/cache_list/copyonwrite5.phar.phpt b/ext/phar/tests/cache_list/copyonwrite5.phar.phpt index 3ca835ae5f..60d42f965c 100644 --- a/ext/phar/tests/cache_list/copyonwrite5.phar.phpt +++ b/ext/phar/tests/cache_list/copyonwrite5.phar.phpt @@ -10,9 +10,9 @@ phar.readonly=0 files/write5.phar --CLEAN-- <?php -unlink(dirname(__FILE__) . '/copyonwrite5/file1'); -unlink(dirname(__FILE__) . '/copyonwrite5/file2'); -rmdir(dirname(__FILE__) . '/copyonwrite5'); +unlink(__DIR__ . '/copyonwrite5/file1'); +unlink(__DIR__ . '/copyonwrite5/file2'); +rmdir(__DIR__ . '/copyonwrite5'); ?> --EXPECTF-- array(2) { diff --git a/ext/phar/tests/cache_list/copyonwrite6.phar.phpt b/ext/phar/tests/cache_list/copyonwrite6.phar.phpt index 6d6d56187e..3b9708341f 100644 --- a/ext/phar/tests/cache_list/copyonwrite6.phar.phpt +++ b/ext/phar/tests/cache_list/copyonwrite6.phar.phpt @@ -11,9 +11,9 @@ open_basedir= files/write6.phar --CLEAN-- <?php -unlink(dirname(__FILE__) . '/copyonwrite6/file1'); -unlink(dirname(__FILE__) . '/copyonwrite6/file2'); -rmdir(dirname(__FILE__) . '/copyonwrite6'); +unlink(__DIR__ . '/copyonwrite6/file1'); +unlink(__DIR__ . '/copyonwrite6/file2'); +rmdir(__DIR__ . '/copyonwrite6'); ?> --EXPECTF-- array(2) { diff --git a/ext/phar/tests/create_new_and_modify.phpt b/ext/phar/tests/create_new_and_modify.phpt index 029ea7a53f..f363eb8ba3 100644 --- a/ext/phar/tests/create_new_and_modify.phpt +++ b/ext/phar/tests/create_new_and_modify.phpt @@ -8,7 +8,7 @@ phar.require_hash=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; @unlink($fname); @@ -44,7 +44,7 @@ include $pname . '/b.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- brand new! string(40) "%s" diff --git a/ext/phar/tests/create_new_phar.phpt b/ext/phar/tests/create_new_phar.phpt index 26794095e1..79724b9b74 100644 --- a/ext/phar/tests/create_new_phar.phpt +++ b/ext/phar/tests/create_new_phar.phpt @@ -8,19 +8,19 @@ phar.require_hash=1 --FILE-- <?php -file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php', +file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php', "brand new!\n"); -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php'; $fileName = "ChineseFile\xE5\x84\xB7\xE9\xBB\x91.php"; -file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php', +file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php', 'Text in utf8 file.'); -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- brand new! Text in utf8 file. diff --git a/ext/phar/tests/create_new_phar_b.phpt b/ext/phar/tests/create_new_phar_b.phpt index 91e22270c6..8b0d6e26dc 100644 --- a/ext/phar/tests/create_new_phar_b.phpt +++ b/ext/phar/tests/create_new_phar_b.phpt @@ -8,14 +8,14 @@ phar.require_hash=1 --FILE-- <?php -file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php', +file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php', 'brand new!'); -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: file_put_contents(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d diff --git a/ext/phar/tests/create_new_phar_c.phpt b/ext/phar/tests/create_new_phar_c.phpt index d32f758f93..19a4c81751 100644 --- a/ext/phar/tests/create_new_phar_c.phpt +++ b/ext/phar/tests/create_new_phar_c.phpt @@ -8,16 +8,16 @@ phar.require_hash=1 --FILE-- <?php -file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php', +file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php', 'brand new!'); -$phar = new Phar(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'); +$phar = new Phar(__DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'); var_dump($phar->getSignature()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- array(2) { ["hash"]=> diff --git a/ext/phar/tests/create_path_error.phpt b/ext/phar/tests/create_path_error.phpt index fd200d8613..047e7e3806 100644 --- a/ext/phar/tests/create_path_error.phpt +++ b/ext/phar/tests/create_path_error.phpt @@ -8,7 +8,7 @@ phar.require_hash=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; @unlink($fname); @@ -62,7 +62,7 @@ foreach($checks as $check) ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- string(5) "query" string(5) "query" diff --git a/ext/phar/tests/delete.phpt b/ext/phar/tests/delete.phpt index 46a4e23817..56559777d7 100644 --- a/ext/phar/tests/delete.phpt +++ b/ext/phar/tests/delete.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -24,7 +24,7 @@ $phar->delete('a'); echo file_get_contents($pname . '/a') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- a diff --git a/ext/phar/tests/delete_in_phar.phpt b/ext/phar/tests/delete_in_phar.phpt index c7f8e82403..6644030936 100644 --- a/ext/phar/tests/delete_in_phar.phpt +++ b/ext/phar/tests/delete_in_phar.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -40,7 +40,7 @@ include $pname . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/delete_in_phar_b.phpt b/ext/phar/tests/delete_in_phar_b.phpt index a6d5b3a35e..8d5d78debc 100644 --- a/ext/phar/tests/delete_in_phar_b.phpt +++ b/ext/phar/tests/delete_in_phar_b.phpt @@ -7,7 +7,7 @@ phar.readonly=1 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -31,7 +31,7 @@ include $pname . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/delete_in_phar_confirm.phpt b/ext/phar/tests/delete_in_phar_confirm.phpt index 0d4eb1e2aa..2596e06462 100644 --- a/ext/phar/tests/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/delete_in_phar_confirm.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -37,14 +37,14 @@ if ($md5 == $md52) echo 'file was not modified'; ?> ===AFTER=== <?php -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/a.php'; -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/b.php'; -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php/b/c.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/b.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/dir.phpt b/ext/phar/tests/dir.phpt index 5740d60f87..c34f01a7f1 100644 --- a/ext/phar/tests/dir.phpt +++ b/ext/phar/tests/dir.phpt @@ -7,11 +7,11 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php'; $pname2 = 'phar://' . $fname2; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; $pname3 = 'phar://' . $fname3; $phar = new Phar($fname); var_dump($phar->isFileFormat(Phar::PHAR)); @@ -32,17 +32,17 @@ ini_set('phar.readonly', 1); mkdir($pname . '/fails'); ini_set('phar.readonly', 0); // create new phar by mkdir -mkdir('phar://' . dirname(__FILE__) . '/ok.phar/fails'); -mkdir('phar://' . dirname(__FILE__) . '/ok.phar/fails'); -file_put_contents('phar://' . dirname(__FILE__) . '/ok.phar/sub/directory.txt', 'hi'); -mkdir('phar://' . dirname(__FILE__) . '/ok.phar/sub'); -mkdir('phar://' . dirname(__FILE__) . '/ok.phar/sub/directory.txt'); -file_put_contents(dirname(__FILE__) . '/oops.phar', '<?php this should screw em up __HALT_COMPILER();'); -mkdir('phar://' . dirname(__FILE__) . '/oops.phar/fails'); +mkdir('phar://' . __DIR__ . '/ok.phar/fails'); +mkdir('phar://' . __DIR__ . '/ok.phar/fails'); +file_put_contents('phar://' . __DIR__ . '/ok.phar/sub/directory.txt', 'hi'); +mkdir('phar://' . __DIR__ . '/ok.phar/sub'); +mkdir('phar://' . __DIR__ . '/ok.phar/sub/directory.txt'); +file_put_contents(__DIR__ . '/oops.phar', '<?php this should screw em up __HALT_COMPILER();'); +mkdir('phar://' . __DIR__ . '/oops.phar/fails'); mkdir('phar://'); rmdir('phar://'); -rmdir('phar://' . dirname(__FILE__) . '/unknown.phar/hi'); +rmdir('phar://' . __DIR__ . '/unknown.phar/hi'); ini_set('phar.readonly', 1); rmdir($pname . '/another/dir'); ini_set('phar.readonly', 0); @@ -52,11 +52,11 @@ mkdir($pname . '/'); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/ok.phar'); ?> -<?php unlink(dirname(__FILE__) . '/oops.phar'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/ok.phar'); ?> +<?php unlink(__DIR__ . '/oops.phar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> --EXPECTF-- bool(true) bool(true) diff --git a/ext/phar/tests/fgc_edgecases.phpt b/ext/phar/tests/fgc_edgecases.phpt index b75601a07b..457093cc2a 100644 --- a/ext/phar/tests/fgc_edgecases.phpt +++ b/ext/phar/tests/fgc_edgecases.phpt @@ -11,11 +11,11 @@ phar.readonly=0 Phar::interceptFileFuncs(); -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; file_get_contents(array()); -chdir(dirname(__FILE__)); +chdir(__DIR__); file_put_contents($fname, "blah\n"); file_put_contents("foob", "test\n"); echo file_get_contents($fname); @@ -27,7 +27,7 @@ echo file_get_contents("foo/" . basename(__FILE__)); $context = stream_context_create(); file_get_contents("./hi", 0, $context, 0, -1); echo file_get_contents("foob"); -set_include_path("' . addslashes(dirname(__FILE__)) . '"); +set_include_path("' . addslashes(__DIR__) . '"); echo file_get_contents("foob", true); echo file_get_contents("./hi", 0, $context); echo file_get_contents("../oops"); @@ -42,9 +42,9 @@ include $pname . '/foo/hi'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php rmdir(dirname(__FILE__) . '/poo'); ?> -<?php unlink(dirname(__FILE__) . '/foob'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php rmdir(__DIR__ . '/poo'); ?> +<?php unlink(__DIR__ . '/foob'); ?> --EXPECTF-- Warning: file_get_contents() expects parameter 1 to be a valid path, array given in %sfgc_edgecases.php on line %d blah diff --git a/ext/phar/tests/file_get_contents.phpt b/ext/phar/tests/file_get_contents.phpt index 24d6e48723..2ac211abc3 100644 --- a/ext/phar/tests/file_get_contents.phpt +++ b/ext/phar/tests/file_get_contents.phpt @@ -7,7 +7,7 @@ phar.require_hash=1 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $a = new Phar($fname); $a['index.php'] = '<?php echo file_get_contents("dir/file1.txt"); @@ -25,6 +25,6 @@ include $fname; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- hihi===DONE=== diff --git a/ext/phar/tests/fopen.phpt b/ext/phar/tests/fopen.phpt index b55bc59c84..528f5c46df 100644 --- a/ext/phar/tests/fopen.phpt +++ b/ext/phar/tests/fopen.phpt @@ -12,7 +12,7 @@ $a = fopen(__FILE__, 'rb'); // this satisfies 1 line of code coverage fclose($a); $a = fopen(); // this satisfies another line of code coverage -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $a = new Phar($fname); $a['index.php'] = '<?php $a = fopen("dir/file1.txt", "r"); @@ -34,7 +34,7 @@ include $fname; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: fopen() expects at least 2 parameters, 0 given in %sfopen.php on line %d hihi diff --git a/ext/phar/tests/fopen_edgecases.phpt b/ext/phar/tests/fopen_edgecases.phpt index 7af8451f8f..5dce0384ff 100644 --- a/ext/phar/tests/fopen_edgecases.phpt +++ b/ext/phar/tests/fopen_edgecases.phpt @@ -7,15 +7,15 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.3.phar.php'; $pname = 'phar://' . $fname; $pname2 = 'phar://' . $fname2; $pname3 = 'phar://' . $fname3; // create in cwd -chdir(dirname(__FILE__)); +chdir(__DIR__); file_put_contents('phar://fopen_edgetest.phar/hi', 'hi'); // append $a = fopen($pname . '/b/c.php', 'a'); @@ -68,9 +68,9 @@ include $pname . '/test.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/fopen_edgetest.phar'); +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> +<?php unlink(__DIR__ . '/fopen_edgetest.phar'); --EXPECTF-- Warning: fopen(phar://%sfopen_edgecases.phar.php/b/c.php): failed to open stream: phar error: open mode append not supported in %sfopen_edgecases.php on line %d diff --git a/ext/phar/tests/fopen_edgecases2.phpt b/ext/phar/tests/fopen_edgecases2.phpt index 4ac529a4e0..c37cb9c6ed 100644 --- a/ext/phar/tests/fopen_edgecases2.phpt +++ b/ext/phar/tests/fopen_edgecases2.phpt @@ -7,11 +7,11 @@ phar.readonly=0 --FILE-- <?php Phar::interceptFileFuncs(); -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; fopen(array(), 'r'); -chdir(dirname(__FILE__)); +chdir(__DIR__); file_put_contents($fname, "blah\n"); file_put_contents("foob", "test\n"); $a = fopen($fname, 'rb'); @@ -31,9 +31,9 @@ include $pname . '/foo/hi'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php rmdir(dirname(__FILE__) . '/poo'); ?> -<?php unlink(dirname(__FILE__) . '/foob'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php rmdir(__DIR__ . '/poo'); ?> +<?php unlink(__DIR__ . '/foob'); ?> --EXPECTF-- Warning: fopen() expects parameter 1 to be a valid path, array given in %sfopen_edgecases2.php on line %d blah diff --git a/ext/phar/tests/include_path.phpt b/ext/phar/tests/include_path.phpt index 4041ae2c20..1ee1ec77d5 100644 --- a/ext/phar/tests/include_path.phpt +++ b/ext/phar/tests/include_path.phpt @@ -6,7 +6,7 @@ Phar: include_path with phar:// wrapper phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/tempmanifest1.phar.php'; +$fname = __DIR__ . '/tempmanifest1.phar.php'; $a = new Phar($fname); $a['file1.php'] = 'file1.php '; @@ -22,7 +22,7 @@ include 'file2.php'; ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php'); +@unlink(__DIR__ . '/tempmanifest1.phar.php'); ?> --EXPECTF-- file1.php diff --git a/ext/phar/tests/invalid_alias.phpt b/ext/phar/tests/invalid_alias.phpt index 97ebe0fe1a..7a3cb31575 100644 --- a/ext/phar/tests/invalid_alias.phpt +++ b/ext/phar/tests/invalid_alias.phpt @@ -6,7 +6,7 @@ Phar: set alias with invalid alias containing / \ : or ; phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $p = new Phar($fname); try { @@ -35,7 +35,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- Invalid alias "hi/" specified for phar "%sinvalid_alias.phar" diff --git a/ext/phar/tests/invalid_setstubalias.phpt b/ext/phar/tests/invalid_setstubalias.phpt index 86fa6e7f78..6234df1bff 100644 --- a/ext/phar/tests/invalid_setstubalias.phpt +++ b/ext/phar/tests/invalid_setstubalias.phpt @@ -6,8 +6,8 @@ Phar: invalid set alias or stub via array access phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $p = new Phar($fname); try { @@ -36,8 +36,8 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- Cannot set stub ".phar/stub.php" directly in phar "%sinvalid_setstubalias.phar.tar", use setStub diff --git a/ext/phar/tests/metadata_read.phpt b/ext/phar/tests/metadata_read.phpt index 638653ecca..2e23af2a4a 100644 --- a/ext/phar/tests/metadata_read.phpt +++ b/ext/phar/tests/metadata_read.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -36,7 +36,7 @@ foreach($files as $name => $cont) { ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" string(1) "b" diff --git a/ext/phar/tests/metadata_write.phpt b/ext/phar/tests/metadata_write.phpt index 23986fbd36..1dea6dfac2 100644 --- a/ext/phar/tests/metadata_write.phpt +++ b/ext/phar/tests/metadata_write.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -42,7 +42,7 @@ foreach($files as $name => $cont) { ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" string(1) "b" diff --git a/ext/phar/tests/metadata_write_commit.phpt b/ext/phar/tests/metadata_write_commit.phpt index 35e1bd72dd..def84b06f9 100644 --- a/ext/phar/tests/metadata_write_commit.phpt +++ b/ext/phar/tests/metadata_write_commit.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -50,7 +50,7 @@ foreach($files as $name => $cont) { ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" string(1) "b" diff --git a/ext/phar/tests/mkdir.phpt b/ext/phar/tests/mkdir.phpt index ca8de30860..32081b145d 100644 --- a/ext/phar/tests/mkdir.phpt +++ b/ext/phar/tests/mkdir.phpt @@ -6,7 +6,7 @@ phar: mkdir/rmdir edge cases phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; Phar::interceptFileFuncs(); mkdir('phar://'); @@ -28,7 +28,7 @@ echo $e->getMessage(),"\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/mounteddir.phpt b/ext/phar/tests/mounteddir.phpt index 3620f1ee66..80c8f7d0ee 100644 --- a/ext/phar/tests/mounteddir.phpt +++ b/ext/phar/tests/mounteddir.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/tempmanifest1.phar.php'; +$fname = __DIR__ . '/tempmanifest1.phar.php'; $pname = 'phar://' . $fname; $a = new Phar($fname); @@ -31,15 +31,15 @@ set_include_path("phar://" . __FILE__); include "index.php"; __HALT_COMPILER();'); unset($a); -mkdir(dirname(__FILE__) . '/testit'); -mkdir(dirname(__FILE__) . '/testit/directory'); -file_put_contents(dirname(__FILE__) . '/testit/extfile.php', '<?php +mkdir(__DIR__ . '/testit'); +mkdir(__DIR__ . '/testit/directory'); +file_put_contents(__DIR__ . '/testit/extfile.php', '<?php var_dump(__FILE__); ?>'); -file_put_contents(dirname(__FILE__) . '/testit/extfile2.php', '<?php +file_put_contents(__DIR__ . '/testit/extfile2.php', '<?php var_dump(__FILE__); ?>'); -include dirname(__FILE__) . '/testit/extfile.php'; +include __DIR__ . '/testit/extfile.php'; include $fname; $a = opendir($pname . '/testit'); @@ -65,17 +65,17 @@ Phar::mount($pname . '/testit', 'another\\..\\mistake'); echo $e->getMessage(), "\n"; } try { -Phar::mount($pname . '/notfound', dirname(__FILE__) . '/this/does/not/exist'); +Phar::mount($pname . '/notfound', __DIR__ . '/this/does/not/exist'); } catch (Exception $e) { echo $e->getMessage(), "\n"; } try { -Phar::mount($pname . '/testit', dirname(__FILE__)); +Phar::mount($pname . '/testit', __DIR__); } catch (Exception $e) { echo $e->getMessage(), "\n"; } try { -Phar::mount($pname . '/testit/extfile.php', dirname(__FILE__)); +Phar::mount($pname . '/testit/extfile.php', __DIR__); } catch (Exception $e) { echo $e->getMessage(), "\n"; } @@ -83,11 +83,11 @@ echo $e->getMessage(), "\n"; ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php'); -@unlink(dirname(__FILE__) . '/testit/extfile.php'); -@unlink(dirname(__FILE__) . '/testit/extfile2.php'); -@rmdir(dirname(__FILE__) . '/testit/directory'); -@rmdir(dirname(__FILE__) . '/testit'); +@unlink(__DIR__ . '/tempmanifest1.phar.php'); +@unlink(__DIR__ . '/testit/extfile.php'); +@unlink(__DIR__ . '/testit/extfile2.php'); +@rmdir(__DIR__ . '/testit/directory'); +@rmdir(__DIR__ . '/testit'); ?> --EXPECTF-- diff --git a/ext/phar/tests/nophar.phpt b/ext/phar/tests/nophar.phpt index 0534c17cd9..e9cff950f4 100644 --- a/ext/phar/tests/nophar.phpt +++ b/ext/phar/tests/nophar.phpt @@ -4,7 +4,7 @@ Phar: phar run without ext/phar with default stub <?php if (extension_loaded("phar")) die("skip Phar extension must be disabled for this test"); ?> --FILE-- <?php -include dirname(__FILE__) . '/files/nophar.phar'; +include __DIR__ . '/files/nophar.phar'; ?> ===DONE=== --EXPECT-- diff --git a/ext/phar/tests/open_for_write_existing.phpt b/ext/phar/tests/open_for_write_existing.phpt index e9e2c05b9e..e1648568e0 100644 --- a/ext/phar/tests/open_for_write_existing.phpt +++ b/ext/phar/tests/open_for_write_existing.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -25,7 +25,7 @@ include $pname . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- extra ===DONE=== diff --git a/ext/phar/tests/open_for_write_existing_b.phpt b/ext/phar/tests/open_for_write_existing_b.phpt index ce59d9824f..d7ed20fd06 100644 --- a/ext/phar/tests/open_for_write_existing_b.phpt +++ b/ext/phar/tests/open_for_write_existing_b.phpt @@ -9,7 +9,7 @@ phar.readonly=1 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -26,7 +26,7 @@ include $pname . '/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_existing_b.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d diff --git a/ext/phar/tests/open_for_write_existing_c.phpt b/ext/phar/tests/open_for_write_existing_c.phpt index eb0c27bf64..2809d46c81 100644 --- a/ext/phar/tests/open_for_write_existing_c.phpt +++ b/ext/phar/tests/open_for_write_existing_c.phpt @@ -9,7 +9,7 @@ phar.readonly=1 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -26,7 +26,7 @@ include $pname . '/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_existing_c.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d diff --git a/ext/phar/tests/open_for_write_newfile.phpt b/ext/phar/tests/open_for_write_newfile.phpt index 13114072da..bd54a13397 100644 --- a/ext/phar/tests/open_for_write_newfile.phpt +++ b/ext/phar/tests/open_for_write_newfile.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -26,7 +26,7 @@ include $pname . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- This is b/c extra diff --git a/ext/phar/tests/open_for_write_newfile_b.phpt b/ext/phar/tests/open_for_write_newfile_b.phpt index 53b31e03d5..7822492498 100644 --- a/ext/phar/tests/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/open_for_write_newfile_b.phpt @@ -9,7 +9,7 @@ phar.readonly=1 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -28,7 +28,7 @@ include $pname . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d diff --git a/ext/phar/tests/open_for_write_newfile_c.phpt b/ext/phar/tests/open_for_write_newfile_c.phpt index 8275c02baa..aa288d1110 100644 --- a/ext/phar/tests/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/open_for_write_newfile_c.phpt @@ -9,7 +9,7 @@ phar.readonly=1 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -28,7 +28,7 @@ include $pname . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d diff --git a/ext/phar/tests/opendir.phpt b/ext/phar/tests/opendir.phpt index 0bde7dbff7..2f5f6635d7 100644 --- a/ext/phar/tests/opendir.phpt +++ b/ext/phar/tests/opendir.phpt @@ -7,7 +7,7 @@ phar.require_hash=1 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $a = new Phar($fname); $a['index.php'] = '<?php $a = opendir("dir"); @@ -32,7 +32,7 @@ opendir('phar://hi.phar'); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- file1.txtfile2.txtfile3.txt diff --git a/ext/phar/tests/opendir_edgecases.phpt b/ext/phar/tests/opendir_edgecases.phpt index be899df81b..c3303705cb 100644 --- a/ext/phar/tests/opendir_edgecases.phpt +++ b/ext/phar/tests/opendir_edgecases.phpt @@ -9,13 +9,13 @@ phar.readonly=0 Phar::interceptFileFuncs(); -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; opendir(array()); -mkdir(dirname(__FILE__) . '/poo'); -chdir(dirname(__FILE__)); +mkdir(__DIR__ . '/poo'); +chdir(__DIR__); $a = opendir('poo'); @@ -49,8 +49,8 @@ include $pname . '/foo'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php rmdir(dirname(__FILE__) . '/poo'); +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php rmdir(__DIR__ . '/poo'); --EXPECTF-- Warning: opendir() expects parameter 1 to be a valid path, array given in %sopendir_edgecases.php on line %d . diff --git a/ext/phar/tests/phar_begin_setstub_commit.phpt b/ext/phar/tests/phar_begin_setstub_commit.phpt index ed257f2c52..fffef0bdbf 100644 --- a/ext/phar/tests/phar_begin_setstub_commit.phpt +++ b/ext/phar/tests/phar_begin_setstub_commit.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$p = new Phar(dirname(__FILE__) . '/phar_begin_setstub_commit.phar', 0, 'phar_begin_setstub_commit.phar'); +$p = new Phar(__DIR__ . '/phar_begin_setstub_commit.phar', 0, 'phar_begin_setstub_commit.phar'); //var_dump($p->getStub()); var_dump($p->isBuffering()); $p->startBuffering(); @@ -32,7 +32,7 @@ var_dump($p->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_begin_setstub_commit.phar'); +unlink(__DIR__ . '/phar_begin_setstub_commit.phar'); ?> --EXPECTF-- bool(false) diff --git a/ext/phar/tests/phar_buildfromdirectory1.phpt b/ext/phar/tests/phar_buildfromdirectory1.phpt index 93fdf2922d..b7f7338e23 100644 --- a/ext/phar/tests/phar_buildfromdirectory1.phpt +++ b/ext/phar/tests/phar_buildfromdirectory1.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$phar = new Phar(dirname(__FILE__) . '/buildfromdirectory1.phar'); +$phar = new Phar(__DIR__ . '/buildfromdirectory1.phar'); try { ini_set('phar.readonly', 1); $phar->buildFromDirectory(1); @@ -19,7 +19,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromdirectory1.phar'); +unlink(__DIR__ . '/buildfromdirectory1.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromdirectory2-win.phpt b/ext/phar/tests/phar_buildfromdirectory2-win.phpt index b49b78d7c8..49361bceb0 100644 --- a/ext/phar/tests/phar_buildfromdirectory2-win.phpt +++ b/ext/phar/tests/phar_buildfromdirectory2-win.phpt @@ -11,7 +11,7 @@ phar.readonly=0 --FILE-- <?php try { - $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory2.phar'); + $phar = new Phar(__DIR__ . '/buildfromdirectory2.phar'); $phar->buildFromDirectory(1); } catch (Exception $e) { var_dump(get_class($e)); @@ -21,7 +21,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromdirectory2.phar'); +unlink(__DIR__ . '/buildfromdirectory2.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromdirectory2.phpt b/ext/phar/tests/phar_buildfromdirectory2.phpt index c98e8c2ffe..0105d1967c 100644 --- a/ext/phar/tests/phar_buildfromdirectory2.phpt +++ b/ext/phar/tests/phar_buildfromdirectory2.phpt @@ -11,7 +11,7 @@ phar.readonly=0 --FILE-- <?php try { - $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory2.phar'); + $phar = new Phar(__DIR__ . '/buildfromdirectory2.phar'); $phar->buildFromDirectory(1); } catch (Exception $e) { var_dump(get_class($e)); @@ -21,7 +21,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromdirectory2.phar'); +unlink(__DIR__ . '/buildfromdirectory2.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromdirectory4.phpt b/ext/phar/tests/phar_buildfromdirectory4.phpt index 16072ef8f7..610e67719a 100644 --- a/ext/phar/tests/phar_buildfromdirectory4.phpt +++ b/ext/phar/tests/phar_buildfromdirectory4.phpt @@ -9,14 +9,14 @@ open_basedir= --FILE-- <?php -mkdir(dirname(__FILE__).'/testdir4'); +mkdir(__DIR__.'/testdir4'); foreach(range(1, 4) as $i) { - file_put_contents(dirname(__FILE__)."/testdir4/file$i.txt", "some content for file $i"); + file_put_contents(__DIR__."/testdir4/file$i.txt", "some content for file $i"); } try { - $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory4.phar'); - $a = $phar->buildFromDirectory(dirname(__FILE__) . '/testdir4'); + $phar = new Phar(__DIR__ . '/buildfromdirectory4.phar'); + $a = $phar->buildFromDirectory(__DIR__ . '/testdir4'); asort($a); var_dump($a); } catch (Exception $e) { @@ -24,17 +24,17 @@ try { echo $e->getMessage() . "\n"; } -var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory4.phar')); +var_dump(file_exists(__DIR__ . '/buildfromdirectory4.phar')); ?> ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromdirectory4.phar'); +unlink(__DIR__ . '/buildfromdirectory4.phar'); foreach(range(1, 4) as $i) { - unlink(dirname(__FILE__) . "/testdir4/file$i.txt"); + unlink(__DIR__ . "/testdir4/file$i.txt"); } -rmdir(dirname(__FILE__) . '/testdir4'); +rmdir(__DIR__ . '/testdir4'); ?> --EXPECTF-- array(4) { diff --git a/ext/phar/tests/phar_buildfromdirectory5.phpt b/ext/phar/tests/phar_buildfromdirectory5.phpt index 6056750669..b7434968a4 100644 --- a/ext/phar/tests/phar_buildfromdirectory5.phpt +++ b/ext/phar/tests/phar_buildfromdirectory5.phpt @@ -8,14 +8,14 @@ phar.readonly=0 --FILE-- <?php -mkdir(dirname(__FILE__).'/testdir5'); +mkdir(__DIR__.'/testdir5'); foreach(range(1, 4) as $i) { - file_put_contents(dirname(__FILE__)."/testdir5/file$i.txt", "some content for file $i"); + file_put_contents(__DIR__."/testdir5/file$i.txt", "some content for file $i"); } try { - $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory5.phar'); - $a = $phar->buildFromDirectory(dirname(__FILE__) . '/testdir5', '/\.txt/'); + $phar = new Phar(__DIR__ . '/buildfromdirectory5.phar'); + $a = $phar->buildFromDirectory(__DIR__ . '/testdir5', '/\.txt/'); asort($a); var_dump($a); } catch (Exception $e) { @@ -23,17 +23,17 @@ try { echo $e->getMessage() . "\n"; } -var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory5.phar')); +var_dump(file_exists(__DIR__ . '/buildfromdirectory5.phar')); ?> ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromdirectory5.phar'); +unlink(__DIR__ . '/buildfromdirectory5.phar'); foreach(range(1, 4) as $i) { - unlink(dirname(__FILE__) . "/testdir5/file$i.txt"); + unlink(__DIR__ . "/testdir5/file$i.txt"); } -rmdir(dirname(__FILE__) . '/testdir5'); +rmdir(__DIR__ . '/testdir5'); ?> --EXPECTF-- array(4) { diff --git a/ext/phar/tests/phar_buildfromdirectory6.phpt b/ext/phar/tests/phar_buildfromdirectory6.phpt index 5015ce42bd..1d3491e659 100644 --- a/ext/phar/tests/phar_buildfromdirectory6.phpt +++ b/ext/phar/tests/phar_buildfromdirectory6.phpt @@ -8,30 +8,30 @@ phar.readonly=0 --FILE-- <?php -mkdir(dirname(__FILE__).'/testdir6', 0777); +mkdir(__DIR__.'/testdir6', 0777); foreach(range(1, 4) as $i) { - file_put_contents(dirname(__FILE__)."/testdir6/file$i.txt", "some content for file $i"); + file_put_contents(__DIR__."/testdir6/file$i.txt", "some content for file $i"); } try { - $phar = new Phar(dirname(__FILE__) . '/buildfromdirectory6.phar'); - var_dump($phar->buildFromDirectory(dirname(__FILE__) . '/testdir6', '/\.php$/')); + $phar = new Phar(__DIR__ . '/buildfromdirectory6.phar'); + var_dump($phar->buildFromDirectory(__DIR__ . '/testdir6', '/\.php$/')); } catch (Exception $e) { var_dump(get_class($e)); echo $e->getMessage() . "\n"; } -var_dump(file_exists(dirname(__FILE__) . '/buildfromdirectory6.phar')); +var_dump(file_exists(__DIR__ . '/buildfromdirectory6.phar')); ?> ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromdirectory6.phar'); +unlink(__DIR__ . '/buildfromdirectory6.phar'); foreach(range(1, 4) as $i) { - unlink(dirname(__FILE__) . "/testdir6/file$i.txt"); + unlink(__DIR__ . "/testdir6/file$i.txt"); } -rmdir(dirname(__FILE__) . '/testdir6'); +rmdir(__DIR__ . '/testdir6'); ?> --EXPECT-- array(0) { diff --git a/ext/phar/tests/phar_buildfromiterator1.phpt b/ext/phar/tests/phar_buildfromiterator1.phpt index 7a67ea7073..774ef658fa 100644 --- a/ext/phar/tests/phar_buildfromiterator1.phpt +++ b/ext/phar/tests/phar_buildfromiterator1.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$phar = new Phar(dirname(__FILE__) . '/buildfromiterator1.phar'); +$phar = new Phar(__DIR__ . '/buildfromiterator1.phar'); try { ini_set('phar.readonly', 1); $phar->buildFromIterator(1); @@ -19,7 +19,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator1.phar'); +unlink(__DIR__ . '/buildfromiterator1.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromiterator10.phpt b/ext/phar/tests/phar_buildfromiterator10.phpt index 69c2704c3f..7b7eca0e6f 100644 --- a/ext/phar/tests/phar_buildfromiterator10.phpt +++ b/ext/phar/tests/phar_buildfromiterator10.phpt @@ -10,11 +10,11 @@ phar.readonly=0 --FILE-- <?php try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator10.phar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator10.phar'); $dir = new RecursiveDirectoryIterator('.'); $iter = new RecursiveIteratorIterator($dir); - $a = $phar->buildFromIterator(new RegexIterator($iter, '/_\d{3}\.phpt$/'), dirname(__FILE__) . DIRECTORY_SEPARATOR); + $a = $phar->buildFromIterator(new RegexIterator($iter, '/_\d{3}\.phpt$/'), __DIR__ . DIRECTORY_SEPARATOR); asort($a); var_dump($a); } catch (Exception $e) { @@ -25,7 +25,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator10.phar'); +unlink(__DIR__ . '/buildfromiterator10.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromiterator4.phpt b/ext/phar/tests/phar_buildfromiterator4.phpt index 9268d033f2..fc42d77d4e 100644 --- a/ext/phar/tests/phar_buildfromiterator4.phpt +++ b/ext/phar/tests/phar_buildfromiterator4.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator4.phar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator4.phar'); var_dump($phar->buildFromIterator(new myIterator( array( 'a' => basename(__FILE__, 'php') . 'phpt', @@ -54,7 +54,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator4.phar'); +unlink(__DIR__ . '/buildfromiterator4.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromiterator5.phpt b/ext/phar/tests/phar_buildfromiterator5.phpt index 0b9bbde3a9..a83e1c0d38 100644 --- a/ext/phar/tests/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/phar_buildfromiterator5.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator5.phar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator5.phar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass)))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator5.phar'); +unlink(__DIR__ . '/buildfromiterator5.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromiterator6.phpt b/ext/phar/tests/phar_buildfromiterator6.phpt index 7167e5c743..0b99e54611 100644 --- a/ext/phar/tests/phar_buildfromiterator6.phpt +++ b/ext/phar/tests/phar_buildfromiterator6.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator6.phar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator6.phar'); var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt')))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator6.phar'); +unlink(__DIR__ . '/buildfromiterator6.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromiterator7.phpt b/ext/phar/tests/phar_buildfromiterator7.phpt index 029204fe6f..bc0fa6ee4a 100644 --- a/ext/phar/tests/phar_buildfromiterator7.phpt +++ b/ext/phar/tests/phar_buildfromiterator7.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator7.phar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator7.phar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt')))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator7.phar'); +unlink(__DIR__ . '/buildfromiterator7.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromiterator8.phpt b/ext/phar/tests/phar_buildfromiterator8.phpt index 783cad2196..cbee1a536a 100644 --- a/ext/phar/tests/phar_buildfromiterator8.phpt +++ b/ext/phar/tests/phar_buildfromiterator8.phpt @@ -7,9 +7,9 @@ phar.readonly=0 --FILE-- <?php try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator8.phar'); - $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^\d{0,3}\.phpt\\z|^\.\\z|^\.\.\\z/'), dirname(__FILE__) . DIRECTORY_SEPARATOR); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator8.phar'); + $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^\d{0,3}\.phpt\\z|^\.\\z|^\.\.\\z/'), __DIR__ . DIRECTORY_SEPARATOR); asort($a); var_dump($a); } catch (Exception $e) { @@ -20,7 +20,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator8.phar'); +unlink(__DIR__ . '/buildfromiterator8.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_buildfromiterator9.phpt b/ext/phar/tests/phar_buildfromiterator9.phpt index 04328dca91..28febccf81 100644 --- a/ext/phar/tests/phar_buildfromiterator9.phpt +++ b/ext/phar/tests/phar_buildfromiterator9.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator9.phar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator9.phar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => $a = fopen(basename(__FILE__, 'php') . 'phpt', 'r'))))); fclose($a); } catch (Exception $e) { @@ -48,7 +48,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator9.phar'); +unlink(__DIR__ . '/buildfromiterator9.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_bz2.phpt b/ext/phar/tests/phar_bz2.phpt index c269a8b34f..8b2d539db0 100644 --- a/ext/phar/tests/phar_bz2.phpt +++ b/ext/phar/tests/phar_bz2.phpt @@ -10,9 +10,9 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/phar_bz2.phar'; +$fname = __DIR__ . '/phar_bz2.phar'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/phar_bz2.2.phar'; +$fname2 = __DIR__ . '/phar_bz2.2.phar'; $pname2 = 'phar://' . $fname2; $file = '<?php @@ -50,8 +50,8 @@ echo $e->getMessage(),"\n"; ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/phar_bz2.phar'); -@unlink(dirname(__FILE__) . '/phar_bz2.2.phar'); +@unlink(__DIR__ . '/phar_bz2.phar'); +@unlink(__DIR__ . '/phar_bz2.2.phar'); ?> --EXPECTF-- string(9) "it worked" diff --git a/ext/phar/tests/phar_commitwrite.phpt b/ext/phar/tests/phar_commitwrite.phpt index 9671737272..7e5c6a3998 100644 --- a/ext/phar/tests/phar_commitwrite.phpt +++ b/ext/phar/tests/phar_commitwrite.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$p = new Phar(dirname(__FILE__) . '/phar_commitwrite.phar', 0, 'phar_commitwrite.phar'); +$p = new Phar(__DIR__ . '/phar_commitwrite.phar', 0, 'phar_commitwrite.phar'); $p['file1.txt'] = 'hi'; $p->stopBuffering(); var_dump(strlen($p->getStub())); @@ -25,7 +25,7 @@ var_dump($p->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_commitwrite.phar'); +unlink(__DIR__ . '/phar_commitwrite.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_convert_again.phpt b/ext/phar/tests/phar_convert_again.phpt index bbf2c6633a..126e6a64b3 100644 --- a/ext/phar/tests/phar_convert_again.phpt +++ b/ext/phar/tests/phar_convert_again.phpt @@ -10,8 +10,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.tbz'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.tbz'; $pname = 'phar://' . $fname; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -155,20 +155,20 @@ echo $e->getMessage() . "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar.bz2'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.tbz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.tar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar.bz2'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.tbz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.tar.gz'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_convert_repeated.phpt b/ext/phar/tests/phar_convert_repeated.phpt index 4ccf84fa6d..94b5bf47ff 100644 --- a/ext/phar/tests/phar_convert_repeated.phpt +++ b/ext/phar/tests/phar_convert_repeated.phpt @@ -8,10 +8,10 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -88,15 +88,15 @@ var_dump($phar->getAlias()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.2.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.2.2.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.2.2.3.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.2.2.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.2.2.3.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.3.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.3.phar'); ?> --EXPECTF-- =================== new Phar() ======================= diff --git a/ext/phar/tests/phar_convert_repeated_b.phpt b/ext/phar/tests/phar_convert_repeated_b.phpt index 647bb842d7..faa372d071 100644 --- a/ext/phar/tests/phar_convert_repeated_b.phpt +++ b/ext/phar/tests/phar_convert_repeated_b.phpt @@ -8,7 +8,7 @@ phar.readonly=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.zip'; echo "=================== new PharData() ==================\n"; $phar = new PharData($fname); @@ -78,14 +78,14 @@ try { ===DONE=== --CLEAN-- <?php -echo dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz' . "\n"; +echo __DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.gz' . "\n"; -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.2.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.2.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.zip'); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_convert_tar.phpt b/ext/phar/tests/phar_convert_tar.phpt index c3f047d977..5efbe9bed5 100644 --- a/ext/phar/tests/phar_convert_tar.phpt +++ b/ext/phar/tests/phar_convert_tar.phpt @@ -8,10 +8,10 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -40,9 +40,9 @@ var_dump($phar->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_convert_tar2.phpt b/ext/phar/tests/phar_convert_tar2.phpt index 7160c52fbb..5b7eb8cc8a 100644 --- a/ext/phar/tests/phar_convert_tar2.phpt +++ b/ext/phar/tests/phar_convert_tar2.phpt @@ -9,10 +9,10 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.gz'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.gz'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -44,10 +44,10 @@ var_dump($phar->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- bool(false) diff --git a/ext/phar/tests/phar_convert_tar3.phpt b/ext/phar/tests/phar_convert_tar3.phpt index 7a95805787..bc737d5483 100644 --- a/ext/phar/tests/phar_convert_tar3.phpt +++ b/ext/phar/tests/phar_convert_tar3.phpt @@ -9,10 +9,10 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -44,10 +44,10 @@ var_dump($phar->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.bz2'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.bz2'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_convert_zip.phpt b/ext/phar/tests/phar_convert_zip.phpt index b17ccaa35e..8f8ef415b1 100644 --- a/ext/phar/tests/phar_convert_zip.phpt +++ b/ext/phar/tests/phar_convert_zip.phpt @@ -8,10 +8,10 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -39,9 +39,9 @@ var_dump($phar->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_copy.phpt b/ext/phar/tests/phar_copy.phpt index 8b270302ef..2f5c2d5bd2 100644 --- a/ext/phar/tests/phar_copy.phpt +++ b/ext/phar/tests/phar_copy.phpt @@ -9,8 +9,8 @@ phar.require_hash=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar.php'; $pname = 'phar://'.$fname; $iname = '/file.txt'; @@ -69,8 +69,8 @@ echo $e->getMessage(),"\n"; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?> --EXPECTF-- hihifile "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s diff --git a/ext/phar/tests/phar_create_in_cwd.phpt b/ext/phar/tests/phar_create_in_cwd.phpt index 52120fa7f9..4fb142ec2e 100644 --- a/ext/phar/tests/phar_create_in_cwd.phpt +++ b/ext/phar/tests/phar_create_in_cwd.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); try { $p = new Phar('phar_create_in_cwd.phar'); $p['file1.txt'] = 'hi'; @@ -29,7 +29,7 @@ __HALT_COMPILER(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_create_in_cwd.phar'); +unlink(__DIR__ . '/phar_create_in_cwd.phar'); ?> --EXPECTF-- int(6641) diff --git a/ext/phar/tests/phar_ctx_001.phpt b/ext/phar/tests/phar_ctx_001.phpt index f8f349a380..8aba1259a1 100644 --- a/ext/phar/tests/phar_ctx_001.phpt +++ b/ext/phar/tests/phar_ctx_001.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -61,7 +61,7 @@ var_dump($phar['b']->getMetaData()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_decompress.phpt b/ext/phar/tests/phar_decompress.phpt index 3344d9bbbd..dbd58abd7f 100644 --- a/ext/phar/tests/phar_decompress.phpt +++ b/ext/phar/tests/phar_decompress.phpt @@ -8,8 +8,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.gz'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar.gz'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -49,13 +49,13 @@ echo $e->getMessage() . "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.hooba.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.hooba.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar'); ?> --EXPECTF-- int(4096) diff --git a/ext/phar/tests/phar_dir_iterate.phpt b/ext/phar/tests/phar_dir_iterate.phpt index 6c04571d86..754ae44600 100644 --- a/ext/phar/tests/phar_dir_iterate.phpt +++ b/ext/phar/tests/phar_dir_iterate.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $phar = new Phar($fname); $phar['top.txt'] = 'hi'; @@ -21,7 +21,7 @@ foreach (new RecursiveIteratorIterator($newphar) as $path => $obj) { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_dotted_path.phpt b/ext/phar/tests/phar_dotted_path.phpt index f6d626e6cf..9f7fb217fc 100644 --- a/ext/phar/tests/phar_dotted_path.phpt +++ b/ext/phar/tests/phar_dotted_path.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 --FILE-- <?php -$dir = dirname(__FILE__) . '/broken.dirname'; +$dir = __DIR__ . '/broken.dirname'; mkdir($dir, 0777); $fname = $dir . '/dotted_path.phar'; @@ -32,8 +32,8 @@ foreach ($phar as $entry) { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/broken.dirname/dotted_path.phar'); -rmdir(dirname(__FILE__) . '/broken.dirname'); +unlink(__DIR__ . '/broken.dirname/dotted_path.phar'); +rmdir(__DIR__ . '/broken.dirname'); ?> --EXPECT-- this is a diff --git a/ext/phar/tests/phar_extract.phpt b/ext/phar/tests/phar_extract.phpt index f7d1403d59..67648c2935 100644 --- a/ext/phar/tests/phar_extract.phpt +++ b/ext/phar/tests/phar_extract.phpt @@ -7,7 +7,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/tempmanifest1.phar.php'; +$fname = __DIR__ . '/tempmanifest1.phar.php'; $pname = 'phar://' . $fname; $a = new Phar($fname); @@ -17,12 +17,12 @@ $a['subdir/ectory/file.txt'] = 'hi3'; $a->mount($pname . '/mount', __FILE__); $a->addEmptyDir('one/level'); -$a->extractTo(dirname(__FILE__) . '/extract', 'mount'); -$a->extractTo(dirname(__FILE__) . '/extract'); +$a->extractTo(__DIR__ . '/extract', 'mount'); +$a->extractTo(__DIR__ . '/extract'); $out = array(); -foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $p => $b) { +foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__ . '/extract', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $p => $b) { $out[] = $p; } @@ -32,18 +32,18 @@ foreach ($out as $b) { echo "$b\n"; } -$a->extractTo(dirname(__FILE__) . '/extract1', 'file1.txt'); -var_dump(file_get_contents(dirname(__FILE__) . '/extract1/file1.txt')); +$a->extractTo(__DIR__ . '/extract1', 'file1.txt'); +var_dump(file_get_contents(__DIR__ . '/extract1/file1.txt')); -$a->extractTo(dirname(__FILE__) . '/extract1', 'subdir/ectory/file.txt'); -var_dump(file_get_contents(dirname(__FILE__) . '/extract1/subdir/ectory/file.txt')); +$a->extractTo(__DIR__ . '/extract1', 'subdir/ectory/file.txt'); +var_dump(file_get_contents(__DIR__ . '/extract1/subdir/ectory/file.txt')); -$a->extractTo(dirname(__FILE__) . '/extract1-2', array('file2.txt', 'one/level')); -var_dump(file_get_contents(dirname(__FILE__) . '/extract1-2/file2.txt')); -var_dump(is_dir(dirname(__FILE__) . '/extract1-2/one/level')); +$a->extractTo(__DIR__ . '/extract1-2', array('file2.txt', 'one/level')); +var_dump(file_get_contents(__DIR__ . '/extract1-2/file2.txt')); +var_dump(is_dir(__DIR__ . '/extract1-2/one/level')); try { - $a->extractTo(dirname(__FILE__) . '/whatever', 134); + $a->extractTo(__DIR__ . '/whatever', 134); } catch (Exception $e) { echo $e->getMessage(), "\n"; } @@ -56,31 +56,31 @@ try { echo $e->getMessage(), "\n"; } -file_put_contents(dirname(__FILE__) . '/oops', 'I is file'); +file_put_contents(__DIR__ . '/oops', 'I is file'); try { - $a->extractTo(dirname(__FILE__) . '/oops', 'file1.txt'); + $a->extractTo(__DIR__ . '/oops', 'file1.txt'); } catch (Exception $e) { echo $e->getMessage(), "\n"; } try { - $a->extractTo(dirname(__FILE__) . '/oops1', array(array(), 'file1.txt')); + $a->extractTo(__DIR__ . '/oops1', array(array(), 'file1.txt')); } catch (Exception $e) { echo $e->getMessage(), "\n"; } try { - $a->extractTo(dirname(__FILE__) . '/extract', 'file1.txt'); + $a->extractTo(__DIR__ . '/extract', 'file1.txt'); } catch (Exception $e) { echo $e->getMessage(), "\n"; } -file_put_contents(dirname(__FILE__) . '/extract/file1.txt', 'first'); -var_dump(file_get_contents(dirname(__FILE__) . '/extract/file1.txt')); +file_put_contents(__DIR__ . '/extract/file1.txt', 'first'); +var_dump(file_get_contents(__DIR__ . '/extract/file1.txt')); -$a->extractTo(dirname(__FILE__) . '/extract', 'file1.txt', true); -var_dump(file_get_contents(dirname(__FILE__) . '/extract/file1.txt')); +$a->extractTo(__DIR__ . '/extract', 'file1.txt', true); +var_dump(file_get_contents(__DIR__ . '/extract/file1.txt')); try { $a->extractTo(str_repeat('a', 20000), 'file1.txt'); @@ -91,7 +91,7 @@ try { $a[str_repeat('a', 20000)] = 'long'; try { - $a->extractTo(dirname(__FILE__) . '/extract', str_repeat('a', 20000)); + $a->extractTo(__DIR__ . '/extract', str_repeat('a', 20000)); } catch (Exception $e) { echo $e->getMessage(), "\n"; } @@ -100,11 +100,11 @@ try { ===DONE=== --CLEAN-- <?php -@rmdir(dirname(__FILE__) . '/whatever'); -@unlink(dirname(__FILE__) . '/oops'); -@rmdir(dirname(__FILE__) . '/oops1'); -@unlink(dirname(__FILE__) . '/tempmanifest1.phar.php'); -$e = dirname(__FILE__) . '/extract/'; +@rmdir(__DIR__ . '/whatever'); +@unlink(__DIR__ . '/oops'); +@rmdir(__DIR__ . '/oops1'); +@unlink(__DIR__ . '/tempmanifest1.phar.php'); +$e = __DIR__ . '/extract/'; @unlink($e . 'file1.txt'); @unlink($e . 'file2.txt'); @unlink($e . 'subdir/ectory/file.txt'); @@ -113,13 +113,13 @@ $e = dirname(__FILE__) . '/extract/'; @rmdir($e . 'one/level'); @rmdir($e . 'one'); @rmdir($e); -$e = dirname(__FILE__) . '/extract1/'; +$e = __DIR__ . '/extract1/'; @unlink($e . 'file1.txt'); @unlink($e . 'subdir/ectory/file.txt'); @rmdir($e . 'subdir/ectory'); @rmdir($e . 'subdir'); @rmdir($e); -$e = dirname(__FILE__) . '/extract1-2/'; +$e = __DIR__ . '/extract1-2/'; @unlink($e . 'file2.txt'); @rmdir($e . 'one/level'); @rmdir($e . 'one'); diff --git a/ext/phar/tests/phar_extract2.phpt b/ext/phar/tests/phar_extract2.phpt index 7de8cee5b0..dd41f38660 100644 --- a/ext/phar/tests/phar_extract2.phpt +++ b/ext/phar/tests/phar_extract2.phpt @@ -7,7 +7,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/tempmanifest2.phar.php'; +$fname = __DIR__ . '/tempmanifest2.phar.php'; $pname = 'phar://' . $fname; $phar = new Phar($fname); @@ -19,11 +19,11 @@ $phar['subdir/ectory/file.txt'] = 'hi3'; $phar->mount($pname . '/mount2', __FILE__); $phar->addEmptyDir('one/level'); -$phar->extractTo(dirname(__FILE__) . '/extract2', 'mount2'); -$phar->extractTo(dirname(__FILE__) . '/extract2'); +$phar->extractTo(__DIR__ . '/extract2', 'mount2'); +$phar->extractTo(__DIR__ . '/extract2'); $out = array(); -foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/extract2', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $path => $file) { +foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__ . '/extract2', 0x00003000), RecursiveIteratorIterator::CHILD_FIRST) as $path => $file) { $extracted[] = $path; } @@ -37,8 +37,8 @@ foreach ($extracted as $out) { ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tempmanifest2.phar.php'); -$dir = dirname(__FILE__) . '/extract2/'; +@unlink(__DIR__ . '/tempmanifest2.phar.php'); +$dir = __DIR__ . '/extract2/'; @unlink($dir . 'file1.txt'); @unlink($dir . 'file2.txt'); @unlink($dir . 'subdir/ectory/file.txt'); @@ -47,7 +47,7 @@ $dir = dirname(__FILE__) . '/extract2/'; @rmdir($dir . 'one/level'); @rmdir($dir . 'one'); @rmdir($dir); -$dir = dirname(__FILE__) . '/extract1/'; +$dir = __DIR__ . '/extract1/'; @rmdir($dir); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_extract3.phpt b/ext/phar/tests/phar_extract3.phpt index 475583938b..ffd31a4201 100644 --- a/ext/phar/tests/phar_extract3.phpt +++ b/ext/phar/tests/phar_extract3.phpt @@ -7,9 +7,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/files/bogus.zip'; -$fname2 = dirname(__FILE__) . '/files/notbogus.zip'; -$extract = dirname(__FILE__) . '/test-extract3'; +$fname = __DIR__ . '/files/bogus.zip'; +$fname2 = __DIR__ . '/files/notbogus.zip'; +$extract = __DIR__ . '/test-extract3'; $phar = new PharData($fname); @@ -34,7 +34,7 @@ try { ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/test-extract3/'; +$dir = __DIR__ . '/test-extract3/'; @unlink($dir . 'stuff.txt'); @unlink($dir . 'nonsense.txt'); @rmdir($dir); diff --git a/ext/phar/tests/phar_gobyebye-win32.phpt b/ext/phar/tests/phar_gobyebye-win32.phpt index 526a8cbf91..55884917bd 100644 --- a/ext/phar/tests/phar_gobyebye-win32.phpt +++ b/ext/phar/tests/phar_gobyebye-win32.phpt @@ -9,8 +9,8 @@ phar.readonly=0 --FILE-- <?php Phar::interceptFileFuncs(); -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.php'; $pname = 'phar://' . $fname; file_put_contents($fname2, '<?php Phar::unlinkArchive("' . addslashes($fname) . '");'); file_put_contents($pname . '/foo/hi', '<?php @@ -26,8 +26,8 @@ include $pname . '/foo/hi'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.php'); ?> --EXPECTF-- Warning: readfile(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d diff --git a/ext/phar/tests/phar_gobyebye.phpt b/ext/phar/tests/phar_gobyebye.phpt index 93e153bdf2..753562571d 100644 --- a/ext/phar/tests/phar_gobyebye.phpt +++ b/ext/phar/tests/phar_gobyebye.phpt @@ -10,8 +10,8 @@ phar.readonly=0 --FILE-- <?php Phar::interceptFileFuncs(); -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.php'; $pname = 'phar://' . $fname; file_put_contents($fname2, '<?php Phar::unlinkArchive("' . addslashes($fname) . '");'); file_put_contents($pname . '/foo/hi', '<?php @@ -27,8 +27,8 @@ include $pname . '/foo/hi'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.php'); ?> --EXPECTF-- Warning: readfile(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye.phar.php/foo/hi on line %d diff --git a/ext/phar/tests/phar_gzip.phpt b/ext/phar/tests/phar_gzip.phpt index 3308424fa9..942ca9c3d0 100644 --- a/ext/phar/tests/phar_gzip.phpt +++ b/ext/phar/tests/phar_gzip.phpt @@ -10,9 +10,9 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/phar_gzip.phar'; +$fname = __DIR__ . '/phar_gzip.phar'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/phar_gzip.2.phar'; +$fname2 = __DIR__ . '/phar_gzip.2.phar'; $pname2 = 'phar://' . $fname2; $file = '<?php @@ -48,8 +48,8 @@ if ($a['mtime'] != $b['mtime']) { ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/phar_gzip.phar'); -@unlink(dirname(__FILE__) . '/phar_gzip.2.phar'); +@unlink(__DIR__ . '/phar_gzip.phar'); +@unlink(__DIR__ . '/phar_gzip.2.phar'); ?> --EXPECTF-- string(9) "it worked" diff --git a/ext/phar/tests/phar_isvalidpharfilename.phpt b/ext/phar/tests/phar_isvalidpharfilename.phpt index a59f498b95..3a25714556 100644 --- a/ext/phar/tests/phar_isvalidpharfilename.phpt +++ b/ext/phar/tests/phar_isvalidpharfilename.phpt @@ -6,7 +6,7 @@ Phar: Phar::isValidPharFilename() phar.readonly=1 --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); Phar::isValidPharFilename(array()); echo "*\n"; var_dump(Phar::isValidPharFilename('*')); @@ -28,7 +28,7 @@ var_dump(Phar::isValidPharFilename('boo.phar.tar')); var_dump(Phar::isValidPharFilename('boo.phar.tar', true)); var_dump(Phar::isValidPharFilename('boo.phar.tar', false)); -mkdir(dirname(__FILE__) . '/.phar'); +mkdir(__DIR__ . '/.phar'); echo "\n.phar/boo.tar\n"; var_dump(Phar::isValidPharFilename('.phar/boo.tar')); @@ -74,7 +74,7 @@ var_dump(Phar::isValidPharFilename('dir.phar.php', false)); ===DONE=== --CLEAN-- <?php -rmdir(dirname(__FILE__) . '/.phar'); +rmdir(__DIR__ . '/.phar'); --EXPECTF-- Warning: Phar::isValidPharFilename() expects parameter 1 to be a valid path, array given in %sphar_isvalidpharfilename.php on line %d * diff --git a/ext/phar/tests/phar_magic.phpt b/ext/phar/tests/phar_magic.phpt index cbe0ebf133..42ad3d3c71 100644 --- a/ext/phar/tests/phar_magic.phpt +++ b/ext/phar/tests/phar_magic.phpt @@ -7,10 +7,10 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $p = new Phar($fname); $p['a'] = '<?php include "b/c.php";' . "\n"; -$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";'; +$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include __DIR__ . "/../d";'; $p['d'] = "in d\n"; $p->setStub('<?php set_include_path("phar://" . __FILE__); @@ -21,7 +21,7 @@ include $fname; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_metadata_read.phpt b/ext/phar/tests/phar_metadata_read.phpt index da23218196..1c8428adba 100644 --- a/ext/phar/tests/phar_metadata_read.phpt +++ b/ext/phar/tests/phar_metadata_read.phpt @@ -9,7 +9,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -48,7 +48,7 @@ foreach($files as $name => $cont) { ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" string(1) "b" diff --git a/ext/phar/tests/phar_metadata_write.phpt b/ext/phar/tests/phar_metadata_write.phpt index 2aadc7423f..a15d23d4c6 100644 --- a/ext/phar/tests/phar_metadata_write.phpt +++ b/ext/phar/tests/phar_metadata_write.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -46,7 +46,7 @@ foreach($files as $name => $cont) { ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" string(1) "b" diff --git a/ext/phar/tests/phar_offset_check.phpt b/ext/phar/tests/phar_offset_check.phpt index 469dce6c11..493d823a68 100644 --- a/ext/phar/tests/phar_offset_check.phpt +++ b/ext/phar/tests/phar_offset_check.phpt @@ -8,7 +8,7 @@ phar.require_hash=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://'.$fname; $phar = new Phar($fname); @@ -64,7 +64,7 @@ var_dump($phar->getAlias()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Entry .phar/stub.php does not exist Entry .phar/alias.txt does not exist diff --git a/ext/phar/tests/phar_offset_get_error.phpt b/ext/phar/tests/phar_offset_get_error.phpt index 8e96246eef..54dec470c2 100644 --- a/ext/phar/tests/phar_offset_get_error.phpt +++ b/ext/phar/tests/phar_offset_get_error.phpt @@ -8,7 +8,7 @@ phar.require_hash=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://'.$fname; $iname = '/file.txt'; $ename = '/error/..'; @@ -41,7 +41,7 @@ echo $e->getMessage(),"\n"; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- Entry /error/.. does not exist and cannot be created: phar error: invalid path "/error/.." contains upper directory reference foobar diff --git a/ext/phar/tests/phar_oo_001.phpt b/ext/phar/tests/phar_oo_001.phpt index 7ee7ca6fa5..83d52eeabf 100644 --- a/ext/phar/tests/phar_oo_001.phpt +++ b/ext/phar/tests/phar_oo_001.phpt @@ -44,7 +44,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_001.phar.php'); +unlink(__DIR__ . '/files/phar_oo_001.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_002.phpt b/ext/phar/tests/phar_oo_002.phpt index 2787ac8a53..fdc08c3bfc 100644 --- a/ext/phar/tests/phar_oo_002.phpt +++ b/ext/phar/tests/phar_oo_002.phpt @@ -16,7 +16,7 @@ $phar = new Phar($fname); $phar->setInfoClass('SplFileInfo'); foreach($phar as $name => $ent) { - var_dump(str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name)); + var_dump(str_replace(str_replace('\\', '/', __DIR__), '*', $name)); var_dump($ent->getFilename()); var_dump($ent->getSize()); var_dump($ent->getType()); @@ -36,7 +36,7 @@ echo "==RECURSIVE==\n"; $phar = new Phar($fname); foreach(new RecursiveIteratorIterator($phar) as $name => $ent) { - var_dump(str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name)); + var_dump(str_replace(str_replace('\\', '/', __DIR__), '*', $name)); var_dump(str_replace('\\', '/', $ent->getFilename())); var_dump($ent->getCompressedSize()); var_dump($ent->isCRCChecked()); @@ -48,7 +48,7 @@ foreach(new RecursiveIteratorIterator($phar) as $name => $ent) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_002.phar.php'); +unlink(__DIR__ . '/files/phar_oo_002.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_oo_003.phpt b/ext/phar/tests/phar_oo_003.phpt index 01ca493a2f..4ff8361120 100644 --- a/ext/phar/tests/phar_oo_003.phpt +++ b/ext/phar/tests/phar_oo_003.phpt @@ -26,7 +26,7 @@ foreach($phar as $name => $ent) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_003.phar.php'); +unlink(__DIR__ . '/files/phar_oo_003.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_oo_004.phpt b/ext/phar/tests/phar_oo_004.phpt index 12492e2eef..2191e0082b 100644 --- a/ext/phar/tests/phar_oo_004.phpt +++ b/ext/phar/tests/phar_oo_004.phpt @@ -76,7 +76,7 @@ foreach($it as $name => $ent) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_004.phar.php'); +unlink(__DIR__ . '/files/phar_oo_004.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_005.phpt b/ext/phar/tests/phar_oo_005.phpt index 62887655b1..27279ddbbc 100644 --- a/ext/phar/tests/phar_oo_005.phpt +++ b/ext/phar/tests/phar_oo_005.phpt @@ -29,7 +29,7 @@ foreach($it as $name => $ent) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_005.phar.php'); +unlink(__DIR__ . '/files/phar_oo_005.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_006.phpt b/ext/phar/tests/phar_oo_006.phpt index de9b499a83..f595c2e412 100644 --- a/ext/phar/tests/phar_oo_006.phpt +++ b/ext/phar/tests/phar_oo_006.phpt @@ -37,7 +37,7 @@ echo $phar['b.php']->getFilename() . "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_006.phar.php'); +unlink(__DIR__ . '/files/phar_oo_006.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_oo_007.phpt b/ext/phar/tests/phar_oo_007.phpt index ff9c721150..7af8bfa790 100644 --- a/ext/phar/tests/phar_oo_007.phpt +++ b/ext/phar/tests/phar_oo_007.phpt @@ -13,7 +13,7 @@ class MyFile extends SplFileObject { function __construct($name) { - echo __METHOD__ . "(" . str_replace(str_replace('\\', '/', dirname(__FILE__)), '*', $name) . ")\n"; + echo __METHOD__ . "(" . str_replace(str_replace('\\', '/', __DIR__), '*', $name) . ")\n"; parent::__construct($name); } } @@ -58,7 +58,7 @@ var_dump($f->eof()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_007.phar.php'); +unlink(__DIR__ . '/files/phar_oo_007.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_oo_008.phpt b/ext/phar/tests/phar_oo_008.phpt index b0f518d39b..e1107df4ef 100644 --- a/ext/phar/tests/phar_oo_008.phpt +++ b/ext/phar/tests/phar_oo_008.phpt @@ -82,7 +82,7 @@ foreach($v as $k => $d) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_008.phar.php'); +unlink(__DIR__ . '/files/phar_oo_008.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_009.phpt b/ext/phar/tests/phar_oo_009.phpt index 05e1f1efeb..c6898d456d 100644 --- a/ext/phar/tests/phar_oo_009.phpt +++ b/ext/phar/tests/phar_oo_009.phpt @@ -36,7 +36,7 @@ foreach($f as $k => $v) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_009.phar.php'); +unlink(__DIR__ . '/files/phar_oo_009.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_010.phpt b/ext/phar/tests/phar_oo_010.phpt index 0869828f8f..243a11e92f 100644 --- a/ext/phar/tests/phar_oo_010.phpt +++ b/ext/phar/tests/phar_oo_010.phpt @@ -35,7 +35,7 @@ var_dump(isset($phar['b'])); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_010.phar.php'); +unlink(__DIR__ . '/files/phar_oo_010.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_011.phpt b/ext/phar/tests/phar_oo_011.phpt index 5b929363db..223a214fe0 100644 --- a/ext/phar/tests/phar_oo_011.phpt +++ b/ext/phar/tests/phar_oo_011.phpt @@ -25,7 +25,7 @@ echo "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_011.phar.php'); +unlink(__DIR__ . '/files/phar_oo_011.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_011b.phpt b/ext/phar/tests/phar_oo_011b.phpt index b7a1c420f1..098742ca7f 100644 --- a/ext/phar/tests/phar_oo_011b.phpt +++ b/ext/phar/tests/phar_oo_011b.phpt @@ -30,7 +30,7 @@ catch (BadMethodCallException $e) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_011b.phar.php'); +unlink(__DIR__ . '/files/phar_oo_011b.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_012.phpt b/ext/phar/tests/phar_oo_012.phpt index f5566807fb..44e0eecdfa 100644 --- a/ext/phar/tests/phar_oo_012.phpt +++ b/ext/phar/tests/phar_oo_012.phpt @@ -26,7 +26,7 @@ var_dump(isset($phar['f.php'])); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_012.phar.php'); +unlink(__DIR__ . '/files/phar_oo_012.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_012_confirm.phpt b/ext/phar/tests/phar_oo_012_confirm.phpt index d2798c3dd4..d69af5d0e6 100644 --- a/ext/phar/tests/phar_oo_012_confirm.phpt +++ b/ext/phar/tests/phar_oo_012_confirm.phpt @@ -29,7 +29,7 @@ var_dump(isset($phar['f.php'])); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_012_confirm.phar.php'); +unlink(__DIR__ . '/files/phar_oo_012_confirm.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_012b.phpt b/ext/phar/tests/phar_oo_012b.phpt index cb17a601e4..bafd13c489 100644 --- a/ext/phar/tests/phar_oo_012b.phpt +++ b/ext/phar/tests/phar_oo_012b.phpt @@ -33,7 +33,7 @@ catch (BadMethodCallException $e) ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_012b.phar.php'); +unlink(__DIR__ . '/files/phar_oo_012b.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_compressallbz2.phpt b/ext/phar/tests/phar_oo_compressallbz2.phpt index d4aadebce6..8a1c5f21b2 100644 --- a/ext/phar/tests/phar_oo_compressallbz2.phpt +++ b/ext/phar/tests/phar_oo_compressallbz2.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -44,8 +44,8 @@ var_dump($phar['b']->isCompressed(Phar::BZ2)); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_oo_compressallgz.phpt b/ext/phar/tests/phar_oo_compressallgz.phpt index 65d018bdbd..a42a92770c 100644 --- a/ext/phar/tests/phar_oo_compressallgz.phpt +++ b/ext/phar/tests/phar_oo_compressallgz.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -48,8 +48,8 @@ echo $e->getMessage() . "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_oo_compressed_001.phpt b/ext/phar/tests/phar_oo_compressed_001.phpt index 032faa1247..8b6e96419f 100644 --- a/ext/phar/tests/phar_oo_compressed_001.phpt +++ b/ext/phar/tests/phar_oo_compressed_001.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -48,7 +48,7 @@ var_dump($phar['d']->isCompressed()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_oo_compressed_001b.phpt b/ext/phar/tests/phar_oo_compressed_001b.phpt index fcf06d4008..bd8404638d 100644 --- a/ext/phar/tests/phar_oo_compressed_001b.phpt +++ b/ext/phar/tests/phar_oo_compressed_001b.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -48,7 +48,7 @@ var_dump($phar['d']->isCompressed()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_oo_compressed_002.phpt b/ext/phar/tests/phar_oo_compressed_002.phpt index f1ece51617..0f3f6a5d6e 100644 --- a/ext/phar/tests/phar_oo_compressed_002.phpt +++ b/ext/phar/tests/phar_oo_compressed_002.phpt @@ -8,7 +8,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -51,7 +51,7 @@ var_dump($phar['e']->isCompressed()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_oo_compressed_002b.phpt b/ext/phar/tests/phar_oo_compressed_002b.phpt index dd935cc5ca..8c4fbc8966 100644 --- a/ext/phar/tests/phar_oo_compressed_002b.phpt +++ b/ext/phar/tests/phar_oo_compressed_002b.phpt @@ -8,7 +8,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -51,7 +51,7 @@ var_dump($phar['e']->isCompressed()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_oo_getcontents.phpt b/ext/phar/tests/phar_oo_getcontents.phpt index e3a0c2dea7..35b9a4a887 100644 --- a/ext/phar/tests/phar_oo_getcontents.phpt +++ b/ext/phar/tests/phar_oo_getcontents.phpt @@ -6,7 +6,7 @@ Phar object: getContent() phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $phar = new Phar($fname); $phar['a/b'] = 'file contents @@ -27,7 +27,7 @@ echo $e->getMessage(), "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __halt_compiler(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_oo_getcontentsgz.phpt b/ext/phar/tests/phar_oo_getcontentsgz.phpt index e77b5cad1a..e15b177316 100644 --- a/ext/phar/tests/phar_oo_getcontentsgz.phpt +++ b/ext/phar/tests/phar_oo_getcontentsgz.phpt @@ -7,8 +7,8 @@ Phar object: getContent() (verify it works with compression) phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; $phar = new Phar($fname); $phar['a'] = 'file contents @@ -22,8 +22,8 @@ echo $phar2['a']->getContent() . "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_getmodified.phpt b/ext/phar/tests/phar_oo_getmodified.phpt index 0df479e860..7a11b8920c 100644 --- a/ext/phar/tests/phar_oo_getmodified.phpt +++ b/ext/phar/tests/phar_oo_getmodified.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -27,8 +27,8 @@ var_dump($phar->getModified()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- bool(false) diff --git a/ext/phar/tests/phar_oo_iswriteable.phpt b/ext/phar/tests/phar_oo_iswriteable.phpt index 8da3ca9e78..b87f58f0da 100644 --- a/ext/phar/tests/phar_oo_iswriteable.phpt +++ b/ext/phar/tests/phar_oo_iswriteable.phpt @@ -7,8 +7,8 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; $pname = 'phar://hio'; $file = '<?php include "' . $pname . '/a.php"; __HALT_COMPILER(); ?>'; @@ -59,8 +59,8 @@ chmod($fname2, 0666); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECT-- bool(true) diff --git a/ext/phar/tests/phar_oo_nosig.phpt b/ext/phar/tests/phar_oo_nosig.phpt index 5710f4fca5..acf897490b 100644 --- a/ext/phar/tests/phar_oo_nosig.phpt +++ b/ext/phar/tests/phar_oo_nosig.phpt @@ -15,7 +15,7 @@ var_dump($phar->getSignature()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php'); +unlink(__DIR__ . '/files/phar_oo_test.phar.php'); __halt_compiler(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_oo_uncompressall.phpt b/ext/phar/tests/phar_oo_uncompressall.phpt index d5d392d14d..f669f5e8ca 100644 --- a/ext/phar/tests/phar_oo_uncompressall.phpt +++ b/ext/phar/tests/phar_oo_uncompressall.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php __HALT_COMPILER(); ?>'; @@ -52,8 +52,8 @@ var_dump($phar['a']->isCompressed()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/phar_running.phpt b/ext/phar/tests/phar_running.phpt index 25acf82285..74f26f0cd6 100644 --- a/ext/phar/tests/phar_running.phpt +++ b/ext/phar/tests/phar_running.phpt @@ -6,7 +6,7 @@ Phar: Phar::running() phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $phar = new Phar($fname); @@ -20,7 +20,7 @@ var_dump(Phar::running()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- Warning: Phar::running() expects parameter 1 to be bool, array given in phar://%sphar_running.phar.php/index.php on line 2 string(%d) "phar://%sphar_running.phar.php" diff --git a/ext/phar/tests/phar_setalias.phpt b/ext/phar/tests/phar_setalias.phpt index 14990d0300..7d67d787c5 100644 --- a/ext/phar/tests/phar_setalias.phpt +++ b/ext/phar/tests/phar_setalias.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; @@ -26,8 +26,8 @@ echo $phar->getAlias() . "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_setalias2.phpt b/ext/phar/tests/phar_setalias2.phpt index d9c763333f..4a9d9ea638 100644 --- a/ext/phar/tests/phar_setalias2.phpt +++ b/ext/phar/tests/phar_setalias2.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; @@ -23,14 +23,14 @@ echo $phar->getAlias() . "\n"; $phar->setAlias('test'); echo $phar->getAlias() . "\n"; $b = $phar; -$phar = new Phar(dirname(__FILE__) . '/notphar.phar'); +$phar = new Phar(__DIR__ . '/notphar.phar'); try { $phar->setAlias('test'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - $b = new Phar(dirname(__FILE__) . '/nope.phar', 0, 'test'); + $b = new Phar(__DIR__ . '/nope.phar', 0, 'test'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } @@ -38,9 +38,9 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); -unlink(dirname(__FILE__) . '/notphar.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); +unlink(__DIR__ . '/notphar.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_setdefaultstub.phpt b/ext/phar/tests/phar_setdefaultstub.phpt index 1913685313..f834f3543e 100644 --- a/ext/phar/tests/phar_setdefaultstub.phpt +++ b/ext/phar/tests/phar_setdefaultstub.phpt @@ -7,7 +7,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $phar = new Phar($fname); $phar['a.php'] = '<php echo "this is a\n"; ?>'; @@ -51,7 +51,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECT-- string(6643) "<?php diff --git a/ext/phar/tests/phar_setsignaturealgo1.phpt b/ext/phar/tests/phar_setsignaturealgo1.phpt index 503a659bce..0b8647b64c 100644 --- a/ext/phar/tests/phar_setsignaturealgo1.phpt +++ b/ext/phar/tests/phar_setsignaturealgo1.phpt @@ -9,7 +9,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$p = new Phar(dirname(__FILE__) . '/phar_setsignaturealgo1.phar', 0, 'phar_setsignaturealgo1.phar'); +$p = new Phar(__DIR__ . '/phar_setsignaturealgo1.phar', 0, 'phar_setsignaturealgo1.phar'); $p['file1.txt'] = 'hi'; var_dump($p->getSignature()); $p->setSignatureAlgorithm(Phar::MD5); @@ -38,7 +38,7 @@ echo $e->getMessage(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_setsignaturealgo1.phar'); +unlink(__DIR__ . '/phar_setsignaturealgo1.phar'); ?> --EXPECTF-- array(2) { diff --git a/ext/phar/tests/phar_setsignaturealgo2.phpt b/ext/phar/tests/phar_setsignaturealgo2.phpt index 9f548d0803..80aa531138 100644 --- a/ext/phar/tests/phar_setsignaturealgo2.phpt +++ b/ext/phar/tests/phar_setsignaturealgo2.phpt @@ -13,7 +13,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $p = new Phar($fname); $p['file1.txt'] = 'hi'; var_dump($p->getSignature()); @@ -34,9 +34,9 @@ var_dump($p->getSignature()); echo $e->getMessage(); } try { -$config = dirname(__FILE__) . '/files/openssl.cnf'; +$config = __DIR__ . '/files/openssl.cnf'; $config_arg = array('config' => $config); -$private = openssl_get_privatekey(file_get_contents(dirname(__FILE__) . '/files/private.pem')); +$private = openssl_get_privatekey(file_get_contents(__DIR__ . '/files/private.pem')); $pkey = ''; openssl_pkey_export($private, $pkey, NULL, $config_arg); $p->setSignatureAlgorithm(Phar::OPENSSL, $pkey); @@ -48,7 +48,7 @@ echo $e->getMessage(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- array(2) { diff --git a/ext/phar/tests/phar_stub.phpt b/ext/phar/tests/phar_stub.phpt index 8dfd50ae6e..e5b2f27f1d 100644 --- a/ext/phar/tests/phar_stub.phpt +++ b/ext/phar/tests/phar_stub.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; @@ -32,7 +32,7 @@ $fp = fopen($fname, 'rb'); echo fread($fp, strlen($file)) . "\n"; fclose($fp); -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phartmp.php'; $file = '<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; $fp = fopen($fname2, 'wb'); fwrite($fp, $file); @@ -78,8 +78,8 @@ fclose($fp); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt index 8e57692ab4..065078d296 100644 --- a/ext/phar/tests/phar_stub_error.phpt +++ b/ext/phar/tests/phar_stub_error.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -41,7 +41,7 @@ var_dump($phar->getStub() == $stub); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/phar_stub_write.phpt b/ext/phar/tests/phar_stub_write.phpt index dd0f35d295..67bea0ddfe 100644 --- a/ext/phar/tests/phar_stub_write.phpt +++ b/ext/phar/tests/phar_stub_write.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -44,7 +44,7 @@ var_dump($phar->getStub() == $sexp); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_stub_write_file.phpt b/ext/phar/tests/phar_stub_write_file.phpt index 3c0d72259f..5589033297 100644 --- a/ext/phar/tests/phar_stub_write_file.phpt +++ b/ext/phar/tests/phar_stub_write_file.phpt @@ -8,7 +8,7 @@ phar.readonly=0 allow_url_fopen=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -45,7 +45,7 @@ var_dump($phar->getStub() == $sexp); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/phar_unlinkarchive.phpt b/ext/phar/tests/phar_unlinkarchive.phpt index 98001fcbf0..4597d5aaba 100644 --- a/ext/phar/tests/phar_unlinkarchive.phpt +++ b/ext/phar/tests/phar_unlinkarchive.phpt @@ -14,8 +14,8 @@ Phar::unlinkArchive(""); echo $e->getMessage(),"\n"; } -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$pdname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$pdname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; try { Phar::unlinkArchive($fname); @@ -31,8 +31,8 @@ echo $e->getMessage(),"\n"; Phar::unlinkArchive(array()); $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>'; $file = $stub; @@ -79,10 +79,10 @@ include $pname . '/evil.php'; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/pharfileinfo_chmod.phpt b/ext/phar/tests/pharfileinfo_chmod.phpt index 23ce5c914a..357d21e73b 100644 --- a/ext/phar/tests/pharfileinfo_chmod.phpt +++ b/ext/phar/tests/pharfileinfo_chmod.phpt @@ -6,7 +6,7 @@ Phar: PharFileInfo::chmod extra code coverage phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; $phar = new Phar($fname); @@ -25,7 +25,7 @@ $b->chmod(0666); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- Phar entry "a" is a temporary directory (not an actual entry in the archive), cannot chmod diff --git a/ext/phar/tests/pharfileinfo_compression.phpt b/ext/phar/tests/pharfileinfo_compression.phpt index 9f5480be4f..95d212dd7f 100644 --- a/ext/phar/tests/pharfileinfo_compression.phpt +++ b/ext/phar/tests/pharfileinfo_compression.phpt @@ -8,7 +8,7 @@ Phar: PharFileInfo compression-related methods phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; $phar = new Phar($fname); @@ -73,8 +73,8 @@ var_dump($b->decompress()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- Warning: PharFileInfo::isCompressed() expects parameter 1 to be int, array given in %spharfileinfo_compression.php on line 11 Unknown compression type specified diff --git a/ext/phar/tests/pharfileinfo_construct.phpt b/ext/phar/tests/pharfileinfo_construct.phpt index 53ee5143cf..4802e0fb40 100644 --- a/ext/phar/tests/pharfileinfo_construct.phpt +++ b/ext/phar/tests/pharfileinfo_construct.phpt @@ -6,7 +6,7 @@ Phar: PharFileInfo::__construct phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; try { @@ -47,7 +47,7 @@ echo $e->getMessage() . "\n"; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- Cannot open phar file 'phar://%spharfileinfo_construct.phar/oops': internal corruption of phar "%spharfileinfo_construct.phar" (truncated entry) PharFileInfo::__construct() expects parameter 1 to be a valid path, array given diff --git a/ext/phar/tests/pharfileinfo_destruct.phpt b/ext/phar/tests/pharfileinfo_destruct.phpt index dc3917d2df..2de67473aa 100644 --- a/ext/phar/tests/pharfileinfo_destruct.phpt +++ b/ext/phar/tests/pharfileinfo_destruct.phpt @@ -6,7 +6,7 @@ Phar: PharFileInfo::__destruct phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; $a = new Phar($fname); @@ -20,6 +20,6 @@ unset($b); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECT-- ===DONE=== diff --git a/ext/phar/tests/pharfileinfo_getcrc32.phpt b/ext/phar/tests/pharfileinfo_getcrc32.phpt index 436ac7c590..277d96804a 100644 --- a/ext/phar/tests/pharfileinfo_getcrc32.phpt +++ b/ext/phar/tests/pharfileinfo_getcrc32.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -41,7 +41,7 @@ echo $e->getMessage() . "\n"; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- Phar entry is a directory, does not have a CRC Phar entry was not CRC checked diff --git a/ext/phar/tests/pharfileinfo_setmetadata.phpt b/ext/phar/tests/pharfileinfo_setmetadata.phpt index 8fb6935f26..a0915cb1ac 100644 --- a/ext/phar/tests/pharfileinfo_setmetadata.phpt +++ b/ext/phar/tests/pharfileinfo_setmetadata.phpt @@ -6,7 +6,7 @@ Phar: PharFileInfo::setMetadata/delMetadata extra code coverage phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; $pname = 'phar://' . $fname; $phar = new Phar($fname); @@ -41,8 +41,8 @@ $b->setMetadata(1,2,3); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- Phar entry is a temporary directory (not an actual entry in the archive), cannot set metadata Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata diff --git a/ext/phar/tests/readfile.phpt b/ext/phar/tests/readfile.phpt index 63e80eb0e3..fa8611755a 100644 --- a/ext/phar/tests/readfile.phpt +++ b/ext/phar/tests/readfile.phpt @@ -7,7 +7,7 @@ phar.require_hash=1 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $a = new Phar($fname); $a['index.php'] = '<?php readfile("dir/file1.txt"); @@ -25,6 +25,6 @@ include $fname; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- hihi===DONE=== diff --git a/ext/phar/tests/readfile_edgecases.phpt b/ext/phar/tests/readfile_edgecases.phpt index f6a0dc65b9..b99ae4333f 100644 --- a/ext/phar/tests/readfile_edgecases.phpt +++ b/ext/phar/tests/readfile_edgecases.phpt @@ -7,11 +7,11 @@ phar.readonly=0 --FILE-- <?php Phar::interceptFileFuncs(); -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; readfile(array()); -chdir(dirname(__FILE__)); +chdir(__DIR__); file_put_contents($fname, "blah\n"); file_put_contents("foob", "test\n"); readfile($fname); @@ -21,7 +21,7 @@ file_put_contents($pname . '/foo/hi', '<?php readfile("foo/" . basename(__FILE__)); $context = stream_context_create(); readfile("foob"); -set_include_path("' . addslashes(dirname(__FILE__)) . '"); +set_include_path("' . addslashes(__DIR__) . '"); readfile("foob", true); readfile("./hi", 0, $context); readfile("../oops"); @@ -31,9 +31,9 @@ include $pname . '/foo/hi'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php rmdir(dirname(__FILE__) . '/poo'); ?> -<?php unlink(dirname(__FILE__) . '/foob'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php rmdir(__DIR__ . '/poo'); ?> +<?php unlink(__DIR__ . '/foob'); ?> --EXPECTF-- Warning: readfile() expects parameter 1 to be a valid path, array given in %sreadfile_edgecases.php on line %d blah diff --git a/ext/phar/tests/refcount1.phpt b/ext/phar/tests/refcount1.phpt index e2cb3b8cff..8aefc54245 100644 --- a/ext/phar/tests/refcount1.phpt +++ b/ext/phar/tests/refcount1.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php __HALT_COMPILER(); ?>"; @@ -36,7 +36,7 @@ include $pname . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- ===CLOSE=== object(PharFileInfo)#%d (2) { diff --git a/ext/phar/tests/rename.phpt b/ext/phar/tests/rename.phpt index cfcedc7000..9e3824729a 100644 --- a/ext/phar/tests/rename.phpt +++ b/ext/phar/tests/rename.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -24,7 +24,7 @@ echo file_get_contents($pname . '/b') . "\n"; echo file_get_contents($pname . '/a') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- a a diff --git a/ext/phar/tests/rename_dir.phpt b/ext/phar/tests/rename_dir.phpt index d19a37f70f..7283135632 100644 --- a/ext/phar/tests/rename_dir.phpt +++ b/ext/phar/tests/rename_dir.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -25,7 +25,7 @@ echo file_get_contents($pname . '/b/x') . "\n"; echo file_get_contents($pname . '/a/x') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- a a diff --git a/ext/phar/tests/rename_dir_and_mount.phpt b/ext/phar/tests/rename_dir_and_mount.phpt index b74f47b91d..f70485f1d7 100644 --- a/ext/phar/tests/rename_dir_and_mount.phpt +++ b/ext/phar/tests/rename_dir_and_mount.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -19,7 +19,7 @@ $files['a/b/x'] = 'a'; include 'files/phar_test.inc'; include $fname; -Phar::mount("$pname/a/c", dirname(__FILE__)); +Phar::mount("$pname/a/c", __DIR__); var_dump(file_exists($pname . '/a')); var_dump(file_exists($pname . '/a/x')); @@ -43,7 +43,7 @@ var_dump(file_exists($pname . '/b/c')); var_dump(file_exists($pname . '/b/c/'.basename(__FILE__))); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECT-- bool(true) bool(true) diff --git a/ext/phar/tests/rmdir.phpt b/ext/phar/tests/rmdir.phpt index ef061bf7c2..f7e31c20ff 100644 --- a/ext/phar/tests/rmdir.phpt +++ b/ext/phar/tests/rmdir.phpt @@ -7,7 +7,7 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -25,7 +25,7 @@ unlink($pname . '/a/x'); var_dump(rmdir($pname . '/a')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- a diff --git a/ext/phar/tests/security.phpt b/ext/phar/tests/security.phpt index 6d26da0b25..76af2a0e74 100644 --- a/ext/phar/tests/security.phpt +++ b/ext/phar/tests/security.phpt @@ -6,8 +6,8 @@ Phar: test to ensure phar.readonly cannot be circumvented phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.php'; $a = new Phar($fname); $a->setStub('<?php Phar::mapPhar(); @@ -29,7 +29,7 @@ include $fname2; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.php'); ?> --EXPECT-- bool(false) Write operations disabled by the php.ini setting phar.readonly diff --git a/ext/phar/tests/stat.phpt b/ext/phar/tests/stat.phpt index f14d0da1a6..e8649da235 100644 --- a/ext/phar/tests/stat.phpt +++ b/ext/phar/tests/stat.phpt @@ -11,9 +11,9 @@ umask(0); Phar::interceptFileFuncs(); var_dump(stat("")); -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $a = new Phar($fname); $a['my/index.php'] = '<?php echo "stat\n"; @@ -70,7 +70,7 @@ include $fname; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- bool(false) stat diff --git a/ext/phar/tests/stat2_5.3.phpt b/ext/phar/tests/stat2_5.3.phpt index 99f658fa78..8962d61aa6 100644 --- a/ext/phar/tests/stat2_5.3.phpt +++ b/ext/phar/tests/stat2_5.3.phpt @@ -12,9 +12,9 @@ is_file(); is_link(); var_dump(is_file(__FILE__)); -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; -copy(dirname(__FILE__) . '/tar/files/links.tar', $fname2); +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; +copy(__DIR__ . '/tar/files/links.tar', $fname2); $a = new PharData($fname2); $b = $a->convertToExecutable(Phar::TAR, Phar::NONE, '.phar.tar'); unset($a); @@ -36,8 +36,8 @@ include $fname3; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- Warning: is_file() expects exactly 1 parameter, 0 given in %sstat2_5.3.php on line %d diff --git a/ext/phar/tests/tar/033.phpt b/ext/phar/tests/tar/033.phpt index b1cbef2acd..f07dd7f48a 100644 --- a/ext/phar/tests/tar/033.phpt +++ b/ext/phar/tests/tar/033.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://hio'; $phar = new Phar($fname); @@ -37,7 +37,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECT-- bool(false) diff --git a/ext/phar/tests/tar/033a.phpt b/ext/phar/tests/tar/033a.phpt index 09c2f3add1..4bb8757314 100644 --- a/ext/phar/tests/tar/033a.phpt +++ b/ext/phar/tests/tar/033a.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://hio'; $phar = new Phar($fname); @@ -37,7 +37,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- bool(false) diff --git a/ext/phar/tests/tar/alias_acrobatics.phpt b/ext/phar/tests/tar/alias_acrobatics.phpt index d08dc0467c..7146d054f1 100644 --- a/ext/phar/tests/tar/alias_acrobatics.phpt +++ b/ext/phar/tests/tar/alias_acrobatics.phpt @@ -7,8 +7,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.tar'; $p = new Phar($fname); @@ -35,8 +35,8 @@ echo $e->getMessage(),"\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar'); ?> --EXPECTF-- alias "foo" is already used for archive "%salias_acrobatics.phar.tar" cannot be overloaded with "%salias_acrobatics.2.phar.tar" diff --git a/ext/phar/tests/tar/all.phpt b/ext/phar/tests/tar/all.phpt index 848f50502d..215043e2da 100644 --- a/ext/phar/tests/tar/all.phpt +++ b/ext/phar/tests/tar/all.phpt @@ -11,9 +11,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php'; $pname2 = 'phar://' . $fname2; $phar = new Phar($fname); @@ -41,7 +41,7 @@ var_dump($phar['a']->getMetadata()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php'); ?> --EXPECT-- bool(false) bool(false) diff --git a/ext/phar/tests/tar/badalias.phpt b/ext/phar/tests/tar/badalias.phpt index 441fc03ae7..532aba8c3c 100644 --- a/ext/phar/tests/tar/badalias.phpt +++ b/ext/phar/tests/tar/badalias.phpt @@ -6,7 +6,7 @@ Phar: invalid aliases <?php if (!extension_loaded("bz2")) die("skip no bz2"); ?> --FILE-- <?php -$e = dirname(__FILE__) . '/files/'; +$e = __DIR__ . '/files/'; for ($i = 1; $i <= 5; $i++) { try { new Phar($e . "badalias$i.phar.tar"); diff --git a/ext/phar/tests/tar/badchecksum.phpt b/ext/phar/tests/tar/badchecksum.phpt index fae19b153d..35b5fc5836 100644 --- a/ext/phar/tests/tar/badchecksum.phpt +++ b/ext/phar/tests/tar/badchecksum.phpt @@ -4,10 +4,10 @@ Phar: tar with bad checksum <?php if (!extension_loaded("phar")) die("skip"); ?> --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; $pname = 'phar://' . $fname; -include dirname(__FILE__) . '/files/corrupt_tarmaker.php.inc'; +include __DIR__ . '/files/corrupt_tarmaker.php.inc'; $a = new corrupt_tarmaker($fname, 'none'); $a->init(); $a->addFile('hithere', 'contents', null, 'checksum'); @@ -23,7 +23,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- phar error: "%sbadchecksum.tar" is a corrupted tar file (checksum mismatch of file "hithere") diff --git a/ext/phar/tests/tar/bignames.phpt b/ext/phar/tests/tar/bignames.phpt index c10b1cea2f..3a10ac7547 100644 --- a/ext/phar/tests/tar/bignames.phpt +++ b/ext/phar/tests/tar/bignames.phpt @@ -6,10 +6,10 @@ Phar: tar with huge filenames phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.tar'; -$fname4 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.4.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.tar'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.3.tar'; +$fname4 = __DIR__ . '/' . basename(__FILE__, '.php') . '.4.tar'; $pname = 'phar://' . $fname; $p1 = new PharData($fname); @@ -43,10 +43,10 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); -@unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.tar'); -@unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.4.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); +@unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.3.tar'); +@unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.4.tar'); ?> --EXPECTF-- hi diff --git a/ext/phar/tests/tar/bignames_overflow.phpt b/ext/phar/tests/tar/bignames_overflow.phpt index 359e9c6341..1d3f9071da 100644 --- a/ext/phar/tests/tar/bignames_overflow.phpt +++ b/ext/phar/tests/tar/bignames_overflow.phpt @@ -6,11 +6,11 @@ Phar: tar with huge filenames, buffer overflow phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.tar'; $pname = 'phar://' . $fname; -include dirname(__FILE__) . '/files/make.dangerous.tar.php.inc'; +include __DIR__ . '/files/make.dangerous.tar.php.inc'; $tar = new danger_tarmaker($fname, 'none'); $tar->init(); @@ -29,8 +29,8 @@ echo $p1[str_repeat('a', 155) . '/' . str_repeat('a', 100)]->getContent() . "\n" ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.tar'); ?> --EXPECT-- a diff --git a/ext/phar/tests/tar/bug49910.phpt b/ext/phar/tests/tar/bug49910.phpt index 6fb66a50a0..e03998bc28 100644 --- a/ext/phar/tests/tar/bug49910.phpt +++ b/ext/phar/tests/tar/bug49910.phpt @@ -5,7 +5,7 @@ Bug #49910: no support for ././@LongLink for long filenames in phar tar support <?php if (!extension_loaded("zlib")) die("skip"); ?> --FILE-- <?php -$fname = str_replace('\\', '/', dirname(__FILE__) . '/files/Structures_Graph-1.0.3.tgz'); +$fname = str_replace('\\', '/', __DIR__ . '/files/Structures_Graph-1.0.3.tgz'); $tar = new PharData($fname); $files = array(); foreach (new RecursiveIteratorIterator($tar) as $file) { diff --git a/ext/phar/tests/tar/bug71317-duplicate-filename.phpt b/ext/phar/tests/tar/bug71317-duplicate-filename.phpt index b8004138bc..ee3219c1db 100644 --- a/ext/phar/tests/tar/bug71317-duplicate-filename.phpt +++ b/ext/phar/tests/tar/bug71317-duplicate-filename.phpt @@ -5,7 +5,7 @@ Bug #71317: regression in opening tar based phar files <?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?> --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; +include __DIR__ . '/files/tarmaker.php.inc'; $testDirectory = __DIR__ . '/files/test_bug71317'; $testTarFilename = __DIR__ . '/files/test_bug71317.tar'; diff --git a/ext/phar/tests/tar/bug71504.phpt b/ext/phar/tests/tar/bug71504.phpt index 178d4ed750..fde572beea 100644 --- a/ext/phar/tests/tar/bug71504.phpt +++ b/ext/phar/tests/tar/bug71504.phpt @@ -5,7 +5,7 @@ Bug #71504: Parsing of tar file with duplicate filenames causes memory leak <?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?> --FILE-- <?php -$fname = str_replace('\\', '/', dirname(__FILE__) . '/files/HTML_CSS-1.5.4.tgz'); +$fname = str_replace('\\', '/', __DIR__ . '/files/HTML_CSS-1.5.4.tgz'); try { $tar = new PharData($fname); } catch(Exception $e) { diff --git a/ext/phar/tests/tar/create_new_and_modify.phpt b/ext/phar/tests/tar/create_new_and_modify.phpt index 8620ca0520..cccc57d8f5 100644 --- a/ext/phar/tests/tar/create_new_and_modify.phpt +++ b/ext/phar/tests/tar/create_new_and_modify.phpt @@ -7,7 +7,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; $pname = 'phar://' . $fname; @unlink($fname); @@ -42,7 +42,7 @@ include $pname . '/b.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?> --EXPECT-- bool(true) brand new! diff --git a/ext/phar/tests/tar/create_new_phar_b.phpt b/ext/phar/tests/tar/create_new_phar_b.phpt index 48738a4313..1b41db6134 100644 --- a/ext/phar/tests/tar/create_new_phar_b.phpt +++ b/ext/phar/tests/tar/create_new_phar_b.phpt @@ -8,14 +8,14 @@ phar.require_hash=1 --FILE-- <?php -file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php', +file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php', 'brand new!'); -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- Warning: file_put_contents(phar://%screate_new_phar_b.phar.tar/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d diff --git a/ext/phar/tests/tar/delete.phpt b/ext/phar/tests/tar/delete.phpt index 3395fa54d1..c34c720d31 100644 --- a/ext/phar/tests/tar/delete.phpt +++ b/ext/phar/tests/tar/delete.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $stub = "<?php Phar::mapPhar('hio'); @@ -25,7 +25,7 @@ echo file_get_contents($alias . '/a') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- a diff --git a/ext/phar/tests/tar/delete_in_phar.phpt b/ext/phar/tests/tar/delete_in_phar.phpt index 1982b6bda9..871f2fe6f4 100644 --- a/ext/phar/tests/tar/delete_in_phar.phpt +++ b/ext/phar/tests/tar/delete_in_phar.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -41,7 +41,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/tar/delete_in_phar_b.phpt b/ext/phar/tests/tar/delete_in_phar_b.phpt index a67bf7a160..466ffcdf07 100644 --- a/ext/phar/tests/tar/delete_in_phar_b.phpt +++ b/ext/phar/tests/tar/delete_in_phar_b.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -34,7 +34,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/tar/delete_in_phar_confirm.phpt b/ext/phar/tests/tar/delete_in_phar_confirm.phpt index 7593ebc1fb..b66656b8c1 100644 --- a/ext/phar/tests/tar/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/tar/delete_in_phar_confirm.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -37,14 +37,14 @@ if ($md5 == $md52) echo 'file was not modified'; ?> ===AFTER=== <?php -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php'; -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/b.php'; -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar/b/c.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar/a.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar/b.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/tar/dir.phpt b/ext/phar/tests/tar/dir.phpt index 64d5d12761..4a83058282 100644 --- a/ext/phar/tests/tar/dir.phpt +++ b/ext/phar/tests/tar/dir.phpt @@ -7,11 +7,11 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php'; $pname2 = 'phar://' . $fname2; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; $pname3 = 'phar://' . $fname3; $phar = new Phar($fname); var_dump($phar->isFileFormat(Phar::TAR)); @@ -31,9 +31,9 @@ var_dump(file_exists($pname2 . '/test/')); var_dump(file_exists($pname3 . '/another/dir/')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> --EXPECT-- bool(true) bool(false) diff --git a/ext/phar/tests/tar/exists_as_phar.phpt b/ext/phar/tests/tar/exists_as_phar.phpt index 9a8cfc81f0..66842cbd33 100644 --- a/ext/phar/tests/tar/exists_as_phar.phpt +++ b/ext/phar/tests/tar/exists_as_phar.phpt @@ -8,8 +8,8 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$tname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$tname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://hio'; $phar = new Phar($fname); @@ -30,8 +30,8 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- phar tar error: "%sexists_as_phar.phar.tar" already exists as a regular phar and must be deleted from disk prior to creating as a tar-based phar diff --git a/ext/phar/tests/tar/links.phpt b/ext/phar/tests/tar/links.phpt index d702cacc45..0964cd7fab 100644 --- a/ext/phar/tests/tar/links.phpt +++ b/ext/phar/tests/tar/links.phpt @@ -6,8 +6,8 @@ Phar: tar with hard link and symbolic link phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; -copy(dirname(__FILE__) . '/files/links.tar', $fname); +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; +copy(__DIR__ . '/files/links.tar', $fname); try { $p = new PharData($fname); } catch (Exception $e) { @@ -22,7 +22,7 @@ var_dump($p['testit/link']->getContent()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECT-- string(3) "hi diff --git a/ext/phar/tests/tar/links2.phpt b/ext/phar/tests/tar/links2.phpt index 1939e002bd..ebeb27732d 100644 --- a/ext/phar/tests/tar/links2.phpt +++ b/ext/phar/tests/tar/links2.phpt @@ -4,10 +4,10 @@ Phar: tar with hard link to nowhere <?php if (!extension_loaded("phar")) die("skip"); ?> --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.tar'; $pname = 'phar://' . $fname; -include dirname(__FILE__) . '/files/corrupt_tarmaker.php.inc'; +include __DIR__ . '/files/corrupt_tarmaker.php.inc'; $a = new corrupt_tarmaker($fname, 'none'); $a->init(); $a->addFile('hardlink', 'internal/file.txt', array( @@ -28,7 +28,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); ?> --EXPECTF-- phar error: "%slinks2.tar" is a corrupted tar file - hard link to non-existent file "internal/file.txt" diff --git a/ext/phar/tests/tar/links3.phpt b/ext/phar/tests/tar/links3.phpt index def399e260..5c41a00ace 100644 --- a/ext/phar/tests/tar/links3.phpt +++ b/ext/phar/tests/tar/links3.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 --FILE-- <?php try { - $p = new PharData(dirname(__FILE__) . '/files/biglink.tar'); + $p = new PharData(__DIR__ . '/files/biglink.tar'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/tar/links4.phpt b/ext/phar/tests/tar/links4.phpt index 1d658a72e9..638c47f69c 100644 --- a/ext/phar/tests/tar/links4.phpt +++ b/ext/phar/tests/tar/links4.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 --FILE-- <?php try { - $p = new PharData(dirname(__FILE__) . '/files/tinylink.tar'); + $p = new PharData(__DIR__ . '/files/tinylink.tar'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/tar/links5.phpt b/ext/phar/tests/tar/links5.phpt index 6d11d3eb85..0639b9b415 100644 --- a/ext/phar/tests/tar/links5.phpt +++ b/ext/phar/tests/tar/links5.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 --FILE-- <?php try { - $p = new PharData(dirname(__FILE__) . '/files/subdirlink.tar'); + $p = new PharData(__DIR__ . '/files/subdirlink.tar'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/tar/links6.phpt b/ext/phar/tests/tar/links6.phpt index e26b8379f7..811272c57a 100644 --- a/ext/phar/tests/tar/links6.phpt +++ b/ext/phar/tests/tar/links6.phpt @@ -8,11 +8,11 @@ if (!extension_loaded("phar")) die("skip"); phar.require_hash=0 --FILE-- <?php -echo file_get_contents('phar://' . dirname(__FILE__) . '/files/links.phar.tar/link2'); -echo file_get_contents('phar://' . dirname(__FILE__) . '/files/links.phar.tar/link1'); -echo file_get_contents('phar://' . dirname(__FILE__) . '/files/links.phar.tar/testit.txt'); +echo file_get_contents('phar://' . __DIR__ . '/files/links.phar.tar/link2'); +echo file_get_contents('phar://' . __DIR__ . '/files/links.phar.tar/link1'); +echo file_get_contents('phar://' . __DIR__ . '/files/links.phar.tar/testit.txt'); -$a = fopen('phar://' . dirname(__FILE__) . '/files/links.phar.tar/link2', 'r'); +$a = fopen('phar://' . __DIR__ . '/files/links.phar.tar/link2', 'r'); fseek($a, 3); echo fread($a, 10); ?> diff --git a/ext/phar/tests/tar/open_for_write_existing.phpt b/ext/phar/tests/tar/open_for_write_existing.phpt index 641e5ce21d..67b59d4ad7 100644 --- a/ext/phar/tests/tar/open_for_write_existing.phpt +++ b/ext/phar/tests/tar/open_for_write_existing.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -36,7 +36,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECT-- extra ===DONE=== diff --git a/ext/phar/tests/tar/open_for_write_existing_b.phpt b/ext/phar/tests/tar/open_for_write_existing_b.phpt index 4c67def631..fda72c36e8 100644 --- a/ext/phar/tests/tar/open_for_write_existing_b.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_b.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -39,7 +39,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_existing_b.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_existing_c.phpt b/ext/phar/tests/tar/open_for_write_existing_c.phpt index 9e73f1e899..03ebf35912 100644 --- a/ext/phar/tests/tar/open_for_write_existing_c.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_c.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -39,7 +39,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_existing_c.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_newfile.phpt b/ext/phar/tests/tar/open_for_write_newfile.phpt index 31e9d4a7e9..f2f5d945d7 100644 --- a/ext/phar/tests/tar/open_for_write_newfile.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -37,7 +37,7 @@ include $alias . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECT-- This is b/c extra diff --git a/ext/phar/tests/tar/open_for_write_newfile_b.phpt b/ext/phar/tests/tar/open_for_write_newfile_b.phpt index 5c57587234..cc4333150a 100644 --- a/ext/phar/tests/tar/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_b.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -40,7 +40,7 @@ include $alias . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_newfile_c.phpt b/ext/phar/tests/tar/open_for_write_newfile_c.phpt index b5078426fe..36b5a423d1 100644 --- a/ext/phar/tests/tar/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_c.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -39,7 +39,7 @@ include $alias . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d diff --git a/ext/phar/tests/tar/phar_begin_setstub_commit.phpt b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt index b7e9c708ca..9be6f2cf7b 100644 --- a/ext/phar/tests/tar/phar_begin_setstub_commit.phpt +++ b/ext/phar/tests/tar/phar_begin_setstub_commit.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.readonly=0 --FILE-- <?php -$p = new Phar(dirname(__FILE__) . '/phar_begin_setstub_commit.phar.tar', 0, 'phar_begin_setstub_commit.phar'); +$p = new Phar(__DIR__ . '/phar_begin_setstub_commit.phar.tar', 0, 'phar_begin_setstub_commit.phar'); var_dump($p->isFileFormat(Phar::TAR)); //var_dump($p->getStub()); var_dump($p->isBuffering()); @@ -32,7 +32,7 @@ var_dump($p->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_begin_setstub_commit.phar.tar'); +unlink(__DIR__ . '/phar_begin_setstub_commit.phar.tar'); ?> --EXPECTF-- bool(true) diff --git a/ext/phar/tests/tar/phar_buildfromiterator4.phpt b/ext/phar/tests/tar/phar_buildfromiterator4.phpt index 051b3c2978..5e82d88550 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator4.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator4.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . 'phpt')))); var_dump($phar->isFileFormat(Phar::TAR)); } catch (Exception $e) { @@ -48,7 +48,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar'); +unlink(__DIR__ . '/buildfromiterator.phar.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/phar_buildfromiterator5.phpt b/ext/phar/tests/tar/phar_buildfromiterator5.phpt index dcb610fb1e..5467165973 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator5.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass)))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar'); +unlink(__DIR__ . '/buildfromiterator.phar.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/phar_buildfromiterator6.phpt b/ext/phar/tests/tar/phar_buildfromiterator6.phpt index 927ebec738..981310f15e 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator6.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator6.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt')))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar'); +unlink(__DIR__ . '/buildfromiterator.phar.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/phar_buildfromiterator7.phpt b/ext/phar/tests/tar/phar_buildfromiterator7.phpt index f123c10e81..9f145cdbc8 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator7.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator7.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt')))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar'); +unlink(__DIR__ . '/buildfromiterator.phar.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/phar_buildfromiterator8.phpt b/ext/phar/tests/tar/phar_buildfromiterator8.phpt index c2fcd1d264..27b480da6f 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator8.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator8.phpt @@ -7,9 +7,9 @@ phar.readonly=0 --FILE-- <?php try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar'); - $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^frontcontroller\d{0,2}\.phar\.phpt\\z|^\.\\z|^\.\.\\z/'), dirname(__FILE__) . DIRECTORY_SEPARATOR); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); + $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^frontcontroller\d{0,2}\.phar\.phpt\\z|^\.\\z|^\.\.\\z/'), __DIR__ . DIRECTORY_SEPARATOR); asort($a); var_dump($a); var_dump($phar->isFileFormat(Phar::TAR)); @@ -21,7 +21,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar'); +unlink(__DIR__ . '/buildfromiterator.phar.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/phar_buildfromiterator9.phpt b/ext/phar/tests/tar/phar_buildfromiterator9.phpt index d6be8fd9bc..998d6653da 100644 --- a/ext/phar/tests/tar/phar_buildfromiterator9.phpt +++ b/ext/phar/tests/tar/phar_buildfromiterator9.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.tar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.tar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => $a = fopen(basename(__FILE__, 'php') . 'phpt', 'r'))))); fclose($a); } catch (Exception $e) { @@ -48,7 +48,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.tar'); +unlink(__DIR__ . '/buildfromiterator.phar.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/phar_commitwrite.phpt b/ext/phar/tests/tar/phar_commitwrite.phpt index 1f6d744917..391be219cc 100644 --- a/ext/phar/tests/tar/phar_commitwrite.phpt +++ b/ext/phar/tests/tar/phar_commitwrite.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$p = new Phar(dirname(__FILE__) . '/phar_commitwrite.phar.tar', 0, 'phar_commitwrite.phar'); +$p = new Phar(__DIR__ . '/phar_commitwrite.phar.tar', 0, 'phar_commitwrite.phar'); $p['file1.txt'] = 'hi'; $p->stopBuffering(); var_dump($p->getStub()); @@ -26,7 +26,7 @@ var_dump($p->isFileFormat(Phar::TAR)); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_commitwrite.phar.tar'); +unlink(__DIR__ . '/phar_commitwrite.phar.tar'); ?> --EXPECTF-- string(60) "<?php // tar-based phar archive stub file diff --git a/ext/phar/tests/tar/phar_convert_phar.phpt b/ext/phar/tests/tar/phar_convert_phar.phpt index df13006d79..e121cf6f7b 100644 --- a/ext/phar/tests/tar/phar_convert_phar.phpt +++ b/ext/phar/tests/tar/phar_convert_phar.phpt @@ -8,9 +8,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.3.phar'; $phar = new Phar($fname); $phar['a.txt'] = 'some text'; @@ -38,11 +38,11 @@ var_dump(strlen($phar->getStub())); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.3.phar'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/tar/phar_convert_phar2.phpt b/ext/phar/tests/tar/phar_convert_phar2.phpt index 1117a75260..d8ca717296 100644 --- a/ext/phar/tests/tar/phar_convert_phar2.phpt +++ b/ext/phar/tests/tar/phar_convert_phar2.phpt @@ -9,8 +9,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar'; $phar = new Phar($fname); $phar['a.txt'] = 'some text'; @@ -40,11 +40,11 @@ var_dump(strlen($phar->getStub())); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/tar/phar_convert_phar3.phpt b/ext/phar/tests/tar/phar_convert_phar3.phpt index 762473f961..443ac26525 100644 --- a/ext/phar/tests/tar/phar_convert_phar3.phpt +++ b/ext/phar/tests/tar/phar_convert_phar3.phpt @@ -9,8 +9,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar'; $phar = new Phar($fname); $phar['a.txt'] = 'some text'; @@ -40,11 +40,11 @@ var_dump(strlen($phar->getStub())); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.bz2'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.bz2'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.bz2'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.bz2'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/tar/phar_convert_phar4.phpt b/ext/phar/tests/tar/phar_convert_phar4.phpt index 7c4c9ace2a..2188debbea 100644 --- a/ext/phar/tests/tar/phar_convert_phar4.phpt +++ b/ext/phar/tests/tar/phar_convert_phar4.phpt @@ -9,8 +9,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar'; $phar = new Phar($fname); $phar['a.txt'] = 'some text'; @@ -45,11 +45,11 @@ var_dump($phar->getMetadata()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.gz'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.gz'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/tar/phar_copy.phpt b/ext/phar/tests/tar/phar_copy.phpt index 782bb4fb5d..61938bf0b5 100644 --- a/ext/phar/tests/tar/phar_copy.phpt +++ b/ext/phar/tests/tar/phar_copy.phpt @@ -9,8 +9,8 @@ phar.require_hash=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar.php'; $pname = 'phar://'.$fname; $iname = '/file.txt'; @@ -45,8 +45,8 @@ echo 'c: ' ,file_get_contents($p2['c']->getPathName()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?> --EXPECTF-- hihibool(true) file "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s diff --git a/ext/phar/tests/tar/phar_magic.phpt b/ext/phar/tests/tar/phar_magic.phpt index 19579dd614..0b1f6bcac1 100644 --- a/ext/phar/tests/tar/phar_magic.phpt +++ b/ext/phar/tests/tar/phar_magic.phpt @@ -7,11 +7,11 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; $p = new Phar($fname); var_dump($p->isFileFormat(Phar::TAR)); $p['a'] = '<?php include "b/c.php";' . "\n"; -$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";'; +$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include __DIR__ . "/../d";'; $p['d'] = "in d\n"; $p->setStub('<?php set_include_path("phar://" . __FILE__); @@ -22,7 +22,7 @@ include $fname; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/tar/phar_setalias.phpt b/ext/phar/tests/tar/phar_setalias.phpt index ffdd508c31..59da7bb984 100644 --- a/ext/phar/tests/tar/phar_setalias.phpt +++ b/ext/phar/tests/tar/phar_setalias.phpt @@ -8,8 +8,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar.tar'; $phar = new Phar($fname); $phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>'); @@ -40,8 +40,8 @@ echo $a->getAlias() . "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phartmp.tar'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/tar/phar_setalias2.phpt b/ext/phar/tests/tar/phar_setalias2.phpt index 115b986617..8179cf2cd5 100644 --- a/ext/phar/tests/tar/phar_setalias2.phpt +++ b/ext/phar/tests/tar/phar_setalias2.phpt @@ -8,7 +8,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $phar = new Phar($fname); $phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>'); @@ -30,7 +30,7 @@ echo $phar->getAlias() . "\n"; $phar->setAlias('test'); echo $phar->getAlias() . "\n"; $b = $phar; -$phar = new Phar(dirname(__FILE__) . '/notphar.phar'); +$phar = new Phar(__DIR__ . '/notphar.phar'); try { $phar->setAlias('test'); @@ -42,8 +42,8 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phartmp.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/phar_setdefaultstub.phpt b/ext/phar/tests/tar/phar_setdefaultstub.phpt index f0db276722..bea53cdce3 100644 --- a/ext/phar/tests/tar/phar_setdefaultstub.phpt +++ b/ext/phar/tests/tar/phar_setdefaultstub.phpt @@ -7,7 +7,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $phar = new Phar($fname); $phar['a.php'] = '<php echo "this is a\n"; ?>'; @@ -56,7 +56,7 @@ var_dump($phar->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- string(51) "<?php echo "Hello World\n"; __HALT_COMPILER(); ?> diff --git a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt index c16e7523f8..4fb558bd72 100644 --- a/ext/phar/tests/tar/phar_setsignaturealgo2.phpt +++ b/ext/phar/tests/tar/phar_setsignaturealgo2.phpt @@ -11,7 +11,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $p = new Phar($fname); $p['file1.txt'] = 'hi'; var_dump($p->getSignature()); @@ -32,9 +32,9 @@ var_dump($p->getSignature()); echo $e->getMessage(); } try { -$config = dirname(__FILE__) . '/../files/openssl.cnf'; +$config = __DIR__ . '/../files/openssl.cnf'; $config_arg = array('config' => $config); -$private = openssl_get_privatekey(file_get_contents(dirname(dirname(__FILE__)) . '/files/private.pem')); +$private = openssl_get_privatekey(file_get_contents(dirname(__DIR__) . '/files/private.pem')); $pkey = ''; openssl_pkey_export($private, $pkey, NULL, $config_arg); $p->setSignatureAlgorithm(Phar::OPENSSL, $pkey); @@ -46,7 +46,7 @@ echo $e->getMessage(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- array(2) { diff --git a/ext/phar/tests/tar/phar_stub.phpt b/ext/phar/tests/tar/phar_stub.phpt index 3d8e2874ef..f6709280bd 100644 --- a/ext/phar/tests/tar/phar_stub.phpt +++ b/ext/phar/tests/tar/phar_stub.phpt @@ -7,8 +7,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php'; -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.tar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar.php'; $pname = 'phar://' . $fname; $pname2 = 'phar://' . $fname2; @@ -28,7 +28,7 @@ $file = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>'; $phar->setStub($file); echo $phar->getStub(); -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phartmp.php'; $file = '<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; $fp = fopen($fname3, 'wb'); fwrite($fp, $file); @@ -60,9 +60,9 @@ echo $phar->getStub(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.tar.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/tar/phar_stub_error.phpt b/ext/phar/tests/tar/phar_stub_error.phpt index fc22bcb16b..b1dc49f927 100644 --- a/ext/phar/tests/tar/phar_stub_error.phpt +++ b/ext/phar/tests/tar/phar_stub_error.phpt @@ -8,7 +8,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $phar = new Phar($fname); $stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>' ."\r\n"; @@ -38,7 +38,7 @@ var_dump($phar->getStub() == $stub); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/tar/refcount1.phpt b/ext/phar/tests/tar/refcount1.phpt index 7b4f05417a..9351b566a6 100644 --- a/ext/phar/tests/tar/refcount1.phpt +++ b/ext/phar/tests/tar/refcount1.phpt @@ -7,8 +7,8 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +include __DIR__ . '/files/tarmaker.php.inc'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $tar = new tarmaker($fname, 'none'); @@ -48,7 +48,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- ===CLOSE=== object(PharFileInfo)#%d (2) { diff --git a/ext/phar/tests/tar/rename.phpt b/ext/phar/tests/tar/rename.phpt index 96588a6596..8774fb2581 100644 --- a/ext/phar/tests/tar/rename.phpt +++ b/ext/phar/tests/tar/rename.phpt @@ -7,8 +7,8 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +include __DIR__ . '/files/tarmaker.php.inc'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $tar = new tarmaker($fname, 'none'); @@ -34,7 +34,7 @@ echo file_get_contents($alias . '/b') . "\n"; echo file_get_contents($alias . '/a') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- a a diff --git a/ext/phar/tests/tar/rename_dir.phpt b/ext/phar/tests/tar/rename_dir.phpt index 0b9578945a..f0b8a9b00e 100644 --- a/ext/phar/tests/tar/rename_dir.phpt +++ b/ext/phar/tests/tar/rename_dir.phpt @@ -7,8 +7,8 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +include __DIR__ . '/files/tarmaker.php.inc'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $tar = new tarmaker($fname, 'none'); @@ -34,7 +34,7 @@ echo file_get_contents($alias . '/b/x') . "\n"; echo file_get_contents($alias . '/a/x') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- a a diff --git a/ext/phar/tests/tar/require_hash.phpt b/ext/phar/tests/tar/require_hash.phpt index aefbdb9c27..a8bf6eb575 100644 --- a/ext/phar/tests/tar/require_hash.phpt +++ b/ext/phar/tests/tar/require_hash.phpt @@ -8,10 +8,10 @@ phar.require_hash=0 --FILE-- <?php ini_set('phar.require_hash', 1); -include dirname(__FILE__) . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/require_hash.phar.tar'; +include __DIR__ . '/files/tarmaker.php.inc'; +$fname = __DIR__ . '/require_hash.phar.tar'; $alias = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/require_hash.tar'; +$fname2 = __DIR__ . '/require_hash.tar'; $tar = new tarmaker($fname, 'none'); $tar->init(); @@ -41,8 +41,8 @@ try { ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/require_hash.phar.tar'); -@unlink(dirname(__FILE__) . '/require_hash.tar'); +@unlink(__DIR__ . '/require_hash.phar.tar'); +@unlink(__DIR__ . '/require_hash.tar'); ?> --EXPECTF-- tar-based phar "%srequire_hash.phar.tar" does not have a signature diff --git a/ext/phar/tests/tar/rmdir.phpt b/ext/phar/tests/tar/rmdir.phpt index be037823d6..8e7b30b0f3 100644 --- a/ext/phar/tests/tar/rmdir.phpt +++ b/ext/phar/tests/tar/rmdir.phpt @@ -7,8 +7,8 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar'; +include __DIR__ . '/files/tarmaker.php.inc'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.tar'; $alias = 'phar://' . $fname; $tar = new tarmaker($fname, 'none'); @@ -36,7 +36,7 @@ unlink($alias . '/a/x'); var_dump(rmdir($alias . '/a')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- a diff --git a/ext/phar/tests/tar/tar_001.phpt b/ext/phar/tests/tar/tar_001.phpt index a2c4f36fa3..5eabc301a9 100644 --- a/ext/phar/tests/tar/tar_001.phpt +++ b/ext/phar/tests/tar/tar_001.phpt @@ -4,16 +4,16 @@ Phar: tar-based phar corrupted <?php if (!extension_loaded('phar')) die('skip'); ?> --FILE-- <?php -include dirname(__FILE__) . '/files/make_invalid_tar.php.inc'; +include __DIR__ . '/files/make_invalid_tar.php.inc'; -$tar = new corrupter(dirname(__FILE__) . '/tar_001.phar.tar', 'none'); +$tar = new corrupter(__DIR__ . '/tar_001.phar.tar', 'none'); $tar->init(); $tar->addFile('tar_001.phpt', __FILE__); $tar->close(); -$tar = fopen('phar://' . dirname(__FILE__) . '/tar_001.phar.tar/tar_001.phpt', 'rb'); +$tar = fopen('phar://' . __DIR__ . '/tar_001.phar.tar/tar_001.phpt', 'rb'); try { - $phar = new Phar(dirname(__FILE__) . '/tar_001.phar.tar'); + $phar = new Phar(__DIR__ . '/tar_001.phar.tar'); echo "should not execute\n"; } catch (Exception $e) { echo $e->getMessage() . "\n"; @@ -22,7 +22,7 @@ try { ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_001.phar.tar'); +@unlink(__DIR__ . '/tar_001.phar.tar'); ?> --EXPECTF-- Warning: fopen(phar://%star_001.phar.tar/tar_001.phpt): failed to open stream: phar error: "%star_001.phar.tar" is a corrupted tar file (truncated) in %star_001.php on line 9 diff --git a/ext/phar/tests/tar/tar_002.phpt b/ext/phar/tests/tar/tar_002.phpt index 7fc09c806f..38623a4030 100644 --- a/ext/phar/tests/tar/tar_002.phpt +++ b/ext/phar/tests/tar/tar_002.phpt @@ -6,17 +6,17 @@ Phar: tar-based phar corrupted 2 phar.readonly=0 --FILE-- <?php -include dirname(__FILE__) . '/files/make_invalid_tar.php.inc'; +include __DIR__ . '/files/make_invalid_tar.php.inc'; -$tar = new corrupter(dirname(__FILE__) . '/tar_002.phar.tar', 'none'); +$tar = new corrupter(__DIR__ . '/tar_002.phar.tar', 'none'); $tar->init(); $tar->addFile('tar_002.phpt', __FILE__); $tar->close(); -$tar = fopen('phar://' . dirname(__FILE__) . '/tar_002.phar.tar/tar_002.phpt', 'rb'); +$tar = fopen('phar://' . __DIR__ . '/tar_002.phar.tar/tar_002.phpt', 'rb'); try { - $phar = new Phar(dirname(__FILE__) . '/tar_002.phar.tar'); + $phar = new Phar(__DIR__ . '/tar_002.phar.tar'); echo "should not execute\n"; } catch (Exception $e) { echo $e->getMessage() . "\n"; @@ -25,7 +25,7 @@ try { ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_002.phar.tar'); +@unlink(__DIR__ . '/tar_002.phar.tar'); ?> --EXPECTF-- Warning: fopen(phar://%star_002.phar.tar/tar_002.phpt): failed to open stream: phar error: "%star_002.phar.tar" is a corrupted tar file (truncated) in %star_002.php on line 9 diff --git a/ext/phar/tests/tar/tar_003.phpt b/ext/phar/tests/tar/tar_003.phpt index fe7e1d854e..9cec9451e1 100644 --- a/ext/phar/tests/tar/tar_003.phpt +++ b/ext/phar/tests/tar/tar_003.phpt @@ -7,9 +7,9 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; +include __DIR__ . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/tar_003.phar.tar'; +$fname = __DIR__ . '/tar_003.phar.tar'; $alias = 'phar://' . $fname; $tar = new tarmaker($fname, 'none'); @@ -50,7 +50,7 @@ closedir($tar); ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_003.phar.tar'); +@unlink(__DIR__ . '/tar_003.phar.tar'); ?> --EXPECT-- hi there! diff --git a/ext/phar/tests/tar/tar_004.phpt b/ext/phar/tests/tar/tar_004.phpt index d142857388..42473d5818 100644 --- a/ext/phar/tests/tar/tar_004.phpt +++ b/ext/phar/tests/tar/tar_004.phpt @@ -9,9 +9,9 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; +include __DIR__ . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/tar_004.phar.tar'; +$fname = __DIR__ . '/tar_004.phar.tar'; $alias = 'phar://' . $fname; $tar = new tarmaker($fname, 'none'); @@ -32,7 +32,7 @@ include $fname; ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_004.phar.tar'); +@unlink(__DIR__ . '/tar_004.phar.tar'); ?> --EXPECTF-- string(9) "it worked" diff --git a/ext/phar/tests/tar/tar_bz2.phpt b/ext/phar/tests/tar/tar_bz2.phpt index d7e6dc0e26..28fd25aa52 100644 --- a/ext/phar/tests/tar/tar_bz2.phpt +++ b/ext/phar/tests/tar/tar_bz2.phpt @@ -10,11 +10,11 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; +include __DIR__ . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/tar_bz2.phar'; +$fname = __DIR__ . '/tar_bz2.phar'; $alias = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/tar_bz2.phar.tar'; +$fname2 = __DIR__ . '/tar_bz2.phar.tar'; $alias2 = 'phar://' . $fname2; $tar = new tarmaker($fname, 'bz2'); @@ -48,8 +48,8 @@ var_dump($phar2->isCompressed() == Phar::BZ2); ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_bz2.phar'); -@unlink(dirname(__FILE__) . '/tar_bz2.phar.tar'); +@unlink(__DIR__ . '/tar_bz2.phar'); +@unlink(__DIR__ . '/tar_bz2.phar.tar'); ?> --EXPECTF-- string(%d) "%star_bz2.phar" diff --git a/ext/phar/tests/tar/tar_gzip.phpt b/ext/phar/tests/tar/tar_gzip.phpt index f64962c8c8..66ab150cb7 100644 --- a/ext/phar/tests/tar/tar_gzip.phpt +++ b/ext/phar/tests/tar/tar_gzip.phpt @@ -10,10 +10,10 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/tar_gzip.phar'; +include __DIR__ . '/files/tarmaker.php.inc'; +$fname = __DIR__ . '/tar_gzip.phar'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/tar_gzip.phar.tar'; +$fname2 = __DIR__ . '/tar_gzip.phar.tar'; $pname2 = 'phar://' . $fname2; $a = new tarmaker($fname, 'zlib'); @@ -41,8 +41,8 @@ var_dump($b->isCompressed() == Phar::GZ); ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_gzip.phar'); -@unlink(dirname(__FILE__) . '/tar_gzip.phar.tar'); +@unlink(__DIR__ . '/tar_gzip.phar'); +@unlink(__DIR__ . '/tar_gzip.phar.tar'); ?> --EXPECTF-- string(9) "it worked" diff --git a/ext/phar/tests/tar/tar_makebz2.phpt b/ext/phar/tests/tar/tar_makebz2.phpt index 91b0da7c72..7eccb3f7c3 100644 --- a/ext/phar/tests/tar/tar_makebz2.phpt +++ b/ext/phar/tests/tar/tar_makebz2.phpt @@ -8,9 +8,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/tar_makebz2.phar.tar'; -$fname2 = dirname(__FILE__) . '/tar_makebz2.phar.tar.bz2'; -$fname3 = dirname(__FILE__) . '/tar_makebz2_b.phar.tar.bz2'; +$fname = __DIR__ . '/tar_makebz2.phar.tar'; +$fname2 = __DIR__ . '/tar_makebz2.phar.tar.bz2'; +$fname3 = __DIR__ . '/tar_makebz2_b.phar.tar.bz2'; $phar = new Phar($fname); $phar['test'] = 'hi'; @@ -27,10 +27,10 @@ var_dump($phar2->isCompressed() == Phar::BZ2); ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_makebz2.phar.bz2'); -@unlink(dirname(__FILE__) . '/tar_makebz2.phar.tar'); -@unlink(dirname(__FILE__) . '/tar_makebz2.phar.tar.bz2'); -@unlink(dirname(__FILE__) . '/tar_makebz2_b.phar.tar.bz2'); +@unlink(__DIR__ . '/tar_makebz2.phar.bz2'); +@unlink(__DIR__ . '/tar_makebz2.phar.tar'); +@unlink(__DIR__ . '/tar_makebz2.phar.tar.bz2'); +@unlink(__DIR__ . '/tar_makebz2_b.phar.tar.bz2'); ?> --EXPECT-- bool(true) diff --git a/ext/phar/tests/tar/tar_makegz.phpt b/ext/phar/tests/tar/tar_makegz.phpt index 93d515280a..244e465722 100644 --- a/ext/phar/tests/tar/tar_makegz.phpt +++ b/ext/phar/tests/tar/tar_makegz.phpt @@ -8,9 +8,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/tar_makegz.phar.tar'; -$fname2 = dirname(__FILE__) . '/tar_makegz.phar.tar.gz'; -$fname3 = dirname(__FILE__) . '/tar_makegz_b.phar.tar.gz'; +$fname = __DIR__ . '/tar_makegz.phar.tar'; +$fname2 = __DIR__ . '/tar_makegz.phar.tar.gz'; +$fname3 = __DIR__ . '/tar_makegz_b.phar.tar.gz'; $phar = new Phar($fname); $phar['test'] = 'hi'; @@ -28,10 +28,10 @@ var_dump($phar2->isCompressed() == Phar::GZ); ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_makegz.phar.gz'); -@unlink(dirname(__FILE__) . '/tar_makegz.phar.tar'); -@unlink(dirname(__FILE__) . '/tar_makegz.phar.tar.gz'); -@unlink(dirname(__FILE__) . '/tar_makegz_b.phar.tar.gz'); +@unlink(__DIR__ . '/tar_makegz.phar.gz'); +@unlink(__DIR__ . '/tar_makegz.phar.tar'); +@unlink(__DIR__ . '/tar_makegz.phar.tar.gz'); +@unlink(__DIR__ . '/tar_makegz_b.phar.tar.gz'); ?> --EXPECT-- bool(true) diff --git a/ext/phar/tests/tar/tar_nohash.phpt b/ext/phar/tests/tar/tar_nohash.phpt index 3d1d0010a0..a97f347b3c 100644 --- a/ext/phar/tests/tar/tar_nohash.phpt +++ b/ext/phar/tests/tar/tar_nohash.phpt @@ -9,7 +9,7 @@ phar.require_hash=1 --FILE-- <?php try { - $phar = new PharData(dirname(__FILE__) . '/files/Net_URL-1.0.15.tgz'); + $phar = new PharData(__DIR__ . '/files/Net_URL-1.0.15.tgz'); var_dump($phar->getStub()); } catch (Exception $e) { echo $e->getMessage()."\n"; diff --git a/ext/phar/tests/tar/tar_nostub.phpt b/ext/phar/tests/tar/tar_nostub.phpt index 8f91c74d59..d71f834280 100644 --- a/ext/phar/tests/tar/tar_nostub.phpt +++ b/ext/phar/tests/tar/tar_nostub.phpt @@ -7,10 +7,10 @@ phar.readonly=1 phar.require_hash=0 --FILE-- <?php -include dirname(__FILE__) . '/files/tarmaker.php.inc'; -$fname = dirname(__FILE__) . '/tar_nostub.phar.tar'; +include __DIR__ . '/files/tarmaker.php.inc'; +$fname = __DIR__ . '/tar_nostub.phar.tar'; $alias = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/tar_nostub.tar'; +$fname2 = __DIR__ . '/tar_nostub.tar'; $tar = new tarmaker($fname, 'none'); $tar->init(); @@ -38,8 +38,8 @@ try { ===DONE=== --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/tar_nostub.phar.tar'); -@unlink(dirname(__FILE__) . '/tar_nostub.tar'); +@unlink(__DIR__ . '/tar_nostub.phar.tar'); +@unlink(__DIR__ . '/tar_nostub.tar'); ?> --EXPECTF-- RecursiveDirectoryIterator::__construct(phar://%star_nostub.phar.tar/): failed to open dir: '%star_nostub.phar.tar' is not a phar archive. Use PharData::__construct() for a standard zip or tar archive diff --git a/ext/phar/tests/tar/tar_openssl_hash.phpt b/ext/phar/tests/tar/tar_openssl_hash.phpt index 075136f687..030ee79db4 100644 --- a/ext/phar/tests/tar/tar_openssl_hash.phpt +++ b/ext/phar/tests/tar/tar_openssl_hash.phpt @@ -10,7 +10,7 @@ phar.require_hash=1 --FILE-- <?php try { - $phar = new PharData(dirname(__FILE__) . '/files/P1-1.0.0.tgz'); + $phar = new PharData(__DIR__ . '/files/P1-1.0.0.tgz'); } catch (Exception $e) { echo $e->getMessage()."\n"; } diff --git a/ext/phar/tests/tar/truncated.phpt b/ext/phar/tests/tar/truncated.phpt index fbcabb7986..66148a7d28 100644 --- a/ext/phar/tests/tar/truncated.phpt +++ b/ext/phar/tests/tar/truncated.phpt @@ -5,7 +5,7 @@ Phar: truncated tar --FILE-- <?php try { - $p = new PharData(dirname(__FILE__) . '/files/trunc.tar'); + $p = new PharData(__DIR__ . '/files/trunc.tar'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } @@ -14,8 +14,8 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- phar error: "%strunc.tar" is a corrupted tar file (truncated) diff --git a/ext/phar/tests/test_alias_unset.phpt b/ext/phar/tests/test_alias_unset.phpt index de13acc315..fe0ffa970f 100644 --- a/ext/phar/tests/test_alias_unset.phpt +++ b/ext/phar/tests/test_alias_unset.phpt @@ -6,9 +6,9 @@ Phar: test for the odd case where we intend to remove an archive from memory phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; $pname2 = 'phar://' . $fname2; $phar = new Phar($fname); @@ -35,8 +35,8 @@ $a = file_get_contents($pname . '/file1.txt'); // this fails because $fname2 ref ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> --EXPECTF-- Cannot open archive "%stest_alias_unset.2.phar.php", alias is already in use by existing archive string(5) "first" diff --git a/ext/phar/tests/test_signaturealgos.phpt b/ext/phar/tests/test_signaturealgos.phpt index 7cbf6c0513..e60554bd0c 100644 --- a/ext/phar/tests/test_signaturealgos.phpt +++ b/ext/phar/tests/test_signaturealgos.phpt @@ -13,19 +13,19 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$a = new Phar(dirname(__FILE__) . '/files/sha1.phar'); +$a = new Phar(__DIR__ . '/files/sha1.phar'); $r = $a->getSignature(); var_dump($r['hash_type']); -$a = new Phar(dirname(__FILE__) . '/files/sha512.phar'); +$a = new Phar(__DIR__ . '/files/sha512.phar'); $r = $a->getSignature(); var_dump($r['hash_type']); -$a = new Phar(dirname(__FILE__) . '/files/sha256.phar'); +$a = new Phar(__DIR__ . '/files/sha256.phar'); $r = $a->getSignature(); var_dump($r['hash_type']); -$a = new Phar(dirname(__FILE__) . '/files/md5.phar'); +$a = new Phar(__DIR__ . '/files/md5.phar'); $r = $a->getSignature(); var_dump($r['hash_type']); -$a = new Phar(dirname(__FILE__) . '/files/openssl.phar'); +$a = new Phar(__DIR__ . '/files/openssl.phar'); $r = $a->getSignature(); var_dump($r['hash_type']); ?> diff --git a/ext/phar/tests/test_unset.phpt b/ext/phar/tests/test_unset.phpt index ae84823bc5..a512d71469 100644 --- a/ext/phar/tests/test_unset.phpt +++ b/ext/phar/tests/test_unset.phpt @@ -6,8 +6,8 @@ Phar: ensure unset() works properly on a non-flushed phar archive phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; if (file_exists($fname)) unlink($fname); if (file_exists($fname2)) unlink($fname2); @@ -33,8 +33,8 @@ var_dump(file_exists($fname)); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> --EXPECTF-- NULL string(%d) "%stest_unset.phar.php" diff --git a/ext/phar/tests/withphar.phpt b/ext/phar/tests/withphar.phpt index 26c86d2f1b..51cfbce01f 100644 --- a/ext/phar/tests/withphar.phpt +++ b/ext/phar/tests/withphar.phpt @@ -4,7 +4,7 @@ Phar: phar run with ext/phar with default stub <?php if (!extension_loaded("phar")) die("skip"); ?> --FILE-- <?php -include dirname(__FILE__) . '/files/nophar.phar'; +include __DIR__ . '/files/nophar.phar'; ?> ===DONE=== --EXPECT-- diff --git a/ext/phar/tests/zf_test.phpt b/ext/phar/tests/zf_test.phpt index c5d587dc9c..b3d1e4cb9a 100644 --- a/ext/phar/tests/zf_test.phpt +++ b/ext/phar/tests/zf_test.phpt @@ -10,9 +10,9 @@ phar.require_hash=0 <?php $file = "zfapp"; -$orig_file = dirname(__FILE__) . "/files/$file.tgz"; -$tgz_file = dirname(__FILE__) . "/$file.tgz"; -$phar_file = dirname(__FILE__) . "/$file.phar.tar.gz"; +$orig_file = __DIR__ . "/files/$file.tgz"; +$tgz_file = __DIR__ . "/$file.tgz"; +$phar_file = __DIR__ . "/$file.phar.tar.gz"; copy($orig_file, $tgz_file); $phar = new PharData($tgz_file); @@ -37,8 +37,8 @@ foreach(new RecursiveIteratorIterator($phar) as $path) { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/zfapp.tgz'); -unlink(dirname(__FILE__) . '/zfapp.phar.tar.gz'); +unlink(__DIR__ . '/zfapp.tgz'); +unlink(__DIR__ . '/zfapp.phar.tar.gz'); ?> --EXPECTF-- phar://%szfapp.phar.tar.gz/application/default/controllers/ErrorController.php diff --git a/ext/phar/tests/zip/033.phpt b/ext/phar/tests/zip/033.phpt index c980758a83..2935531987 100644 --- a/ext/phar/tests/zip/033.phpt +++ b/ext/phar/tests/zip/033.phpt @@ -8,8 +8,8 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; $alias = 'phar://hio'; $phar = new Phar($fname); @@ -41,8 +41,8 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); ?> --EXPECT-- bool(false) diff --git a/ext/phar/tests/zip/033a.phpt b/ext/phar/tests/zip/033a.phpt index dc61148532..e9744b0e3c 100644 --- a/ext/phar/tests/zip/033a.phpt +++ b/ext/phar/tests/zip/033a.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://hio'; $phar = new Phar($fname); @@ -37,7 +37,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- bool(false) diff --git a/ext/phar/tests/zip/alias_acrobatics.phpt b/ext/phar/tests/zip/alias_acrobatics.phpt index 2a58e39efc..36fb9058a5 100644 --- a/ext/phar/tests/zip/alias_acrobatics.phpt +++ b/ext/phar/tests/zip/alias_acrobatics.phpt @@ -7,8 +7,8 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; $p = new Phar($fname); @@ -35,8 +35,8 @@ echo $e->getMessage(),"\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); ?> --EXPECTF-- alias "foo" is already used for archive "%salias_acrobatics.phar.zip" cannot be overloaded with "%salias_acrobatics.2.phar.zip" diff --git a/ext/phar/tests/zip/all.phpt b/ext/phar/tests/zip/all.phpt index 1b9f832fb5..cd410be6c7 100644 --- a/ext/phar/tests/zip/all.phpt +++ b/ext/phar/tests/zip/all.phpt @@ -11,9 +11,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php'; $pname2 = 'phar://' . $fname2; $phar = new Phar($fname); @@ -44,8 +44,8 @@ var_dump($phar['a']->getMetadata()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?> --EXPECT-- bool(false) bool(false) diff --git a/ext/phar/tests/zip/badalias.phpt b/ext/phar/tests/zip/badalias.phpt index 0291c4b089..1ca964d1d6 100644 --- a/ext/phar/tests/zip/badalias.phpt +++ b/ext/phar/tests/zip/badalias.phpt @@ -6,7 +6,7 @@ Phar: invalid aliases <?php if (!extension_loaded("bz2")) die("skip no bz2"); ?> --FILE-- <?php -$e = dirname(__FILE__) . '/files/'; +$e = __DIR__ . '/files/'; for ($i = 1; $i <= 5; $i++) { try { new Phar($e . "badalias$i.phar.zip"); diff --git a/ext/phar/tests/zip/bug48791.phpt b/ext/phar/tests/zip/bug48791.phpt index 5ad1344bd7..b888838fe4 100644 --- a/ext/phar/tests/zip/bug48791.phpt +++ b/ext/phar/tests/zip/bug48791.phpt @@ -5,7 +5,7 @@ Phar: Bug #48791: open office documents always reported as corrupted by phar ext <?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?> --FILE-- <?php -echo file_get_contents('phar://' . dirname(__FILE__) . '/files/test.odt/content.xml'), "\n"; +echo file_get_contents('phar://' . __DIR__ . '/files/test.odt/content.xml'), "\n"; ?> ===DONE=== --EXPECT-- diff --git a/ext/phar/tests/zip/corrupt_001.phpt b/ext/phar/tests/zip/corrupt_001.phpt index 000018aab6..66d1d62ec9 100644 --- a/ext/phar/tests/zip/corrupt_001.phpt +++ b/ext/phar/tests/zip/corrupt_001.phpt @@ -5,12 +5,12 @@ Phar: corrupted zip (count mismatch) --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/count1.zip'); + new PharData(__DIR__ . '/files/count1.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/count2.zip'); + new PharData(__DIR__ . '/files/count2.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_002.phpt b/ext/phar/tests/zip/corrupt_002.phpt index 345d1d81db..7aad946fa8 100644 --- a/ext/phar/tests/zip/corrupt_002.phpt +++ b/ext/phar/tests/zip/corrupt_002.phpt @@ -5,7 +5,7 @@ Phar: corrupted zip (no end of zip record) --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/nozipend.zip'); + new PharData(__DIR__ . '/files/nozipend.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_003.phpt b/ext/phar/tests/zip/corrupt_003.phpt index 40c5ff1877..e076a4eb8f 100644 --- a/ext/phar/tests/zip/corrupt_003.phpt +++ b/ext/phar/tests/zip/corrupt_003.phpt @@ -5,7 +5,7 @@ Phar: corrupted zip (truncated file comment) --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/filecomment.zip'); + new PharData(__DIR__ . '/files/filecomment.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_004.phpt b/ext/phar/tests/zip/corrupt_004.phpt index a36281151d..516fe31e5a 100644 --- a/ext/phar/tests/zip/corrupt_004.phpt +++ b/ext/phar/tests/zip/corrupt_004.phpt @@ -5,7 +5,7 @@ Phar: corrupted zip (central directory offset incorrect) --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/cdir_offset.zip'); + new PharData(__DIR__ . '/files/cdir_offset.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_005.phpt b/ext/phar/tests/zip/corrupt_005.phpt index e3e0d88849..00ac1f6b4e 100644 --- a/ext/phar/tests/zip/corrupt_005.phpt +++ b/ext/phar/tests/zip/corrupt_005.phpt @@ -5,7 +5,7 @@ Phar: encrypted zip --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/encrypted.zip'); + new PharData(__DIR__ . '/files/encrypted.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_006.phpt b/ext/phar/tests/zip/corrupt_006.phpt index dd7937850f..aca7bc572b 100644 --- a/ext/phar/tests/zip/corrupt_006.phpt +++ b/ext/phar/tests/zip/corrupt_006.phpt @@ -5,7 +5,7 @@ Phar: zip with file created from stdin --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/stdin.zip'); + new PharData(__DIR__ . '/files/stdin.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_007.phpt b/ext/phar/tests/zip/corrupt_007.phpt index 52a6c1e792..35efd5b489 100644 --- a/ext/phar/tests/zip/corrupt_007.phpt +++ b/ext/phar/tests/zip/corrupt_007.phpt @@ -5,7 +5,7 @@ Phar: corrupted zip (truncated filename record) --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/truncfilename.zip'); + new PharData(__DIR__ . '/files/truncfilename.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_008.phpt b/ext/phar/tests/zip/corrupt_008.phpt index eb706b7e55..7385b03183 100644 --- a/ext/phar/tests/zip/corrupt_008.phpt +++ b/ext/phar/tests/zip/corrupt_008.phpt @@ -5,77 +5,77 @@ Phar: unsupported compression methods --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/compress_unsup1.zip'); + new PharData(__DIR__ . '/files/compress_unsup1.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup2.zip'); + new PharData(__DIR__ . '/files/compress_unsup2.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup3.zip'); + new PharData(__DIR__ . '/files/compress_unsup3.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup4.zip'); + new PharData(__DIR__ . '/files/compress_unsup4.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup5.zip'); + new PharData(__DIR__ . '/files/compress_unsup5.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup6.zip'); + new PharData(__DIR__ . '/files/compress_unsup6.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup7.zip'); + new PharData(__DIR__ . '/files/compress_unsup7.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup9.zip'); + new PharData(__DIR__ . '/files/compress_unsup9.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup10.zip'); + new PharData(__DIR__ . '/files/compress_unsup10.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup14.zip'); + new PharData(__DIR__ . '/files/compress_unsup14.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup18.zip'); + new PharData(__DIR__ . '/files/compress_unsup18.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup19.zip'); + new PharData(__DIR__ . '/files/compress_unsup19.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup97.zip'); + new PharData(__DIR__ . '/files/compress_unsup97.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsup98.zip'); + new PharData(__DIR__ . '/files/compress_unsup98.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } try { - new PharData(dirname(__FILE__) . '/files/compress_unsupunknown.zip'); + new PharData(__DIR__ . '/files/compress_unsupunknown.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_009.phpt b/ext/phar/tests/zip/corrupt_009.phpt index 0ca80c00c1..ab7594ac30 100644 --- a/ext/phar/tests/zip/corrupt_009.phpt +++ b/ext/phar/tests/zip/corrupt_009.phpt @@ -5,7 +5,7 @@ Phar: corrupted zip (extra field way too long) --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/extralen_toolong.zip'); + new PharData(__DIR__ . '/files/extralen_toolong.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/corrupt_010.phpt b/ext/phar/tests/zip/corrupt_010.phpt index b95a03272a..4643cae070 100644 --- a/ext/phar/tests/zip/corrupt_010.phpt +++ b/ext/phar/tests/zip/corrupt_010.phpt @@ -5,7 +5,7 @@ Phar: unable to process zip (zip spanning multiple archives) --FILE-- <?php try { - new PharData(dirname(__FILE__) . '/files/disknumber.zip'); + new PharData(__DIR__ . '/files/disknumber.zip'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/create_new_and_modify.phpt b/ext/phar/tests/zip/create_new_and_modify.phpt index 3ff2346f67..302355794e 100644 --- a/ext/phar/tests/zip/create_new_and_modify.phpt +++ b/ext/phar/tests/zip/create_new_and_modify.phpt @@ -7,7 +7,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; $pname = 'phar://' . $fname; @unlink($fname); @@ -42,7 +42,7 @@ include $pname . '/b.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> --EXPECT-- bool(true) brand new! diff --git a/ext/phar/tests/zip/create_new_phar_b.phpt b/ext/phar/tests/zip/create_new_phar_b.phpt index c0cb256925..d8a72c9d42 100644 --- a/ext/phar/tests/zip/create_new_phar_b.phpt +++ b/ext/phar/tests/zip/create_new_phar_b.phpt @@ -8,14 +8,14 @@ phar.require_hash=1 --FILE-- <?php -file_put_contents('phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php', +file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php', 'brand new!'); -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- Warning: file_put_contents(phar://%screate_new_phar_b.phar.zip/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d diff --git a/ext/phar/tests/zip/delete.phpt b/ext/phar/tests/zip/delete.phpt index bd2ce5fffa..87536c9666 100644 --- a/ext/phar/tests/zip/delete.phpt +++ b/ext/phar/tests/zip/delete.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $file = "<?php Phar::mapPhar('hio'); @@ -24,7 +24,7 @@ $phar->delete('a'); echo file_get_contents($alias . '/a') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- a diff --git a/ext/phar/tests/zip/delete_in_phar.phpt b/ext/phar/tests/zip/delete_in_phar.phpt index b6f2dbb515..5c83202509 100644 --- a/ext/phar/tests/zip/delete_in_phar.phpt +++ b/ext/phar/tests/zip/delete_in_phar.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -40,7 +40,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/zip/delete_in_phar_b.phpt b/ext/phar/tests/zip/delete_in_phar_b.phpt index eb1a6cca6a..65f47e55ba 100644 --- a/ext/phar/tests/zip/delete_in_phar_b.phpt +++ b/ext/phar/tests/zip/delete_in_phar_b.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -33,7 +33,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/zip/delete_in_phar_confirm.phpt b/ext/phar/tests/zip/delete_in_phar_confirm.phpt index 0080499177..262dabdbb3 100644 --- a/ext/phar/tests/zip/delete_in_phar_confirm.phpt +++ b/ext/phar/tests/zip/delete_in_phar_confirm.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -38,14 +38,14 @@ if ($md5 == $md52) echo 'file was not modified'; ?> ===AFTER=== <?php -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php'; -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/b.php'; -include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip/b/c.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip/a.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip/b.php'; +include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- This is a This is b diff --git a/ext/phar/tests/zip/dir.phpt b/ext/phar/tests/zip/dir.phpt index 3cbeacd1c1..eb252d27f6 100644 --- a/ext/phar/tests/zip/dir.phpt +++ b/ext/phar/tests/zip/dir.phpt @@ -7,11 +7,11 @@ phar.readonly=0 phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; $pname = 'phar://' . $fname; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.1.phar.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.1.phar.php'; $pname2 = 'phar://' . $fname2; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.php'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.php'; $pname3 = 'phar://' . $fname3; $phar = new Phar($fname); var_dump($phar->isFileFormat(Phar::ZIP)); @@ -30,9 +30,9 @@ var_dump(file_exists($pname2 . '/test/')); var_dump(file_exists($pname3 . '/another/dir/')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.1.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.php'); ?> --EXPECT-- bool(true) bool(true) diff --git a/ext/phar/tests/zip/exists_as_phar.phpt b/ext/phar/tests/zip/exists_as_phar.phpt index ccb37e8187..2499e82312 100644 --- a/ext/phar/tests/zip/exists_as_phar.phpt +++ b/ext/phar/tests/zip/exists_as_phar.phpt @@ -8,8 +8,8 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$tname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$tname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://hio'; $phar = new Phar($fname); @@ -30,8 +30,8 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECTF-- phar zip error: phar "%sexists_as_phar.phar.zip" already exists as a regular phar and must be deleted from disk prior to creating as a zip-based phar diff --git a/ext/phar/tests/zip/getalias.phpt b/ext/phar/tests/zip/getalias.phpt index 4094e0cd99..2a2f5c19e6 100644 --- a/ext/phar/tests/zip/getalias.phpt +++ b/ext/phar/tests/zip/getalias.phpt @@ -7,14 +7,14 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; // sanity check with a virgin phar.zip $phar = new Phar($fname); var_dump($phar->getAlias()); unset($phar); -copy(dirname(__FILE__) . '/files/metadata.phar.zip', $fname); +copy(__DIR__ . '/files/metadata.phar.zip', $fname); // existing phar.zip, no alias set $phar = new Phar($fname); @@ -45,7 +45,7 @@ var_dump($phar->getAlias()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/largezip.phpt b/ext/phar/tests/zip/largezip.phpt index a8438eb7b7..78ee3d388e 100644 --- a/ext/phar/tests/zip/largezip.phpt +++ b/ext/phar/tests/zip/largezip.phpt @@ -7,8 +7,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php'; $pname = 'phar://' . $fname; $pname2 = 'phar://' . $fname2; @@ -22,8 +22,8 @@ var_dump(strlen($p2['big']->getContent())); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); ?> --EXPECT-- int(200000) ===DONE=== diff --git a/ext/phar/tests/zip/metadata_write_commit.phpt b/ext/phar/tests/zip/metadata_write_commit.phpt index 0de63401ce..d179b17a5c 100644 --- a/ext/phar/tests/zip/metadata_write_commit.phpt +++ b/ext/phar/tests/zip/metadata_write_commit.phpt @@ -9,8 +9,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; -$f2name = dirname(__FILE__) . '/files/metadata.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$f2name = __DIR__ . '/files/metadata.phar.zip'; $pname = 'phar://' . $fname; $p2name = 'phar://' . $f2name; @@ -55,7 +55,7 @@ var_dump($phar->getMetadata()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> --EXPECT-- string(1) "a" string(1) "b" diff --git a/ext/phar/tests/zip/notphar.phpt b/ext/phar/tests/zip/notphar.phpt index d7b79b0cb4..ff30a0c162 100644 --- a/ext/phar/tests/zip/notphar.phpt +++ b/ext/phar/tests/zip/notphar.phpt @@ -8,16 +8,16 @@ detect_unicode=0 zend.multibyte=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $pname = 'phar://' . $fname; -copy(dirname(__FILE__) . '/files/zip.zip', $fname); +copy(__DIR__ . '/files/zip.zip', $fname); include $fname; ?> ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/odt.phpt b/ext/phar/tests/zip/odt.phpt index 20f9f112df..5ca6ac8df0 100644 --- a/ext/phar/tests/zip/odt.phpt +++ b/ext/phar/tests/zip/odt.phpt @@ -5,7 +5,7 @@ Phar: test a zip archive created by openoffice <?php if (!extension_loaded("zlib")) die("skip zlib not available"); ?> --FILE-- <?php -$a = new PharData(dirname(__FILE__) . '/files/odt.odt'); +$a = new PharData(__DIR__ . '/files/odt.odt'); foreach (new RecursiveIteratorIterator($a, RecursiveIteratorIterator::LEAVES_ONLY) as $b) { if ($b->isDir()) { echo "dir " . $b->getPathName() . "\n"; @@ -15,7 +15,7 @@ foreach (new RecursiveIteratorIterator($a, RecursiveIteratorIterator::LEAVES_ONL } // this next line is for increased code coverage try { - $b = new Phar(dirname(__FILE__) . '/files/odt.odt'); + $b = new Phar(__DIR__ . '/files/odt.odt'); } catch (Exception $e) { echo $e->getMessage() . "\n"; } diff --git a/ext/phar/tests/zip/open_for_write_existing.phpt b/ext/phar/tests/zip/open_for_write_existing.phpt index 94f85b4e3f..fd76d4174e 100644 --- a/ext/phar/tests/zip/open_for_write_existing.phpt +++ b/ext/phar/tests/zip/open_for_write_existing.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -33,7 +33,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECT-- extra ===DONE=== diff --git a/ext/phar/tests/zip/open_for_write_existing_b.phpt b/ext/phar/tests/zip/open_for_write_existing_b.phpt index 789067eb29..35bd6cf3ec 100644 --- a/ext/phar/tests/zip/open_for_write_existing_b.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_b.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -36,7 +36,7 @@ include $alias . '/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_existing_b.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_existing_c.phpt b/ext/phar/tests/zip/open_for_write_existing_c.phpt index adcb50ff93..8c58025608 100644 --- a/ext/phar/tests/zip/open_for_write_existing_c.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_c.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -36,7 +36,7 @@ include $alias . '/b/c.php'; ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_existing_c.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_newfile.phpt b/ext/phar/tests/zip/open_for_write_newfile.phpt index c3782d4fd3..10a69f0dde 100644 --- a/ext/phar/tests/zip/open_for_write_newfile.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -35,7 +35,7 @@ include $alias . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECT-- This is b/c extra diff --git a/ext/phar/tests/zip/open_for_write_newfile_b.phpt b/ext/phar/tests/zip/open_for_write_newfile_b.phpt index 134bb4f0dd..d39dffb986 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_b.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -39,7 +39,7 @@ include $alias . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt index 86e33da7c9..f927a618cc 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt @@ -10,7 +10,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -39,7 +39,7 @@ include $alias . '/b/new.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- Warning: fopen(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d diff --git a/ext/phar/tests/zip/phar_begin_setstub_commit.phpt b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt index b9da14cd75..3adcc9c234 100644 --- a/ext/phar/tests/zip/phar_begin_setstub_commit.phpt +++ b/ext/phar/tests/zip/phar_begin_setstub_commit.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("phar")) die("skip"); phar.readonly=0 --FILE-- <?php -$p = new Phar(dirname(__FILE__) . '/phar_begin_setstub_commit.phar.zip', 0, 'phar_begin_setstub_commit.phar'); +$p = new Phar(__DIR__ . '/phar_begin_setstub_commit.phar.zip', 0, 'phar_begin_setstub_commit.phar'); var_dump($p->isFileFormat(Phar::ZIP)); //var_dump($p->getStub()); var_dump($p->isBuffering()); @@ -30,12 +30,12 @@ include 'phar://phar_begin_setstub_commit.phar/b.php'; var_dump($p->getStub()); // add portion to test setting stub from resource -file_put_contents(dirname(__FILE__) . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("phar_begin_setstub_commit.phar"); __HALT_COMPILER(); ?>'); -$a = fopen(dirname(__FILE__) . '/myfakestub.php', 'rb'); +file_put_contents(__DIR__ . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("phar_begin_setstub_commit.phar"); __HALT_COMPILER(); ?>'); +$a = fopen(__DIR__ . '/myfakestub.php', 'rb'); $p->setStub($a); var_dump($p->getStub()); $c = strlen('<?php var_dump("First resource"); Phar::mapPhar("phar_begin_setstub_commit.phar"); __HALT_COMPILER(); ?>'); -file_put_contents(dirname(__FILE__) . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("phar_begin_setstub_commit.phar"); __HALT_COMPILER(); ?>' . 'extra stuff'); +file_put_contents(__DIR__ . '/myfakestub.php', '<?php var_dump("First resource"); Phar::mapPhar("phar_begin_setstub_commit.phar"); __HALT_COMPILER(); ?>' . 'extra stuff'); fseek($a, 0); $p->setStub($a, $c); var_dump($p->getStub()); @@ -44,8 +44,8 @@ fclose($a); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_begin_setstub_commit.phar.zip'); -unlink(dirname(__FILE__) . '/myfakestub.php'); +unlink(__DIR__ . '/phar_begin_setstub_commit.phar.zip'); +unlink(__DIR__ . '/myfakestub.php'); ?> --EXPECTF-- bool(true) diff --git a/ext/phar/tests/zip/phar_buildfromiterator4.phpt b/ext/phar/tests/zip/phar_buildfromiterator4.phpt index 27cf41fc11..3f2b9f8355 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator4.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator4.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . 'phpt')))); var_dump($phar->isFileFormat(Phar::ZIP)); } catch (Exception $e) { @@ -48,7 +48,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip'); +unlink(__DIR__ . '/buildfromiterator.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_buildfromiterator5.phpt b/ext/phar/tests/zip/phar_buildfromiterator5.phpt index 4aca17e6a3..abc9295ad2 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator5.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator5.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); var_dump($phar->buildFromIterator(new myIterator(array('a' => new stdClass)))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip'); +unlink(__DIR__ . '/buildfromiterator.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_buildfromiterator6.phpt b/ext/phar/tests/zip/phar_buildfromiterator6.phpt index 5eea92dd70..d478c92f07 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator6.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator6.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); var_dump($phar->buildFromIterator(new myIterator(array(basename(__FILE__, 'php') . 'phpt')))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip'); +unlink(__DIR__ . '/buildfromiterator.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_buildfromiterator7.phpt b/ext/phar/tests/zip/phar_buildfromiterator7.phpt index 85a801002d..06c039bb79 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator7.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator7.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); var_dump($phar->buildFromIterator(new myIterator(array('a' => basename(__FILE__, 'php') . '/oopsie/there.phpt')))); } catch (Exception $e) { var_dump(get_class($e)); @@ -47,7 +47,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip'); +unlink(__DIR__ . '/buildfromiterator.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_buildfromiterator8.phpt b/ext/phar/tests/zip/phar_buildfromiterator8.phpt index 8c92edf1d7..17c23afa2e 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator8.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator8.phpt @@ -7,9 +7,9 @@ phar.readonly=0 --FILE-- <?php try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar.zip'); - $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^frontcontroller\d{0,2}\.phar\.phpt\\z|^\.\\z|^\.\.\\z/'), dirname(__FILE__) . DIRECTORY_SEPARATOR); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar.zip'); + $a = $phar->buildFromIterator(new RegexIterator(new DirectoryIterator('.'), '/^frontcontroller\d{0,2}\.phar\.phpt\\z|^\.\\z|^\.\.\\z/'), __DIR__ . DIRECTORY_SEPARATOR); asort($a); var_dump($a); var_dump($phar->isFileFormat(Phar::ZIP)); @@ -21,7 +21,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar.zip'); +unlink(__DIR__ . '/buildfromiterator.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_buildfromiterator9.phpt b/ext/phar/tests/zip/phar_buildfromiterator9.phpt index f676783f7c..01bbb150fb 100644 --- a/ext/phar/tests/zip/phar_buildfromiterator9.phpt +++ b/ext/phar/tests/zip/phar_buildfromiterator9.phpt @@ -36,8 +36,8 @@ class myIterator implements Iterator } } try { - chdir(dirname(__FILE__)); - $phar = new Phar(dirname(__FILE__) . '/buildfromiterator.phar'); + chdir(__DIR__); + $phar = new Phar(__DIR__ . '/buildfromiterator.phar'); var_dump($phar->buildFromIterator(new myIterator(array('a' => $a = fopen(basename(__FILE__, 'php') . 'phpt', 'r'))))); fclose($a); } catch (Exception $e) { @@ -48,7 +48,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/buildfromiterator.phar'); +unlink(__DIR__ . '/buildfromiterator.phar'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_commitwrite.phpt b/ext/phar/tests/zip/phar_commitwrite.phpt index fa9efc7bd2..e95413fb24 100644 --- a/ext/phar/tests/zip/phar_commitwrite.phpt +++ b/ext/phar/tests/zip/phar_commitwrite.phpt @@ -7,7 +7,7 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$p = new Phar(dirname(__FILE__) . '/phar_commitwrite.phar.zip', 0, 'phar_commitwrite.phar'); +$p = new Phar(__DIR__ . '/phar_commitwrite.phar.zip', 0, 'phar_commitwrite.phar'); $p['file1.txt'] = 'hi'; $p->stopBuffering(); var_dump($p->getStub()); @@ -26,7 +26,7 @@ var_dump($p->isFileFormat(Phar::ZIP)); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/phar_commitwrite.phar.zip'); +unlink(__DIR__ . '/phar_commitwrite.phar.zip'); ?> --EXPECTF-- string(60) "<?php // zip-based phar archive stub file diff --git a/ext/phar/tests/zip/phar_convert_phar.phpt b/ext/phar/tests/zip/phar_convert_phar.phpt index 5ae1aae222..494afd9583 100644 --- a/ext/phar/tests/zip/phar_convert_phar.phpt +++ b/ext/phar/tests/zip/phar_convert_phar.phpt @@ -8,9 +8,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.3.phar'; $phar = new Phar($fname); $phar['a.txt'] = 'some text'; @@ -38,10 +38,10 @@ var_dump(strlen($phar->getStub())); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.3.phar'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/zip/phar_copy.phpt b/ext/phar/tests/zip/phar_copy.phpt index d4d00a1259..f6424936b7 100644 --- a/ext/phar/tests/zip/phar_copy.phpt +++ b/ext/phar/tests/zip/phar_copy.phpt @@ -8,8 +8,8 @@ phar.require_hash=1 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar.php'; $pname = 'phar://'.$fname; $iname = '/file.txt'; @@ -44,8 +44,8 @@ echo 'c: ' ,file_get_contents($p2['c']->getPathName()); ?> ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.php'); ?> --EXPECTF-- hihibool(true) file "/error/.." contains invalid characters upper directory reference, cannot be copied from "a" in phar %s diff --git a/ext/phar/tests/zip/phar_magic.phpt b/ext/phar/tests/zip/phar_magic.phpt index 05b30fb74a..fd29f06347 100644 --- a/ext/phar/tests/zip/phar_magic.phpt +++ b/ext/phar/tests/zip/phar_magic.phpt @@ -9,12 +9,12 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; -$pname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$pname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; $p = new Phar($fname); var_dump($p->isFileFormat(Phar::ZIP)); $p['a'] = '<?php include "b/c.php";' . "\n"; -$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include dirname(__FILE__) . "/../d";'; +$p['b/c.php'] = '<?php echo "in b\n";$a = fopen("a", "r", true);echo stream_get_contents($a);fclose($a);include __DIR__ . "/../d";'; $p['d'] = "in d\n"; $p->setStub('<?php var_dump(__FILE__); @@ -27,7 +27,7 @@ include $pname; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_oo_compressallbz2.phpt b/ext/phar/tests/zip/phar_oo_compressallbz2.phpt index e66c2945a8..b2306bca61 100644 --- a/ext/phar/tests/zip/phar_oo_compressallbz2.phpt +++ b/ext/phar/tests/zip/phar_oo_compressallbz2.phpt @@ -7,8 +7,8 @@ Phar::compressFiles(Phar::BZ2) zip format phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $pname = 'phar://' . $fname; $pname2 = 'phar://' . $fname2; @@ -45,8 +45,8 @@ var_dump($c['a']->isCompressed(Phar::BZ2)); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/zip/phar_oo_compressallgz.phpt b/ext/phar/tests/zip/phar_oo_compressallgz.phpt index 1d995553ea..5daaed48ad 100644 --- a/ext/phar/tests/zip/phar_oo_compressallgz.phpt +++ b/ext/phar/tests/zip/phar_oo_compressallgz.phpt @@ -7,7 +7,7 @@ Phar::compressFiles(Phar::GZ) zip format phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; $pname = 'phar://' . $fname; $phar = new Phar($fname); @@ -37,7 +37,7 @@ var_dump($phar['c']->isCompressed(Phar::GZ)); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); ?> --EXPECT-- string(1) "a" diff --git a/ext/phar/tests/zip/phar_setalias.phpt b/ext/phar/tests/zip/phar_setalias.phpt index 1a39633863..cb60a068d6 100644 --- a/ext/phar/tests/zip/phar_setalias.phpt +++ b/ext/phar/tests/zip/phar_setalias.phpt @@ -10,9 +10,9 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '2.phar.zip'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '3.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '2.phar.zip'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '3.phar.zip'; $phar = new Phar($fname); $phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>'); @@ -49,9 +49,9 @@ echo $p3->getAlias(), "\n"; ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '2.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '3.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '3.phar.zip'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/zip/phar_setalias2.phpt b/ext/phar/tests/zip/phar_setalias2.phpt index 255f069c2c..8b63551b04 100644 --- a/ext/phar/tests/zip/phar_setalias2.phpt +++ b/ext/phar/tests/zip/phar_setalias2.phpt @@ -8,7 +8,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $phar = new Phar($fname); $phar->setStub('<?php echo "first stub\n"; __HALT_COMPILER(); ?>'); @@ -29,7 +29,7 @@ echo $phar->getAlias() . "\n"; $phar->setAlias('test'); echo $phar->getAlias() . "\n"; $b = $phar; -$phar = new Phar(dirname(__FILE__) . '/notphar.phar'); +$phar = new Phar(__DIR__ . '/notphar.phar'); try { $phar->setAlias('test'); } catch (Exception $e) { @@ -39,7 +39,7 @@ try { ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/phar_setdefaultstub.phpt b/ext/phar/tests/zip/phar_setdefaultstub.phpt index 28127e42a5..4851a90cae 100644 --- a/ext/phar/tests/zip/phar_setdefaultstub.phpt +++ b/ext/phar/tests/zip/phar_setdefaultstub.phpt @@ -7,7 +7,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $phar = new Phar($fname); $phar['a.php'] = '<php echo "this is a\n"; ?>'; @@ -56,7 +56,7 @@ var_dump($phar->getStub()); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- string(51) "<?php echo "Hello World\n"; __HALT_COMPILER(); ?> diff --git a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt index 7d3730c416..c3a5955c3f 100644 --- a/ext/phar/tests/zip/phar_setsignaturealgo2.phpt +++ b/ext/phar/tests/zip/phar_setsignaturealgo2.phpt @@ -11,12 +11,12 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.3.phar.zip'; -$fname4 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.4.phar.zip'; -$fname5 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.5.phar.zip'; -$fname6 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.6.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.3.phar.zip'; +$fname4 = __DIR__ . '/' . basename(__FILE__, '.php') . '.4.phar.zip'; +$fname5 = __DIR__ . '/' . basename(__FILE__, '.php') . '.5.phar.zip'; +$fname6 = __DIR__ . '/' . basename(__FILE__, '.php') . '.6.phar.zip'; $p = new Phar($fname); $p['file1.txt'] = 'hi'; var_dump($p->getSignature()); @@ -49,7 +49,7 @@ var_dump($p->getSignature()); echo $e->getMessage(); } try { -$config = dirname(__FILE__) . '/../files/openssl.cnf'; +$config = __DIR__ . '/../files/openssl.cnf'; $config_arg = array('config' => $config); $keys=openssl_pkey_new($config_arg); openssl_pkey_export($keys, $privkey, NULL, $config_arg); @@ -67,13 +67,13 @@ echo $e->getMessage(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.3.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.4.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.5.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.6.phar.zip'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.6.phar.zip.pubkey'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.3.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.4.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.5.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.6.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.6.phar.zip.pubkey'); ?> --EXPECTF-- array(2) { diff --git a/ext/phar/tests/zip/phar_stub.phpt b/ext/phar/tests/zip/phar_stub.phpt index 49b97f24f0..197cf409a9 100644 --- a/ext/phar/tests/zip/phar_stub.phpt +++ b/ext/phar/tests/zip/phar_stub.phpt @@ -7,8 +7,8 @@ phar.require_hash=0 phar.readonly=0 --FILE-- <?php -$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php'; -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; +$fname2 = __DIR__ . '/' . basename(__FILE__, '.php') . '.2.phar.zip.php'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip.php'; $pname = 'phar://' . $fname; $pname2 = 'phar://' . $fname2; @@ -28,7 +28,7 @@ $file = '<?php echo "second stub\n"; __HALT_COMPILER(); ?>'; $phar->setStub($file); echo $phar->getStub(); -$fname3 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phartmp.php'; +$fname3 = __DIR__ . '/' . basename(__FILE__, '.php') . '.phartmp.php'; $file = '<?php echo "third stub\n"; __HALT_COMPILER(); ?>'; $fp = fopen($fname3, 'wb'); fwrite($fp, $file); @@ -60,9 +60,9 @@ echo $phar->getStub(); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.2.phar.zip.php'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phartmp.php'); __HALT_COMPILER(); ?> --EXPECT-- diff --git a/ext/phar/tests/zip/phar_stub_error.phpt b/ext/phar/tests/zip/phar_stub_error.phpt index ad168d6e82..4bab4c2870 100644 --- a/ext/phar/tests/zip/phar_stub_error.phpt +++ b/ext/phar/tests/zip/phar_stub_error.phpt @@ -8,7 +8,7 @@ phar.readonly=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $phar = new Phar($fname); $phar->setStub($stub = '<?php echo "first stub\n"; __HALT_COMPILER(); ?>' . "\r\n"); @@ -38,7 +38,7 @@ var_dump($phar->getStub() == $stub); ===DONE=== --CLEAN-- <?php -unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); +unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); __HALT_COMPILER(); ?> --EXPECTF-- diff --git a/ext/phar/tests/zip/refcount1.phpt b/ext/phar/tests/zip/refcount1.phpt index 82a6f5218f..14fb3b228a 100644 --- a/ext/phar/tests/zip/refcount1.phpt +++ b/ext/phar/tests/zip/refcount1.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -44,7 +44,7 @@ include $alias . '/b/c.php'; ===DONE=== --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- ===CLOSE=== object(PharFileInfo)#%d (2) { diff --git a/ext/phar/tests/zip/rename.phpt b/ext/phar/tests/zip/rename.phpt index 10d73fd3d8..82e2850927 100644 --- a/ext/phar/tests/zip/rename.phpt +++ b/ext/phar/tests/zip/rename.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -26,7 +26,7 @@ echo file_get_contents($alias . '/b') . "\n"; echo file_get_contents($alias . '/a') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- a a diff --git a/ext/phar/tests/zip/rename_dir.phpt b/ext/phar/tests/zip/rename_dir.phpt index 1885a7ce75..a65113c3cf 100644 --- a/ext/phar/tests/zip/rename_dir.phpt +++ b/ext/phar/tests/zip/rename_dir.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -26,7 +26,7 @@ echo file_get_contents($alias . '/b/x') . "\n"; echo file_get_contents($alias . '/a/x') . "\n"; ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- a a diff --git a/ext/phar/tests/zip/rmdir.phpt b/ext/phar/tests/zip/rmdir.phpt index c7ef9dacac..37cad748a3 100644 --- a/ext/phar/tests/zip/rmdir.phpt +++ b/ext/phar/tests/zip/rmdir.phpt @@ -8,7 +8,7 @@ phar.require_hash=0 --FILE-- <?php -$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.zip'; +$fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.zip'; $alias = 'phar://' . $fname; $phar = new Phar($fname); @@ -28,7 +28,7 @@ unlink($alias . '/a/x'); var_dump(rmdir($alias . '/a')); ?> --CLEAN-- -<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> +<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- a diff --git a/ext/phar/tests/zip/unixzip.phpt b/ext/phar/tests/zip/unixzip.phpt index d6cbe47898..371c34e0c7 100644 --- a/ext/phar/tests/zip/unixzip.phpt +++ b/ext/phar/tests/zip/unixzip.phpt @@ -4,7 +4,7 @@ Phar: test a zip archive created by unix "zip" command <?php if (!extension_loaded("phar")) die("skip"); ?> --FILE-- <?php -$a = new PharData(dirname(__FILE__) . '/files/zip.zip'); +$a = new PharData(__DIR__ . '/files/zip.zip'); foreach ($a as $b) { if ($b->isDir()) { echo "dir " . $b->getPathName() . "\n"; diff --git a/ext/phar/tests/zip/zlib.phpt b/ext/phar/tests/zip/zlib.phpt index bb3e012be2..1e66e99937 100644 --- a/ext/phar/tests/zip/zlib.phpt +++ b/ext/phar/tests/zip/zlib.phpt @@ -6,7 +6,7 @@ Phar: process zlib-compressed zip alias --FILE-- <?php try { - $a = new Phar(dirname(__FILE__) . '/files/zlib_alias.phar.zip'); + $a = new Phar(__DIR__ . '/files/zlib_alias.phar.zip'); var_dump($a->getAlias()); } catch (Exception $e) { echo $e->getMessage() . "\n"; diff --git a/ext/pspell/tests/005.phpt b/ext/pspell/tests/005.phpt index 17ed1904b8..083b4c1871 100644 --- a/ext/pspell/tests/005.phpt +++ b/ext/pspell/tests/005.phpt @@ -8,7 +8,7 @@ if (!@pspell_new('en')) die('skip English dictionary is not available'); --FILE-- <?php -$wordlist = dirname(__FILE__).'/wordlist.txt'; +$wordlist = __DIR__.'/wordlist.txt'; var_dump(pspell_new_personal(__FILE__, 'en')); $p = pspell_new_personal($wordlist, 'en'); diff --git a/ext/recode/tests/002.phpt b/ext/recode/tests/002.phpt index fb9f286422..17fef3f0ff 100644 --- a/ext/recode/tests/002.phpt +++ b/ext/recode/tests/002.phpt @@ -14,8 +14,8 @@ function ascii2hex($ascii) { return $hex; } -$html_file = fopen(realpath(dirname(__FILE__)) . '/html.raw', 'r'); -$utf_8_filepath = realpath(dirname(__FILE__)) . '/utf8.raw'; +$html_file = fopen(realpath(__DIR__) . '/html.raw', 'r'); +$utf_8_filepath = realpath(__DIR__) . '/utf8.raw'; $utf_8_file = fopen($utf_8_filepath, 'w+'); recode_file('html..utf8', $html_file, $utf_8_file); diff --git a/ext/session/tests/bug42596.phpt b/ext/session/tests/bug42596.phpt index 6902d124b4..adc1503949 100644 --- a/ext/session/tests/bug42596.phpt +++ b/ext/session/tests/bug42596.phpt @@ -15,7 +15,7 @@ session.serialize_handler=php session.save_handler=files --FILE-- <?php -$sessdir = dirname(__FILE__).'/sessions/'; +$sessdir = __DIR__.'/sessions/'; @rmdir($sessdir); mkdir($sessdir); $save_path = '0;0777;'.$sessdir; diff --git a/ext/session/tests/session_basic1.phpt b/ext/session/tests/session_basic1.phpt index fbce0890c4..658c8e7287 100644 --- a/ext/session/tests/session_basic1.phpt +++ b/ext/session/tests/session_basic1.phpt @@ -25,7 +25,7 @@ echo "*** Testing basic session functionality : variation1 ***\n"; $session_id = 'testid'; session_id($session_id); -$path = dirname(__FILE__); +$path = __DIR__; var_dump(session_save_path($path)); echo "*** Without lazy_write ***\n"; diff --git a/ext/session/tests/session_basic2.phpt b/ext/session/tests/session_basic2.phpt index bafe3454eb..30ac946c1e 100644 --- a/ext/session/tests/session_basic2.phpt +++ b/ext/session/tests/session_basic2.phpt @@ -27,7 +27,7 @@ echo "*** Testing basic session functionality : variation2 ***\n"; $session_id = 'testid'; session_id($session_id); -$path = dirname(__FILE__); +$path = __DIR__; var_dump(session_save_path($path)); echo "*** Without lazy_write ***\n"; diff --git a/ext/session/tests/session_module_name_variation4.phpt b/ext/session/tests/session_module_name_variation4.phpt index 00e6975045..303a5f8939 100644 --- a/ext/session/tests/session_module_name_variation4.phpt +++ b/ext/session/tests/session_module_name_variation4.phpt @@ -20,7 +20,7 @@ ob_start(); echo "*** Testing session_module_name() : variation ***\n"; require_once "save_handler.inc"; -$path = dirname(__FILE__); +$path = __DIR__; session_save_path($path); session_module_name("files"); diff --git a/ext/session/tests/session_regenerate_id_cookie.phpt b/ext/session/tests/session_regenerate_id_cookie.phpt index 9558beb814..c3c5464860 100644 --- a/ext/session/tests/session_regenerate_id_cookie.phpt +++ b/ext/session/tests/session_regenerate_id_cookie.phpt @@ -26,7 +26,7 @@ require __DIR__.'/../../../sapi/cgi/tests/include.inc'; $php = get_cgi_path(); reset_env_vars(); -$file = dirname(__FILE__)."/session_regenerate_id_cookie.test.php"; +$file = __DIR__."/session_regenerate_id_cookie.test.php"; file_put_contents($file, '<?php ob_start(); diff --git a/ext/session/tests/session_save_path_basic.phpt b/ext/session/tests/session_save_path_basic.phpt index 4db8effdaa..15027631cc 100644 --- a/ext/session/tests/session_save_path_basic.phpt +++ b/ext/session/tests/session_save_path_basic.phpt @@ -19,7 +19,7 @@ ob_start(); echo "*** Testing session_save_path() : error functionality ***\n"; -$directory = dirname(__FILE__); +$directory = __DIR__; var_dump(session_save_path()); var_dump(session_save_path($directory)); var_dump(session_save_path()); diff --git a/ext/session/tests/session_save_path_variation1.phpt b/ext/session/tests/session_save_path_variation1.phpt index 75533c8100..20ed9301ce 100644 --- a/ext/session/tests/session_save_path_variation1.phpt +++ b/ext/session/tests/session_save_path_variation1.phpt @@ -20,7 +20,7 @@ ob_start(); echo "*** Testing session_save_path() : variation ***\n"; -$directory = dirname(__FILE__); +$directory = __DIR__; var_dump(session_save_path()); var_dump(session_save_path($directory)); var_dump(session_save_path()); diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt index 5d93a573b2..557634c903 100644 --- a/ext/session/tests/session_save_path_variation5.phpt +++ b/ext/session/tests/session_save_path_variation5.phpt @@ -20,7 +20,7 @@ ob_start(); */ echo "*** Testing session_save_path() : variation ***\n"; -$directory = dirname(__FILE__); +$directory = __DIR__; $sessions = ($directory."/sessions"); chdir($directory); @@ -40,7 +40,7 @@ echo "Done"; ob_end_flush(); ?> --CLEAN-- -$directory = dirname(__FILE__); +$directory = __DIR__; $sessions = ($directory."/sessions"); var_dump(rmdir($sessions)); --EXPECTF-- diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt index bf77e77a6e..c1c763f68b 100644 --- a/ext/session/tests/session_set_save_handler_basic.phpt +++ b/ext/session/tests/session_set_save_handler_basic.phpt @@ -26,7 +26,7 @@ var_dump(session_module_name(FALSE)); var_dump(session_module_name("blah")); var_dump(session_module_name("foo")); -$path = dirname(__FILE__); +$path = __DIR__; session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "gc"); diff --git a/ext/session/tests/session_set_save_handler_closures.phpt b/ext/session/tests/session_set_save_handler_closures.phpt index 77bbf6caff..e490e1780e 100644 --- a/ext/session/tests/session_set_save_handler_closures.phpt +++ b/ext/session/tests/session_set_save_handler_closures.phpt @@ -25,7 +25,7 @@ var_dump(session_module_name(FALSE)); var_dump(session_module_name("blah")); var_dump(session_module_name("foo")); -$path = dirname(__FILE__); +$path = __DIR__; session_save_path($path); session_set_save_handler($open_closure, $close_closure, $read_closure, $write_closure, $destroy_closure, $gc_closure); diff --git a/ext/session/tests/session_set_save_handler_variation2.phpt b/ext/session/tests/session_set_save_handler_variation2.phpt index 251b042d02..a4e1cdfa6d 100644 --- a/ext/session/tests/session_set_save_handler_variation2.phpt +++ b/ext/session/tests/session_set_save_handler_variation2.phpt @@ -16,7 +16,7 @@ ob_start(); echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = dirname(__FILE__); +$path = __DIR__; session_save_path($path); var_dump(session_start()); var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc")); diff --git a/ext/session/tests/session_set_save_handler_variation3.phpt b/ext/session/tests/session_set_save_handler_variation3.phpt index 9af87dd170..90c270c644 100644 --- a/ext/session/tests/session_set_save_handler_variation3.phpt +++ b/ext/session/tests/session_set_save_handler_variation3.phpt @@ -18,7 +18,7 @@ ob_start(); echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = dirname(__FILE__); +$path = __DIR__; var_dump(session_status()); session_save_path($path); var_dump(session_set_save_handler("open", "close", "read", "write", "destroy", "gc")); diff --git a/ext/session/tests/session_set_save_handler_variation4.phpt b/ext/session/tests/session_set_save_handler_variation4.phpt index 3fb18d9bf8..bf74385839 100644 --- a/ext/session/tests/session_set_save_handler_variation4.phpt +++ b/ext/session/tests/session_set_save_handler_variation4.phpt @@ -29,7 +29,7 @@ function noisy_gc($maxlifetime) { } require_once "save_handler.inc"; -$path = dirname(__FILE__); +$path = __DIR__; session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "noisy_gc"); diff --git a/ext/session/tests/session_set_save_handler_variation5.phpt b/ext/session/tests/session_set_save_handler_variation5.phpt index aac9cc4e99..23847aadf4 100644 --- a/ext/session/tests/session_set_save_handler_variation5.phpt +++ b/ext/session/tests/session_set_save_handler_variation5.phpt @@ -30,7 +30,7 @@ function noisy_gc($maxlifetime) { echo "*** Testing session_set_save_handler() : variation ***\n"; require_once "save_handler.inc"; -$path = dirname(__FILE__); +$path = __DIR__; var_dump(session_save_path($path)); echo "*** Without lazy_write ***\n"; diff --git a/ext/session/tests/session_set_save_handler_variation6.phpt b/ext/session/tests/session_set_save_handler_variation6.phpt index 244a71ca13..7a37198c70 100644 --- a/ext/session/tests/session_set_save_handler_variation6.phpt +++ b/ext/session/tests/session_set_save_handler_variation6.phpt @@ -23,7 +23,7 @@ ob_start(); echo "*** Testing session_set_save_handler() : test write short circuit ***\n"; require_once "save_handler.inc"; -$path = dirname(__FILE__); +$path = __DIR__; session_save_path($path); session_set_save_handler("open", "close", "read", "write", "destroy", "gc", "create_sid", "validate_sid", "update"); diff --git a/ext/simplexml/tests/000.phpt b/ext/simplexml/tests/000.phpt index 8a35fc9ba3..d70a038ffa 100644 --- a/ext/simplexml/tests/000.phpt +++ b/ext/simplexml/tests/000.phpt @@ -5,7 +5,7 @@ SimpleXML: var_dump() --FILE-- <?php -$sxe = simplexml_load_file(dirname(__FILE__).'/000.xml'); +$sxe = simplexml_load_file(__DIR__.'/000.xml'); function test($what) { diff --git a/ext/simplexml/tests/001-mb.phpt b/ext/simplexml/tests/001-mb.phpt index ce358d3328..ada0f7d352 100644 --- a/ext/simplexml/tests/001-mb.phpt +++ b/ext/simplexml/tests/001-mb.phpt @@ -5,7 +5,7 @@ SimpleXML: Simple document --FILE-- <?php -var_dump(simplexml_load_file(dirname(__FILE__).'/sxe私はガラスを食べられます.xml')); +var_dump(simplexml_load_file(__DIR__.'/sxe私はガラスを食べられます.xml')); ?> ===DONE=== diff --git a/ext/simplexml/tests/001.phpt b/ext/simplexml/tests/001.phpt index 7f37870efa..5820c55325 100644 --- a/ext/simplexml/tests/001.phpt +++ b/ext/simplexml/tests/001.phpt @@ -5,7 +5,7 @@ SimpleXML: Simple document --FILE-- <?php -var_dump(simplexml_load_file(dirname(__FILE__).'/sxe.xml')); +var_dump(simplexml_load_file(__DIR__.'/sxe.xml')); ?> ===DONE=== diff --git a/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt b/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt index aedd5978b7..52f6222eea 100644 --- a/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt +++ b/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt @@ -4,7 +4,7 @@ SimpleXMLElement->addAttribute() <?php if (!extension_loaded("simplexml")) die("skip"); ?> --FILE-- <?php - $simple = simplexml_load_file(dirname(__FILE__)."/book.xml"); + $simple = simplexml_load_file(__DIR__."/book.xml"); $simple->addAttribute('type','novels'); var_dump($simple->attributes()); diff --git a/ext/simplexml/tests/bug24392.phpt b/ext/simplexml/tests/bug24392.phpt index 5bd133fd73..08d73c630d 100644 --- a/ext/simplexml/tests/bug24392.phpt +++ b/ext/simplexml/tests/bug24392.phpt @@ -4,7 +4,7 @@ Bug #24392 (empty namespaces causing confusion) <?php if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded"; ?> --FILE-- <?php -$s = simplexml_load_file(dirname(__FILE__).'/bug24392.xml'); +$s = simplexml_load_file(__DIR__.'/bug24392.xml'); foreach ($s->item as $item) { echo $item->title . "\n"; } diff --git a/ext/simplexml/tests/simplexml_import_dom.phpt b/ext/simplexml/tests/simplexml_import_dom.phpt index 9908988ee0..02fbcdb4dd 100644 --- a/ext/simplexml/tests/simplexml_import_dom.phpt +++ b/ext/simplexml/tests/simplexml_import_dom.phpt @@ -6,7 +6,7 @@ SimpleXML [interop]: simplexml_import_dom --FILE-- <?php $dom = new domDocument; -$dom->load(dirname(__FILE__)."/book.xml"); +$dom->load(__DIR__."/book.xml"); if(!$dom) { echo "Error while parsing the document\n"; exit; diff --git a/ext/simplexml/tests/simplexml_load_file.phpt b/ext/simplexml/tests/simplexml_load_file.phpt index 91543979f4..50ee4e9033 100644 --- a/ext/simplexml/tests/simplexml_load_file.phpt +++ b/ext/simplexml/tests/simplexml_load_file.phpt @@ -4,7 +4,7 @@ simplexml_load_file() <?php if (!extension_loaded("simplexml")) die("skip"); ?> --FILE-- <?php - $simple = simplexml_load_file(dirname(__FILE__)."/book.xml"); + $simple = simplexml_load_file(__DIR__."/book.xml"); var_dump($simple); echo "Done"; diff --git a/ext/snmp/tests/bug60749.phpt b/ext/snmp/tests/bug60749.phpt index c31981c5af..1ada8102c4 100644 --- a/ext/snmp/tests/bug60749.phpt +++ b/ext/snmp/tests/bug60749.phpt @@ -4,11 +4,11 @@ Bug #60749: SNMP module should not strip non-standard SNMP port from hostname Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); $hostname = "php.net"; $ip = gethostbyname($hostname); diff --git a/ext/snmp/tests/bug64124.phpt b/ext/snmp/tests/bug64124.phpt index b5b8f80603..9dac2c9e1b 100644 --- a/ext/snmp/tests/bug64124.phpt +++ b/ext/snmp/tests/bug64124.phpt @@ -4,7 +4,7 @@ Bug #64124 IPv6 malformed Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); $packed = str_repeat(chr(0), 15) . chr(1); if (@inet_ntop($packed) === false) { @@ -13,7 +13,7 @@ if (@inet_ntop($packed) === false) { ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); # hostname variable was modified inline in netsnmp_session_init() # Should be checked with IPv6 since IPv4 processing code do not alter pointer position diff --git a/ext/snmp/tests/bug64159.phpt b/ext/snmp/tests/bug64159.phpt index 0eee4e3295..6e947ae346 100644 --- a/ext/snmp/tests/bug64159.phpt +++ b/ext/snmp/tests/bug64159.phpt @@ -4,13 +4,13 @@ Bug #64159: Truncated snmpget Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --ENV-- MIBS=noneXistent --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); snmp_set_quick_print(false); snmp_set_valueretrieval(SNMP_VALUE_LIBRARY); diff --git a/ext/snmp/tests/bug72479.phpt b/ext/snmp/tests/bug72479.phpt index c941ca73ae..9109c50577 100644 --- a/ext/snmp/tests/bug72479.phpt +++ b/ext/snmp/tests/bug72479.phpt @@ -2,7 +2,7 @@ Bug #72479: Use After Free Vulnerability in SNMP with GC and unserialize() --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/snmp/tests/generic_timeout_error.phpt b/ext/snmp/tests/generic_timeout_error.phpt index 98966c4f42..dd48b75074 100644 --- a/ext/snmp/tests/generic_timeout_error.phpt +++ b/ext/snmp/tests/generic_timeout_error.phpt @@ -4,11 +4,11 @@ Generic timeout (wrong community) Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/ipv6.phpt b/ext/snmp/tests/ipv6.phpt index 9cf83e00bd..37d15542e7 100644 --- a/ext/snmp/tests/ipv6.phpt +++ b/ext/snmp/tests/ipv6.phpt @@ -4,7 +4,7 @@ IPv6 support Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); $packed = str_repeat(chr(0), 15) . chr(1); if (@inet_ntop($packed) === false) { @@ -13,7 +13,7 @@ if (@inet_ntop($packed) === false) { ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp-object-errno-errstr.phpt b/ext/snmp/tests/snmp-object-errno-errstr.phpt index 32c49c4fb5..aada964e0b 100644 --- a/ext/snmp/tests/snmp-object-errno-errstr.phpt +++ b/ext/snmp/tests/snmp-object-errno-errstr.phpt @@ -4,11 +4,11 @@ OO API: getErrno & getError methods Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_enum_print(false); diff --git a/ext/snmp/tests/snmp-object-error.phpt b/ext/snmp/tests/snmp-object-error.phpt index 1445971e18..4e6bd04ea6 100644 --- a/ext/snmp/tests/snmp-object-error.phpt +++ b/ext/snmp/tests/snmp-object-error.phpt @@ -4,11 +4,11 @@ OO API: Generic errors Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp-object-properties.phpt b/ext/snmp/tests/snmp-object-properties.phpt index a214152b9b..0cce9a5e8d 100644 --- a/ext/snmp/tests/snmp-object-properties.phpt +++ b/ext/snmp/tests/snmp-object-properties.phpt @@ -4,11 +4,11 @@ OO API: SNMP object properties Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_enum_print(false); diff --git a/ext/snmp/tests/snmp-object-setSecurity_error.phpt b/ext/snmp/tests/snmp-object-setSecurity_error.phpt index 94a3f77205..f43e699a31 100644 --- a/ext/snmp/tests/snmp-object-setSecurity_error.phpt +++ b/ext/snmp/tests/snmp-object-setSecurity_error.phpt @@ -4,11 +4,11 @@ OO API: SNMP::setSecurity (errors) Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp-object.phpt b/ext/snmp/tests/snmp-object.phpt index df1c8dce0c..4f22b452f0 100644 --- a/ext/snmp/tests/snmp-object.phpt +++ b/ext/snmp/tests/snmp-object.phpt @@ -4,11 +4,11 @@ OO API Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_enum_print(false); diff --git a/ext/snmp/tests/snmp2_get.phpt b/ext/snmp/tests/snmp2_get.phpt index 93d58dad0d..12276f9952 100644 --- a/ext/snmp/tests/snmp2_get.phpt +++ b/ext/snmp/tests/snmp2_get.phpt @@ -4,11 +4,11 @@ Function snmp2_get Olivier Doucet & Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp2_getnext.phpt b/ext/snmp/tests/snmp2_getnext.phpt index 72ce02d945..e9d2749f96 100644 --- a/ext/snmp/tests/snmp2_getnext.phpt +++ b/ext/snmp/tests/snmp2_getnext.phpt @@ -4,11 +4,11 @@ Function snmp2_getnext Olivier Doucet & Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp2_real_walk.phpt b/ext/snmp/tests/snmp2_real_walk.phpt index 7cfafc073d..5a66312ebd 100644 --- a/ext/snmp/tests/snmp2_real_walk.phpt +++ b/ext/snmp/tests/snmp2_real_walk.phpt @@ -4,11 +4,11 @@ Function snmp2_real_walk Olivier Doucet Olivier Doucet Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp2_set-nomib.phpt b/ext/snmp/tests/snmp2_set-nomib.phpt index 6000c9c0e7..cdb4536e99 100644 --- a/ext/snmp/tests/snmp2_set-nomib.phpt +++ b/ext/snmp/tests/snmp2_set-nomib.phpt @@ -4,13 +4,13 @@ Function snmp2_set (without MIBs loading) Boris Lytockin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --ENV-- MIBS= --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp2_set.phpt b/ext/snmp/tests/snmp2_set.phpt index b418a714f2..4f4d5d7a51 100644 --- a/ext/snmp/tests/snmp2_set.phpt +++ b/ext/snmp/tests/snmp2_set.phpt @@ -4,11 +4,11 @@ Function snmp2_set Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp2_walk.phpt b/ext/snmp/tests/snmp2_walk.phpt index 5164a219f4..ccccf76dc8 100644 --- a/ext/snmp/tests/snmp2_walk.phpt +++ b/ext/snmp/tests/snmp2_walk.phpt @@ -4,11 +4,11 @@ Function snmp2_walk Olivier Doucet Olivier Doucet Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp3-error.phpt b/ext/snmp/tests/snmp3-error.phpt index 2239f9fddc..58e02dc7c5 100644 --- a/ext/snmp/tests/snmp3-error.phpt +++ b/ext/snmp/tests/snmp3-error.phpt @@ -4,11 +4,11 @@ SNMPv3 Support (errors) Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; diff --git a/ext/snmp/tests/snmp3.phpt b/ext/snmp/tests/snmp3.phpt index 57ea453938..68c14d058f 100644 --- a/ext/snmp/tests/snmp3.phpt +++ b/ext/snmp/tests/snmp3.phpt @@ -4,11 +4,11 @@ SNMPv3 Support Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, // string auth_passphrase, string priv_protocol, string priv_passphrase, diff --git a/ext/snmp/tests/snmp_get_quick_print.phpt b/ext/snmp/tests/snmp_get_quick_print.phpt index 81d10cf055..630f7b544a 100644 --- a/ext/snmp/tests/snmp_get_quick_print.phpt +++ b/ext/snmp/tests/snmp_get_quick_print.phpt @@ -4,11 +4,11 @@ Function snmp_get_quick_print / snmp_set_quick_print Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; var_dump(snmp_get_quick_print('noarg')); diff --git a/ext/snmp/tests/snmp_get_valueretrieval.phpt b/ext/snmp/tests/snmp_get_valueretrieval.phpt index 99de42a647..ca07ecaa55 100644 --- a/ext/snmp/tests/snmp_get_valueretrieval.phpt +++ b/ext/snmp/tests/snmp_get_valueretrieval.phpt @@ -4,11 +4,11 @@ Function snmp_get_valueretrieval / snmp_set_valueretrieval Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; var_dump(snmp_get_valueretrieval('noarg')); diff --git a/ext/snmp/tests/snmp_getvalue.phpt b/ext/snmp/tests/snmp_getvalue.phpt index 7cc5428704..31d96e52b9 100644 --- a/ext/snmp/tests/snmp_getvalue.phpt +++ b/ext/snmp/tests/snmp_getvalue.phpt @@ -4,11 +4,11 @@ Function snmp_getvalue Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmp_read_mib.phpt b/ext/snmp/tests/snmp_read_mib.phpt index ef2edaeba1..00203bb4e5 100644 --- a/ext/snmp/tests/snmp_read_mib.phpt +++ b/ext/snmp/tests/snmp_read_mib.phpt @@ -4,19 +4,19 @@ Function snmp_read_mib Olivier Doucet Olivier Doucet Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/skipif.inc'); +require_once(__DIR__.'/snmp_include.inc'); if (!file_exists($mibdir . '/SNMPv2-MIB.txt')) die('skip MIB file not in the system'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; var_dump(snmp_read_mib()); -var_dump(snmp_read_mib(dirname(__FILE__).'/cannotfindthisfile')); +var_dump(snmp_read_mib(__DIR__.'/cannotfindthisfile')); echo "Checking working\n"; var_dump(snmp_read_mib($mibdir . '/SNMPv2-MIB.txt')); diff --git a/ext/snmp/tests/snmp_set_enum_print.phpt b/ext/snmp/tests/snmp_set_enum_print.phpt index 6f8dcce1c2..1efe8953ea 100644 --- a/ext/snmp/tests/snmp_set_enum_print.phpt +++ b/ext/snmp/tests/snmp_set_enum_print.phpt @@ -4,12 +4,12 @@ Function snmp_set_enum_print Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); if (!function_exists('snmp_set_enum_print')) die('This function is only available if using NET_SNMP'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; var_dump(snmp_set_enum_print()); diff --git a/ext/snmp/tests/snmp_set_oid_output_format.phpt b/ext/snmp/tests/snmp_set_oid_output_format.phpt index 06c2240a78..30778dea9f 100644 --- a/ext/snmp/tests/snmp_set_oid_output_format.phpt +++ b/ext/snmp/tests/snmp_set_oid_output_format.phpt @@ -4,12 +4,12 @@ Function snmp_set_oid_output_format Olivier Doucet --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); if (!function_exists('snmp_set_oid_output_format')) die('This function is only available if using NET_SNMP'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); echo "Checking error handling\n"; var_dump(snmp_set_oid_output_format()); diff --git a/ext/snmp/tests/snmpget.phpt b/ext/snmp/tests/snmpget.phpt index 04a11afd4a..c710420965 100644 --- a/ext/snmp/tests/snmpget.phpt +++ b/ext/snmp/tests/snmpget.phpt @@ -4,11 +4,11 @@ Function snmpget Olivier Doucet & Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmpgetnext.phpt b/ext/snmp/tests/snmpgetnext.phpt index de5f8d8ccf..a36107cae2 100644 --- a/ext/snmp/tests/snmpgetnext.phpt +++ b/ext/snmp/tests/snmpgetnext.phpt @@ -4,11 +4,11 @@ Function snmpgetnext Olivier Doucet & Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmprealwalk.phpt b/ext/snmp/tests/snmprealwalk.phpt index 8b2941f581..ba5a304240 100644 --- a/ext/snmp/tests/snmprealwalk.phpt +++ b/ext/snmp/tests/snmprealwalk.phpt @@ -4,11 +4,11 @@ Function snmprealwalk Olivier Doucet Olivier Doucet Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmpset-nomib.phpt b/ext/snmp/tests/snmpset-nomib.phpt index 54b2be5871..491f629188 100644 --- a/ext/snmp/tests/snmpset-nomib.phpt +++ b/ext/snmp/tests/snmpset-nomib.phpt @@ -4,13 +4,13 @@ Function snmpset (without MIBs loading) Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --ENV-- MIBS= --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmpset.phpt b/ext/snmp/tests/snmpset.phpt index a4e22f247b..809016444d 100644 --- a/ext/snmp/tests/snmpset.phpt +++ b/ext/snmp/tests/snmpset.phpt @@ -4,11 +4,11 @@ Function snmpset Olivier Doucet Olivier Doucet Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/snmpwalk.phpt b/ext/snmp/tests/snmpwalk.phpt index efe7b4e317..1cdfc6d1e5 100644 --- a/ext/snmp/tests/snmpwalk.phpt +++ b/ext/snmp/tests/snmpwalk.phpt @@ -4,11 +4,11 @@ Function snmpwalk Olivier Doucet Olivier Doucet Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/snmp/tests/wrong_hostname.phpt b/ext/snmp/tests/wrong_hostname.phpt index 29e8971e58..9e26203001 100644 --- a/ext/snmp/tests/wrong_hostname.phpt +++ b/ext/snmp/tests/wrong_hostname.phpt @@ -4,11 +4,11 @@ Wrong hostname Boris Lytochkin --SKIPIF-- <?php -require_once(dirname(__FILE__).'/skipif.inc'); +require_once(__DIR__.'/skipif.inc'); ?> --FILE-- <?php -require_once(dirname(__FILE__).'/snmp_include.inc'); +require_once(__DIR__.'/snmp_include.inc'); //EXPECTF format is quickprint OFF snmp_set_quick_print(false); diff --git a/ext/soap/tests/any.phpt b/ext/soap/tests/any.phpt index 7c0b7ff252..d84443b06f 100644 --- a/ext/soap/tests/any.phpt +++ b/ext/soap/tests/any.phpt @@ -44,7 +44,7 @@ class TestSoapClient extends SoapClient { } } -$client = new TestSoapClient(dirname(__FILE__)."/interop/Round4/GroupI/round4_groupI_xsd.wsdl", +$client = new TestSoapClient(__DIR__."/interop/Round4/GroupI/round4_groupI_xsd.wsdl", array("trace"=>1,"exceptions"=>0, 'classmap' => array('SOAPComplexType'=>'SOAPComplexType'))); $ret = $client->echoAnyElement( diff --git a/ext/soap/tests/bug48557.phpt b/ext/soap/tests/bug48557.phpt index 44a2b74b8e..aa20c14610 100644 --- a/ext/soap/tests/bug48557.phpt +++ b/ext/soap/tests/bug48557.phpt @@ -12,7 +12,7 @@ function test($map) { var_dump($map, $map[1], $map[2]);die; } -$y = new SoapServer(dirname(__FILE__) . '/bug48557.wsdl'); +$y = new SoapServer(__DIR__ . '/bug48557.wsdl'); $y->addfunction("test"); $request = <<<XML <?xml version="1.0"?> diff --git a/ext/soap/tests/bug73037.phpt b/ext/soap/tests/bug73037.phpt index 0a4271f356..7f49a843f5 100644 --- a/ext/soap/tests/bug73037.phpt +++ b/ext/soap/tests/bug73037.phpt @@ -9,14 +9,14 @@ server echo "skip zlib is required for this test"; } - if (!file_exists(dirname(__FILE__) . "/../../../sapi/cli/tests/php_cli_server.inc")) { + if (!file_exists(__DIR__ . "/../../../sapi/cli/tests/php_cli_server.inc")) { echo "skip sapi/cli/tests/php_cli_server.inc required but not found"; } ?> --FILE-- <?php -include dirname(__FILE__) . "/../../../sapi/cli/tests/php_cli_server.inc"; +include __DIR__ . "/../../../sapi/cli/tests/php_cli_server.inc"; function get_data($max) { @@ -134,7 +134,7 @@ cleanup: ==DONE== --CLEAN-- <?php -unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug73037_server.php"); +unlink(__DIR__ . DIRECTORY_SEPARATOR . "bug73037_server.php"); ?> --EXPECT-- Iteration 0 diff --git a/ext/soap/tests/bugs/bug27722.phpt b/ext/soap/tests/bugs/bug27722.phpt index 3619fb12a3..847c09286c 100644 --- a/ext/soap/tests/bugs/bug27722.phpt +++ b/ext/soap/tests/bugs/bug27722.phpt @@ -8,7 +8,7 @@ wsdl soap.wsdl_cache_enabled=0 --FILE-- <?php -$x = new SoapClient(dirname(__FILE__)."/bug27722.wsdl"); +$x = new SoapClient(__DIR__."/bug27722.wsdl"); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug27742.phpt b/ext/soap/tests/bugs/bug27742.phpt index 5d9636fdf5..adc4fe582e 100644 --- a/ext/soap/tests/bugs/bug27742.phpt +++ b/ext/soap/tests/bugs/bug27742.phpt @@ -8,7 +8,7 @@ wsdl soap.wsdl_cache_enabled=0 --FILE-- <?php -$x = new SoapClient(dirname(__FILE__)."/bug27742.wsdl"); +$x = new SoapClient(__DIR__."/bug27742.wsdl"); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug28985.phpt b/ext/soap/tests/bugs/bug28985.phpt index 73ff899c39..0c3f1432aa 100644 --- a/ext/soap/tests/bugs/bug28985.phpt +++ b/ext/soap/tests/bugs/bug28985.phpt @@ -6,7 +6,7 @@ Bug #28985 (__getTypes() returning nothing on complex WSDL) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SOAPClient(dirname(__FILE__).'/bug28985.wsdl', array('trace'=>1)); +$client = new SOAPClient(__DIR__.'/bug28985.wsdl', array('trace'=>1)); var_dump($client->__getTypes()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug29061.phpt b/ext/soap/tests/bugs/bug29061.phpt index 42e4ed517b..7cefe44995 100644 --- a/ext/soap/tests/bugs/bug29061.phpt +++ b/ext/soap/tests/bugs/bug29061.phpt @@ -6,7 +6,7 @@ Bug #29061 (soap extension segfaults) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/bug29061.wsdl", array("exceptions"=>0)); +$client = new SoapClient(__DIR__."/bug29061.wsdl", array("exceptions"=>0)); $client->getQuote("ibm"); echo "ok\n"; ?> diff --git a/ext/soap/tests/bugs/bug29109.phpt b/ext/soap/tests/bugs/bug29109.phpt index acbc7d4cd1..969783ca29 100644 --- a/ext/soap/tests/bugs/bug29109.phpt +++ b/ext/soap/tests/bugs/bug29109.phpt @@ -6,7 +6,7 @@ Bug #29109 (Uncaught SoapFault exception: [WSDL] Out of memory) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/bug29109.wsdl"); +$client = new SoapClient(__DIR__."/bug29109.wsdl"); var_dump($client->__getFunctions()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug29236.phpt b/ext/soap/tests/bugs/bug29236.phpt index 659a8293db..f1d7b0e10f 100644 --- a/ext/soap/tests/bugs/bug29236.phpt +++ b/ext/soap/tests/bugs/bug29236.phpt @@ -6,7 +6,7 @@ Bug #29236 (memory error when wsdl-cache is enabled) soap.wsdl_cache_enabled=1 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); +$client = new SoapClient(__DIR__."/bug29236.wsdl"); var_dump($client->__getFunctions()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug29795.phpt b/ext/soap/tests/bugs/bug29795.phpt index 388caa60b6..fce064ef43 100644 --- a/ext/soap/tests/bugs/bug29795.phpt +++ b/ext/soap/tests/bugs/bug29795.phpt @@ -23,10 +23,10 @@ EOF; } -$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$client = new LocalSoapClient(__DIR__."/bug29795.wsdl",array("trace"=>1)); $ar=$client->GetPrice(); echo "o"; -$client = new LocalSoapClient(dirname(__FILE__)."/bug29795.wsdl",array("trace"=>1)); +$client = new LocalSoapClient(__DIR__."/bug29795.wsdl",array("trace"=>1)); $ar=$client->GetPrice(); echo "k\n"; ?> diff --git a/ext/soap/tests/bugs/bug29839.phpt b/ext/soap/tests/bugs/bug29839.phpt index 8bead388fa..3d2bcfbfc2 100644 --- a/ext/soap/tests/bugs/bug29839.phpt +++ b/ext/soap/tests/bugs/bug29839.phpt @@ -29,7 +29,7 @@ class LocalSoapClient extends SoapClient { } -$client = new LocalSoapClient(dirname(__FILE__)."/bug29839.wsdl", array("trace"=>1)); +$client = new LocalSoapClient(__DIR__."/bug29839.wsdl", array("trace"=>1)); $client->EchoString(array("value"=>"hello","lang"=>"en")); echo $client->__getLastRequest(); echo $client->__getLastResponse(); diff --git a/ext/soap/tests/bugs/bug29844.phpt b/ext/soap/tests/bugs/bug29844.phpt index 26f1151a93..3e86c26840 100644 --- a/ext/soap/tests/bugs/bug29844.phpt +++ b/ext/soap/tests/bugs/bug29844.phpt @@ -31,7 +31,7 @@ class LocalSoapClient extends SoapClient { } -$client = new LocalSoapClient(dirname(__FILE__)."/bug29844.wsdl", array("trace"=>1)); +$client = new LocalSoapClient(__DIR__."/bug29844.wsdl", array("trace"=>1)); var_dump($client->hello('davey')); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug30106.phpt b/ext/soap/tests/bugs/bug30106.phpt index 3444812623..b02b1bded2 100644 --- a/ext/soap/tests/bugs/bug30106.phpt +++ b/ext/soap/tests/bugs/bug30106.phpt @@ -30,7 +30,7 @@ class LocalSoapClient extends SoapClient { } } -$client = new LocalSoapClient(dirname(__FILE__)."/bug30106.wsdl"); +$client = new LocalSoapClient(__DIR__."/bug30106.wsdl"); var_dump($client->__getFunctions()); var_dump($client->__getTypes()); $x = $client->getContinentList(array("AFFILIATE_ID"=>1,"PASSWORD"=>"x")); diff --git a/ext/soap/tests/bugs/bug30175.phpt b/ext/soap/tests/bugs/bug30175.phpt index 8d721ea69d..9af18bc34d 100644 --- a/ext/soap/tests/bugs/bug30175.phpt +++ b/ext/soap/tests/bugs/bug30175.phpt @@ -33,7 +33,7 @@ EOF; } -$client = new LocalSoapClient(dirname(__FILE__)."/bug30175.wsdl"); +$client = new LocalSoapClient(__DIR__."/bug30175.wsdl"); var_dump($client->qwebGetHostInfo()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug30928.phpt b/ext/soap/tests/bugs/bug30928.phpt index e1fe17a359..ace71764f9 100644 --- a/ext/soap/tests/bugs/bug30928.phpt +++ b/ext/soap/tests/bugs/bug30928.phpt @@ -33,11 +33,11 @@ class LocalSoapClient extends SoapClient { } } -$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", +$x = new LocalSoapClient(__DIR__."/bug30928.wsdl", array()); var_dump($x->test(new foo())); -$x = new LocalSoapClient(dirname(__FILE__)."/bug30928.wsdl", +$x = new LocalSoapClient(__DIR__."/bug30928.wsdl", array("classmap" => array('testType'=>'foo'))); var_dump($x->test(new foo())); diff --git a/ext/soap/tests/bugs/bug31695.phpt b/ext/soap/tests/bugs/bug31695.phpt index 6d3fae0d25..708d489a0d 100644 --- a/ext/soap/tests/bugs/bug31695.phpt +++ b/ext/soap/tests/bugs/bug31695.phpt @@ -27,9 +27,9 @@ class LocalSoapClient extends SoapClient { } } -$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl"); +$client = new LocalSoapClient(__DIR__."/bug31695.wsdl"); $client->Test("str"); -$client = new LocalSoapClient(dirname(__FILE__)."/bug31695.wsdl", array("location"=>"test://1")); +$client = new LocalSoapClient(__DIR__."/bug31695.wsdl", array("location"=>"test://1")); $client->Test("str"); $client->__soapCall("Test", array("arg1"), diff --git a/ext/soap/tests/bugs/bug32776.phpt b/ext/soap/tests/bugs/bug32776.phpt index ae863bd339..316b0e15ed 100644 --- a/ext/soap/tests/bugs/bug32776.phpt +++ b/ext/soap/tests/bugs/bug32776.phpt @@ -32,7 +32,7 @@ class LocalSoapClient extends SoapClient { } -$x = new LocalSoapClient(dirname(__FILE__)."/bug32776.wsdl",array("trace"=>true,"exceptions"=>false)); +$x = new LocalSoapClient(__DIR__."/bug32776.wsdl",array("trace"=>true,"exceptions"=>false)); var_dump($x->test("Hello")); var_dump($d); var_dump($x->__getLastRequest()); diff --git a/ext/soap/tests/bugs/bug32941.phpt b/ext/soap/tests/bugs/bug32941.phpt index d1e3fff85d..cbab7008d7 100644 --- a/ext/soap/tests/bugs/bug32941.phpt +++ b/ext/soap/tests/bugs/bug32941.phpt @@ -31,9 +31,9 @@ EOF; } ini_set("soap.wsdl_cache_enabled", 1); -$client = new TestSoapClient(dirname(__FILE__).'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); +$client = new TestSoapClient(__DIR__.'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); $ahoj = $client->echoString('exception'); -$client = new TestSoapClient(dirname(__FILE__).'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); +$client = new TestSoapClient(__DIR__.'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); $ahoj = $client->echoString('exception'); echo "ok\n"; ?> diff --git a/ext/soap/tests/bugs/bug34453.phpt b/ext/soap/tests/bugs/bug34453.phpt index 0a9dd80179..cdaadd5c73 100644 --- a/ext/soap/tests/bugs/bug34453.phpt +++ b/ext/soap/tests/bugs/bug34453.phpt @@ -29,7 +29,7 @@ class LocalSoapClient extends SoapClient { } -$client = new LocalSoapClient(dirname(__FILE__)."/bug34453.wsdl", array("trace"=>1)); +$client = new LocalSoapClient(__DIR__."/bug34453.wsdl", array("trace"=>1)); $client->EchoString(array("value"=>"hello","lang"=>"en")); echo $client->__getLastRequest(); echo $client->__getLastResponse(); diff --git a/ext/soap/tests/bugs/bug34643.phpt b/ext/soap/tests/bugs/bug34643.phpt index b99565129c..7430b34474 100644 --- a/ext/soap/tests/bugs/bug34643.phpt +++ b/ext/soap/tests/bugs/bug34643.phpt @@ -32,7 +32,7 @@ class LocalSoapClient extends SoapClient { } -$cl = new LocalSoapClient(dirname(__FILE__).'/bug34643.wsdl', array("trace"=>1)); +$cl = new LocalSoapClient(__DIR__.'/bug34643.wsdl', array("trace"=>1)); print_r($cl->__getFunctions()); echo $cl->get_it("aaa")."\n"; echo $cl->get_it()."\n"; diff --git a/ext/soap/tests/bugs/bug35142.phpt b/ext/soap/tests/bugs/bug35142.phpt index 2e523030a9..f10885767c 100644 --- a/ext/soap/tests/bugs/bug35142.phpt +++ b/ext/soap/tests/bugs/bug35142.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 <?php ini_set("soap.wsdl_cache_enabled",0); $timestamp = "2005-11-08T11:22:07+03:00"; -$wsdl = dirname(__FILE__)."/bug35142.wsdl"; +$wsdl = __DIR__."/bug35142.wsdl"; function PostEvents($x) { var_dump($x); diff --git a/ext/soap/tests/bugs/bug35273.phpt b/ext/soap/tests/bugs/bug35273.phpt index e22ebd7dca..f04dc68646 100644 --- a/ext/soap/tests/bugs/bug35273.phpt +++ b/ext/soap/tests/bugs/bug35273.phpt @@ -14,7 +14,7 @@ class TestSoapClient extends SoapClient { } ini_set("soap.wsdl_cache_enabled", 0); -$client = new TestSoapClient(dirname(__FILE__).'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); +$client = new TestSoapClient(__DIR__.'/bug32941.wsdl', array("trace" => 1, 'exceptions' => 0)); $ahoj = $client->echoPerson(array("name"=>"Name","surname"=>"Surname")); echo "ok\n"; ?> diff --git a/ext/soap/tests/bugs/bug36226-2.phpt b/ext/soap/tests/bugs/bug36226-2.phpt index e14832db4b..bc9b05a856 100644 --- a/ext/soap/tests/bugs/bug36226-2.phpt +++ b/ext/soap/tests/bugs/bug36226-2.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $timestamp = "2005-11-08T11:22:07+03:00"; -$wsdl = dirname(__FILE__)."/bug36226-2.wsdl"; +$wsdl = __DIR__."/bug36226-2.wsdl"; function PostEvents($x) { var_dump($x); diff --git a/ext/soap/tests/bugs/bug36226.phpt b/ext/soap/tests/bugs/bug36226.phpt index 1e398c0c2c..a54b687f95 100644 --- a/ext/soap/tests/bugs/bug36226.phpt +++ b/ext/soap/tests/bugs/bug36226.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 <?php ini_set("soap.wsdl_cache_enabled",0); $timestamp = "2005-11-08T11:22:07+03:00"; -$wsdl = dirname(__FILE__)."/bug35142.wsdl"; +$wsdl = __DIR__."/bug35142.wsdl"; function PostEvents($x) { var_dump($x); diff --git a/ext/soap/tests/bugs/bug36575.phpt b/ext/soap/tests/bugs/bug36575.phpt index 9bf5415220..8e5f469546 100644 --- a/ext/soap/tests/bugs/bug36575.phpt +++ b/ext/soap/tests/bugs/bug36575.phpt @@ -29,7 +29,7 @@ function test( $a1 ) { $classMap = array("A1" => "CT_A1", "A2" => "CT_A2", "A3" => "CT_A3"); -$client = new SoapClient(dirname(__FILE__)."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap)); +$client = new SoapClient(__DIR__."/bug36575.wsdl", array("trace" => 1, "exceptions" => 0, "classmap" => $classMap)); $a2 = new CT_A2(); $a2->var1 = "one"; $a2->var2 = "two"; @@ -39,7 +39,7 @@ $soapRequest = $client->__getLastRequest(); echo $soapRequest; -$server = new SoapServer(dirname(__FILE__)."/bug36575.wsdl", array("classmap" => $classMap)); +$server = new SoapServer(__DIR__."/bug36575.wsdl", array("classmap" => $classMap)); $server->addFunction("test"); $server->handle($soapRequest); echo "ok\n"; diff --git a/ext/soap/tests/bugs/bug36614.phpt b/ext/soap/tests/bugs/bug36614.phpt index ba6734812d..86d312dfe4 100644 --- a/ext/soap/tests/bugs/bug36614.phpt +++ b/ext/soap/tests/bugs/bug36614.phpt @@ -6,7 +6,7 @@ Bug #36614 (Segfault when using Soap) soap.wsdl_cache_enabled=0 --FILE-- <?php -$lo_soap = new SoapClient(dirname(__FILE__)."/bug36614.wsdl"); +$lo_soap = new SoapClient(__DIR__."/bug36614.wsdl"); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug36908.phpt b/ext/soap/tests/bugs/bug36908.phpt index 2d2a46410c..cc3f75847d 100644 --- a/ext/soap/tests/bugs/bug36908.phpt +++ b/ext/soap/tests/bugs/bug36908.phpt @@ -37,7 +37,7 @@ xsi:type="xsd:long">9</multiRef> </soapenv:Body> </soapenv:Envelope>'; ini_set('soap.wsdl_cache_enabled', false); -$server = new SoapServer(dirname(__FILE__)."/bug36908.wsdl"); +$server = new SoapServer(__DIR__."/bug36908.wsdl"); $server->setClass("PublisherService"); $server->handle($input); ?> diff --git a/ext/soap/tests/bugs/bug36999.phpt b/ext/soap/tests/bugs/bug36999.phpt index eed02ecf0b..443e90418f 100644 --- a/ext/soap/tests/bugs/bug36999.phpt +++ b/ext/soap/tests/bugs/bug36999.phpt @@ -31,7 +31,7 @@ class LocalSoapClient extends SoapClient { } -$soap = new LocalSoapClient(dirname(__FILE__)."/bug36999.wsdl"); +$soap = new LocalSoapClient(__DIR__."/bug36999.wsdl"); function test($num) { global $soap; diff --git a/ext/soap/tests/bugs/bug37013.phpt b/ext/soap/tests/bugs/bug37013.phpt index 7c0546ba2d..492242d7d5 100644 --- a/ext/soap/tests/bugs/bug37013.phpt +++ b/ext/soap/tests/bugs/bug37013.phpt @@ -49,7 +49,7 @@ class MultiRefTest { } -$server = new SoapServer(dirname(__FILE__)."/bug37013.wsdl"); +$server = new SoapServer(__DIR__."/bug37013.wsdl"); $server->setClass( "MultiRefTest"); $server->handle( $request ); ?> diff --git a/ext/soap/tests/bugs/bug37083.phpt b/ext/soap/tests/bugs/bug37083.phpt index d915ec0440..cfd698e4be 100644 --- a/ext/soap/tests/bugs/bug37083.phpt +++ b/ext/soap/tests/bugs/bug37083.phpt @@ -41,7 +41,7 @@ EOF; } } for ($i = 0; $i < 10; $i++) { - $ws=new TestSoapClient(dirname(__FILE__).'/bug37083.wsdl', + $ws=new TestSoapClient(__DIR__.'/bug37083.wsdl', array('encoding'=>'ISO-8859-1', 'cache_wsdl'=>WSDL_CACHE_BOTH)); $search=new stdClass(); diff --git a/ext/soap/tests/bugs/bug38004.phpt b/ext/soap/tests/bugs/bug38004.phpt index fea4f0379a..43d3e86d02 100644 --- a/ext/soap/tests/bugs/bug38004.phpt +++ b/ext/soap/tests/bugs/bug38004.phpt @@ -28,7 +28,7 @@ class TestSoapClient extends SoapClient { } } -$client = new TestSoapClient(dirname(__FILE__).'/bug38004.wsdl'); +$client = new TestSoapClient(__DIR__.'/bug38004.wsdl'); $strA = 'test & test'; $strB = 'test & test'; $res = $client->Test(array('strA'=>$strA, 'strB'=>$strB)); diff --git a/ext/soap/tests/bugs/bug38055.phpt b/ext/soap/tests/bugs/bug38055.phpt index 82b6c76f77..7b5ed49a27 100644 --- a/ext/soap/tests/bugs/bug38055.phpt +++ b/ext/soap/tests/bugs/bug38055.phpt @@ -29,7 +29,7 @@ class TestSoapClient extends SoapClient { } } -$client = new TestSoapClient(dirname(__FILE__).'/bug38055.wsdl'); +$client = new TestSoapClient(__DIR__.'/bug38055.wsdl'); $boolA = 1; $boolB = '1'; $res = $client->Test(array('boolA'=>$boolA, 'boolB'=>$boolB)); diff --git a/ext/soap/tests/bugs/bug38067.phpt b/ext/soap/tests/bugs/bug38067.phpt index c9bf3c165c..7664135de3 100644 --- a/ext/soap/tests/bugs/bug38067.phpt +++ b/ext/soap/tests/bugs/bug38067.phpt @@ -28,7 +28,7 @@ class TestSoapClient extends SoapClient { } } -$client = new TestSoapClient(dirname(__FILE__).'/bug38067.wsdl', +$client = new TestSoapClient(__DIR__.'/bug38067.wsdl', array('encoding' => 'ISO-8859-1')); $str = 'test: '; $res = $client->Test(array('str'=>$str)); diff --git a/ext/soap/tests/bugs/bug38536.phpt b/ext/soap/tests/bugs/bug38536.phpt index feea46e97e..bbd166de42 100644 --- a/ext/soap/tests/bugs/bug38536.phpt +++ b/ext/soap/tests/bugs/bug38536.phpt @@ -36,7 +36,7 @@ EOF; } ini_set("soap.wsdl_cache_enabled", 0); -$SOAPObject = new LocalSoapClient(dirname(__FILE__).'/bug38536.wsdl'); +$SOAPObject = new LocalSoapClient(__DIR__.'/bug38536.wsdl'); print_r($SOAPObject->test()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug39832.phpt b/ext/soap/tests/bugs/bug39832.phpt index 6abc2f0aff..a4c4639f49 100644 --- a/ext/soap/tests/bugs/bug39832.phpt +++ b/ext/soap/tests/bugs/bug39832.phpt @@ -20,7 +20,7 @@ function Test($x) { return $x->priority; } -$x = new SoapServer(dirname(__FILE__)."/bug39832.wsdl"); +$x = new SoapServer(__DIR__."/bug39832.wsdl"); $x->addFunction("Test"); $x->handle($HTTP_RAW_POST_DATA); ?> diff --git a/ext/soap/tests/bugs/bug40609.phpt b/ext/soap/tests/bugs/bug40609.phpt index 198afc511e..ab07536c31 100644 --- a/ext/soap/tests/bugs/bug40609.phpt +++ b/ext/soap/tests/bugs/bug40609.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 <?php ini_set("soap.wsdl_cache_enabled", 0); -$c = new SoapClient(dirname(__FILE__)."/bug40609.wsdl", array('trace' => 1, 'exceptions' => 0)); +$c = new SoapClient(__DIR__."/bug40609.wsdl", array('trace' => 1, 'exceptions' => 0)); $c->update(array('symbol' => new SoapVar("<symbol>MSFT</symbol>", XSD_ANYXML), 'price' => new SoapVar("<price>1000</price>", XSD_ANYXML))); diff --git a/ext/soap/tests/bugs/bug41004.phpt b/ext/soap/tests/bugs/bug41004.phpt index 87ab88598e..c38bf0d62b 100644 --- a/ext/soap/tests/bugs/bug41004.phpt +++ b/ext/soap/tests/bugs/bug41004.phpt @@ -20,7 +20,7 @@ class EchoResponse{ public $out; } -$wsdl = dirname(__FILE__)."/bug41004.wsdl"; +$wsdl = __DIR__."/bug41004.wsdl"; $classmap = array('EchoBean'=>'EchoBean','echo'=>'EchoRequest','echoResponse'=>'EchoResponse'); $client = new SoapClient($wsdl, array('location'=>'test://',"classmap" => $classmap, 'exceptions'=>0, 'trace'=>1)); $echo=new EchoRequest(); diff --git a/ext/soap/tests/bugs/bug41337.phpt b/ext/soap/tests/bugs/bug41337.phpt index cd777d1dea..5a4586afe1 100644 --- a/ext/soap/tests/bugs/bug41337.phpt +++ b/ext/soap/tests/bugs/bug41337.phpt @@ -5,7 +5,7 @@ Bug #41337 (WSDL parsing doesn't ignore non soap bindings) --FILE-- <?php ini_set("soap.wsdl_cache_enabled",0); -$client = new SoapClient(dirname(__FILE__)."/bug41337.wsdl"); +$client = new SoapClient(__DIR__."/bug41337.wsdl"); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug41337_2.phpt b/ext/soap/tests/bugs/bug41337_2.phpt index d594d2515d..61863d364c 100644 --- a/ext/soap/tests/bugs/bug41337_2.phpt +++ b/ext/soap/tests/bugs/bug41337_2.phpt @@ -5,7 +5,7 @@ Bug #41337 (WSDL parsing doesn't ignore non soap bindings) --FILE-- <?php ini_set("soap.wsdl_cache_enabled",0); -$client = new SoapClient(dirname(__FILE__)."/bug41337_2.wsdl"); +$client = new SoapClient(__DIR__."/bug41337_2.wsdl"); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug42086.phpt b/ext/soap/tests/bugs/bug42086.phpt index 35e5ef0e07..bdaf55ac83 100644 --- a/ext/soap/tests/bugs/bug42086.phpt +++ b/ext/soap/tests/bugs/bug42086.phpt @@ -21,7 +21,7 @@ function firstFunctionWithoutParam() { return $ret; } -$server = new SoapServer(dirname(__FILE__).'/bug42086.wsdl', +$server = new SoapServer(__DIR__.'/bug42086.wsdl', array('features'=>SOAP_SINGLE_ELEMENT_ARRAYS)); $server->addFunction('firstFunctionWithoutParam'); $server->handle($request); diff --git a/ext/soap/tests/bugs/bug42326.phpt b/ext/soap/tests/bugs/bug42326.phpt index a1d8d59fc0..1eabaa14da 100644 --- a/ext/soap/tests/bugs/bug42326.phpt +++ b/ext/soap/tests/bugs/bug42326.phpt @@ -38,7 +38,7 @@ class SOAP_Admin { } } -$soap = new SoapServer(dirname(__FILE__).'/bug42326.wsdl', array('classmap' => $soap_admin_classmap)); +$soap = new SoapServer(__DIR__.'/bug42326.wsdl', array('classmap' => $soap_admin_classmap)); $soap->setClass('SOAP_Admin'); ob_start(); $soap->handle($request); diff --git a/ext/soap/tests/bugs/bug42359.phpt b/ext/soap/tests/bugs/bug42359.phpt index 42ad8b8a06..0dff891803 100644 --- a/ext/soap/tests/bugs/bug42359.phpt +++ b/ext/soap/tests/bugs/bug42359.phpt @@ -6,7 +6,7 @@ Bug #42326 (SoapServer crash) soap.wsdl_cache_enabled=0 --FILE-- <?php -$soap = new SoapClient(dirname(__FILE__)."/bug42359.wsdl"); +$soap = new SoapClient(__DIR__."/bug42359.wsdl"); print_r($soap->__getTypes()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug42692.phpt b/ext/soap/tests/bugs/bug42692.phpt index 1436f881e5..b221a3a862 100644 --- a/ext/soap/tests/bugs/bug42692.phpt +++ b/ext/soap/tests/bugs/bug42692.phpt @@ -27,7 +27,7 @@ class TestSoap extends SoapClient { } } -$client = new TestSoap(dirname(__FILE__) . "/bug42692.wsdl", array("trace"=>1)); +$client = new TestSoap(__DIR__ . "/bug42692.wsdl", array("trace"=>1)); try { $result = $client->checkAuth(1,"two"); echo "Auth for 1 is $result\n"; diff --git a/ext/soap/tests/bugs/bug44686.phpt b/ext/soap/tests/bugs/bug44686.phpt index 89a06a1b08..81ed1cf6ec 100644 --- a/ext/soap/tests/bugs/bug44686.phpt +++ b/ext/soap/tests/bugs/bug44686.phpt @@ -6,7 +6,7 @@ Bug #44686 (SOAP-ERROR: Parsing WSDL with references) soap.wsdl_cache_enabled=0 --FILE-- <?php -new SoapClient(dirname(__FILE__) . "/bug44686.wsdl"); +new SoapClient(__DIR__ . "/bug44686.wsdl"); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug44882.phpt b/ext/soap/tests/bugs/bug44882.phpt index 366ddde7c4..128011722f 100644 --- a/ext/soap/tests/bugs/bug44882.phpt +++ b/ext/soap/tests/bugs/bug44882.phpt @@ -38,7 +38,7 @@ XML; } } -$client = new TestSoapClient(dirname(__FILE__).'/bug44882.wsdl'); +$client = new TestSoapClient(__DIR__.'/bug44882.wsdl'); print_r($client->GetExpressCheckoutDetails()); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug47049.phpt b/ext/soap/tests/bugs/bug47049.phpt index bdc16274e2..467df2b901 100644 --- a/ext/soap/tests/bugs/bug47049.phpt +++ b/ext/soap/tests/bugs/bug47049.phpt @@ -6,7 +6,7 @@ Bug #47049 (SoapClient::__soapCall causes a segmentation fault) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__) . '/bug47049.wsdl', +$client = new SoapClient(__DIR__ . '/bug47049.wsdl', array('trace' => 1 , 'exceptions' => 0)); $host = array('uuid' => 'foo'); $software_list = array(array('name' => 'package', 'version' => '1.2.3', 'state' => 'installed')); diff --git a/ext/soap/tests/bugs/bug50675.phpt b/ext/soap/tests/bugs/bug50675.phpt index c5feb173ac..017671620b 100644 --- a/ext/soap/tests/bugs/bug50675.phpt +++ b/ext/soap/tests/bugs/bug50675.phpt @@ -37,7 +37,7 @@ $parameters = [ 'trace' => 1, 'exceptions' => 0, ]; -$client = new TestSoapClient(dirname(__FILE__) . '/bug50675.wsdl', $parameters); +$client = new TestSoapClient(__DIR__ . '/bug50675.wsdl', $parameters); $person = new stdClass(); $person->name = 'name'; diff --git a/ext/soap/tests/bugs/bug50698_1.phpt b/ext/soap/tests/bugs/bug50698_1.phpt index eb5f1e028b..6f97b62e06 100644 --- a/ext/soap/tests/bugs/bug50698_1.phpt +++ b/ext/soap/tests/bugs/bug50698_1.phpt @@ -6,7 +6,7 @@ Request #50698_1 (SoapClient should handle wsdls with some incompatiable endpoin soap.wsdl_cache_enabled=0 --FILE-- <?php -new SoapClient(dirname(__FILE__) . '/bug50698_1.wsdl'); +new SoapClient(__DIR__ . '/bug50698_1.wsdl'); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug50698_2.phpt b/ext/soap/tests/bugs/bug50698_2.phpt index 79bbb3bd80..994d78dce9 100644 --- a/ext/soap/tests/bugs/bug50698_2.phpt +++ b/ext/soap/tests/bugs/bug50698_2.phpt @@ -7,13 +7,13 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php try { - new SoapClient(dirname(__FILE__) . '/bug50698_2.wsdl'); - echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" should throw an exception of type 'SoapFault'"; + new SoapClient(__DIR__ . '/bug50698_2.wsdl'); + echo "Call: \"new SoapClient(__DIR__.'/bug50698_2.wsdl');\" should throw an exception of type 'SoapFault'"; } catch (SoapFault $e) { if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { echo "ok\n"; } else { - echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + echo "Call: \"new SoapClient(__DIR__.'/bug50698_2.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; print_r($e); } } diff --git a/ext/soap/tests/bugs/bug50698_3.phpt b/ext/soap/tests/bugs/bug50698_3.phpt index 341a4afb97..c2f66a1618 100644 --- a/ext/soap/tests/bugs/bug50698_3.phpt +++ b/ext/soap/tests/bugs/bug50698_3.phpt @@ -7,13 +7,13 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php try { - new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl'); - echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" should throw an exception of type 'SoapFault'"; + new SoapClient(__DIR__ . '/bug50698_3.wsdl'); + echo "Call: \"new SoapClient(__DIR__.'/bug50698_3.wsdl');\" should throw an exception of type 'SoapFault'"; } catch (SoapFault $e) { if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { echo "ok\n"; } else { - echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + echo "Call: \"new SoapClient(__DIR__.'/bug50698_3.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; print_r($e); } } diff --git a/ext/soap/tests/bugs/bug50698_4.phpt b/ext/soap/tests/bugs/bug50698_4.phpt index bb02d00939..6240d11892 100644 --- a/ext/soap/tests/bugs/bug50698_4.phpt +++ b/ext/soap/tests/bugs/bug50698_4.phpt @@ -6,7 +6,7 @@ Request #50698_4 (SoapClient should handle wsdls with some incompatiable endpoin soap.wsdl_cache_enabled=0 --FILE-- <?php -new SoapClient(dirname(__FILE__) . '/bug50698_4.wsdl'); +new SoapClient(__DIR__ . '/bug50698_4.wsdl'); echo "ok\n"; ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug50762.phpt b/ext/soap/tests/bugs/bug50762.phpt index 77eb6ee6da..c48c761ea2 100644 --- a/ext/soap/tests/bugs/bug50762.phpt +++ b/ext/soap/tests/bugs/bug50762.phpt @@ -32,7 +32,7 @@ class LocalSoapClient extends SoapClient { } -$cl = new LocalSoapClient(dirname(__FILE__).'/bug50762.wsdl', array('cache_wsdl'=>WSDL_CACHE_NONE, 'trace'=>true)); +$cl = new LocalSoapClient(__DIR__.'/bug50762.wsdl', array('cache_wsdl'=>WSDL_CACHE_NONE, 'trace'=>true)); class authToken{ public function __construct($token){ diff --git a/ext/soap/tests/bugs/bug55323.phpt b/ext/soap/tests/bugs/bug55323.phpt index 7855dd845a..fddb434f4a 100644 --- a/ext/soap/tests/bugs/bug55323.phpt +++ b/ext/soap/tests/bugs/bug55323.phpt @@ -6,7 +6,7 @@ Bug #55323 (SoapClient segmentation fault when XSD_TYPEKIND_EXTENSION contains i <?php ini_set("soap.wsdl_cache_enabled",0); $timestamp = "2011-07-30T03:25:00-05:00"; -$wsdl = dirname(__FILE__)."/bug55323.wsdl"; +$wsdl = __DIR__."/bug55323.wsdl"; class TestSoapClient extends SoapClient { diff --git a/ext/soap/tests/bugs/bug66112.phpt b/ext/soap/tests/bugs/bug66112.phpt index 4d5be79296..743297ac23 100644 --- a/ext/soap/tests/bugs/bug66112.phpt +++ b/ext/soap/tests/bugs/bug66112.phpt @@ -6,7 +6,7 @@ Bug #66112 (Use after free condition in SOAP extension) soap.wsdl_cache_enabled=0 --FILE-- <?php -define('WSDL', dirname(__FILE__)."/bug66112.wsdl"); +define('WSDL', __DIR__."/bug66112.wsdl"); function Mist($p) { $client=new soapclient(WSDL, array('typemap'=>array(array("type_ns"=>"uri:mist", "type_name"=>"A")))); try{ diff --git a/ext/soap/tests/bugs/bug73237.phpt b/ext/soap/tests/bugs/bug73237.phpt index e97345fdaa..cbff30e612 100644 --- a/ext/soap/tests/bugs/bug73237.phpt +++ b/ext/soap/tests/bugs/bug73237.phpt @@ -13,7 +13,7 @@ class LocalSoapClient extends SoapClient { EOF; } } -$client = new LocalSoapClient(dirname(__FILE__)."/bug73237.wsdl"); +$client = new LocalSoapClient(__DIR__."/bug73237.wsdl"); var_dump($client->query("")); ?> --EXPECT-- diff --git a/ext/soap/tests/bugs/bug75502.phpt b/ext/soap/tests/bugs/bug75502.phpt index 43cd800556..d9630ed658 100644 --- a/ext/soap/tests/bugs/bug75502.phpt +++ b/ext/soap/tests/bugs/bug75502.phpt @@ -9,7 +9,7 @@ soap.wsdl_cache=2 <?php /* The important part is that restriction>enumeration is used together with mem cache. * Reuse a WSDL file contains this. */ -$client = new SoapClient(dirname(__FILE__)."/bug29236.wsdl"); +$client = new SoapClient(__DIR__."/bug29236.wsdl"); ?> ===DONE=== --EXPECT-- diff --git a/ext/soap/tests/bugs/multiport.phpt b/ext/soap/tests/bugs/multiport.phpt index 90799cf492..53e281130f 100644 --- a/ext/soap/tests/bugs/multiport.phpt +++ b/ext/soap/tests/bugs/multiport.phpt @@ -6,7 +6,7 @@ Proper binding selection soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__).'/multiport.wsdl', +$client = new SoapClient(__DIR__.'/multiport.wsdl', array('trace' => true, 'exceptions' => false)); $response = $client->GetSessionId(array('userId'=>'user', 'password'=>'password')); echo $client->__getLastRequest(); diff --git a/ext/soap/tests/classmap001.phpt b/ext/soap/tests/classmap001.phpt index 7699aab2bc..1a3a472c27 100644 --- a/ext/soap/tests/classmap001.phpt +++ b/ext/soap/tests/classmap001.phpt @@ -41,7 +41,7 @@ $options=Array( 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') ); -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server = new SoapServer(__DIR__."/classmap.wsdl",$options); $server->setClass("test"); $server->handle($GLOBALS['HTTP_RAW_POST_DATA']); echo "ok\n"; diff --git a/ext/soap/tests/classmap002.phpt b/ext/soap/tests/classmap002.phpt index cbd74f2f74..2f16cf506a 100644 --- a/ext/soap/tests/classmap002.phpt +++ b/ext/soap/tests/classmap002.phpt @@ -31,7 +31,7 @@ $options=Array( 'classmap' => array('book'=>'book', 'wsdltype2'=>'classname2') ); -$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$client = new TestSoapClient(__DIR__."/classmap.wsdl",$options); $ret = $client->dotest2("???"); var_dump($ret); echo "ok\n"; diff --git a/ext/soap/tests/classmap003.phpt b/ext/soap/tests/classmap003.phpt index 2f49bb4e34..3150c4be81 100644 --- a/ext/soap/tests/classmap003.phpt +++ b/ext/soap/tests/classmap003.phpt @@ -42,7 +42,7 @@ class LocalSoapClient extends SoapClient { } } -$client = new LocalSoapClient(dirname(__FILE__)."/classmap003.wsdl", +$client = new LocalSoapClient(__DIR__."/classmap003.wsdl", array('classmap'=>array('A'=>'A','B'=>'B'))); print_r($client->f()); ?> diff --git a/ext/soap/tests/classmap004.phpt b/ext/soap/tests/classmap004.phpt index e8bf58a4f9..f2aad0175a 100644 --- a/ext/soap/tests/classmap004.phpt +++ b/ext/soap/tests/classmap004.phpt @@ -50,7 +50,7 @@ class LocalSoapClient extends SoapClient { } } -$client = new LocalSoapClient(dirname(__FILE__)."/classmap003.wsdl", +$client = new LocalSoapClient(__DIR__."/classmap003.wsdl", array('classmap'=>array('A'=>'A','B'=>'B'))); print_r($client->f()); ?> diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt index 2442933dae..4845155a33 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World!"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt index b2a21f385c..ca36526947 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 002 (php/wsdl): echoString(empty) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString(""); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt index 154d57d104..be9307ea70 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_003w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 003 (php/wsdl): echoString(NULL) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString(NULL); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt index 2843519ea6..1ee282352c 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_004w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 004 (php/wsdl): echoString(entities) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString(">,<,&,\",',\\,\n"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt index 728b4f5c58..a629ab9b2b 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_005w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 005 (php/wsdl): echoString(utf-8) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString(utf8_encode('ỗÈéóÒ₧⅜ỗỸ')); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt index 6b63f45262..4425ec9502 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_006w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 006 (php/wsdl): echoStringArray soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringArray(array('good','bad')); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt index 53a91614e6..3f669045a3 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_007w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 007 (php/wsdl): echoStringArray(one) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringArray(array('good')); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt index a99a0fc6ac..df71a912c8 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_008w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 008 (php/wsdl): echoStringArray(empty) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringArray(array()); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt index 16ae634465..7edc3207d2 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_009w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 009 (php/wsdl): echoStringArray(NULL) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringArray(NULL); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt index c7689fa067..5dc4652a32 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_010w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 010 (php/wsdl): echoInteger soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoInteger(34345); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt index 05b27c8320..ebdef98cd7 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_011w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 011 (php/wsdl): echoIntegerArray soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoIntegerArray(array(1,234324324,2)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt index 63a506cafd..2badc6f6f4 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_012w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoFloat(342.23); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt index 6c28380a14..437119c1cf 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_013w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoFloatArray(array(1.3223,34.2,325.325)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt index da78659a13..49f64584e7 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_014w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct(new SOAPStruct('arg',34,325.325)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt index f4e24ad17b..4723a18216 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_015w.phpt @@ -17,7 +17,7 @@ class SOAPStruct { $struct1 = new SOAPStruct('arg',34,325.325); $struct2 = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStructArray(array($struct1,$struct2)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt index 11e379c800..2bc07cc695 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_016w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 016 (php/wsdl): echoVoid soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoVoid(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt index e82360e6d0..2467fb57d4 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_017w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 017 (php/wsdl): echoBase64 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBase64('Nebraska'); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt index 2c0380f4a9..4d7f4d0f0a 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_018w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 018 (php/wsdl): echoHexBinary soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoHexBinary('soapx4'); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt index 45278ef92e..6153a01386 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_019w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 019 (php/wsdl): echoDecimal soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoDecimal('12345.67890'); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt index 787d1e96ff..4383f732ee 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_020w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 020 (php/wsdl): echoDate soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoDate('2001-05-24T17:31:41Z'); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt index 140a823a4f..843b23301e 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_021w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 021 (php/wsdl): echoBoolean soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBoolean(true); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt index 699a5f5f3a..bbc1ef6892 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_022w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 022 (php/wsdl): echoBoolean soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBoolean(false); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt index 356cdcc1a1..6699243a60 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_023w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 023 (php/wsdl): echoBoolean soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBoolean(1); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt index 9fde8369c5..323fbeedfa 100644 --- a/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt +++ b/ext/soap/tests/interop/Round2/Base/r2_base_024w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round2 base 024 (php/wsdl): echoBoolean soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_base.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBoolean(0); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt index 2d7fb6385d..747614f74e 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_001w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStructAsSimpleTypes((object)array('varString'=>"arg",'varInt'=>34,'varFloat'=>34.345)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt index c2b0c05fb3..e990789bfb 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_002w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSimpleTypesAsStruct("arg",34,34.345); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt index cb89dc0b11..aa216da802 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_003w.phpt @@ -9,7 +9,7 @@ soap.wsdl_cache_enabled=0 $param = array( array('row0col0', 'row0col1', 'row0col2'), array('row1col0', 'row1col1', 'row1col2')); -$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echo2DStringArray($param); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt index a51ab2be96..6a42867c6e 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_004w.phpt @@ -17,7 +17,7 @@ $param = (object)array( 'varFloat' => 123.452, )); -$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedStruct($param); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt index e11051f507..a772e14011 100644 --- a/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt +++ b/ext/soap/tests/interop/Round2/GroupB/r2_groupB_005w.phpt @@ -12,7 +12,7 @@ $param = (object)array( 'varInt'=>34, 'varFloat'=>325.325, 'varArray' => array('red','blue','green')); -$client = new SoapClient(dirname(__FILE__)."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round2_groupB.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedArray($param); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt index c27c783b35..243c1bc34e 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_001w.phpt @@ -16,7 +16,7 @@ class Person { } } $person = new Person(32,12345,'Shane',TRUE); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoPerson($person); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt index 9b80248dde..91dcf5c80b 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Compound1 002 (php/wsdl): echoDocument soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoDocument("Test Document Here"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt index d8dbf28390..2feb31661c 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound1_003w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Compound1 003 (php/wsdl): echoDocument soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_compound1.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoDocument((object)array("_"=>"Test Document Here","ID"=>1)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt index 8e418e1c00..43c6f8e007 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_compound2_001w.phpt @@ -25,7 +25,7 @@ class Employee { $person = new Person(32,12345,'Shane',TRUE); $employee = new Employee($person,12345,1000000.00); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_compound2.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_compound2.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoEmployee($employee); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt index 9f6fc41c36..3cd78f4664 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Doc Lit 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt index f3e035e480..0d1cb99c3e 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Doc Lit 002 (php/wsdl): echoStringArray soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringArray(array("one","two","three")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt index 74f0ec0728..a81219e744 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_003w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } $struct = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt index 32fedea52d..28f0e9c90f 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclit_004w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Doc Lit 004 (php/wsdl): echoVoid soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoVoid(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt index 3fd9c5e372..0541cce622 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Doc Lit Parameters 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString(array("param0"=>"Hello World")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt index 564407d529..1b347ff4db 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Doc Lit Parameters 002 (php/wsdl): echoStringArray soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringArray(array("param0"=>array("one","two","three"))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt index e788ffefa3..f9d721fc60 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_003w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } $struct = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct(array("param0"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt index 79b0ced347..8c22336aeb 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_doclitparams_004w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Doc Lit Parameters 004 (php/wsdl): echoVoid soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_doclitparams.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoVoid(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt index 47e2900e3e..6504d2dcba 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_emptysa_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD EmptySA 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_emptysa.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_emptysa.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt index 34eac1cb24..3bbc0cbe55 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import1_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD Import1 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import1.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_import1.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt index ed0387a17e..756c49deb1 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import2_001w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } $struct = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import2.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_import2.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt index f732115b76..4fca5b8169 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_001w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } $struct = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt index b2f740ce09..3f05d4159e 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_import3_002w.phpt @@ -16,7 +16,7 @@ class SOAPStruct { } $struct1 = new SOAPStruct('arg',34,325.325); $struct2 = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_import3.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStructArray(array($struct1,$struct2)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt index c70eae01ce..7fe35b0529 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD RPC Encoded 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt index 839afdef97..638ce76600 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD RPC Encoded 002 (php/wsdl): echoStringArray soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringArray(array("one","two","three")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt index 63bd4c7cf1..5db899cc23 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_003w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } $struct = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStruct($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt index a6cbbe854e..6c919b796e 100644 --- a/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupD/r3_groupD_rpcenc_004w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupD RPC Encoded 004 (php/wsdl): echoVoid soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupD_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoVoid(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt index 11039c0f32..df576c4205 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_001w.phpt @@ -14,7 +14,7 @@ class SOAPList { } } $struct = new SOAPList('arg1',1,NULL); -$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt index 053581dfa0..13341e06eb 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_002w.phpt @@ -14,7 +14,7 @@ class SOAPList { } } $struct = new SOAPList('arg1',1, new SOAPList('arg2',2,NULL)); -$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt index 982114cded..3e84283d69 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_003w.phpt @@ -14,7 +14,7 @@ class SOAPList { } } $struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL))); -$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt index 1c798aaf97..57e649a5fe 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_004w.phpt @@ -14,7 +14,7 @@ class SOAPList { } } $struct = NULL; -$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt index 4a0e047856..68047e4645 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt @@ -15,7 +15,7 @@ class SOAPList { } $struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL))); $struct->child->child->child = $struct; -$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt index 694eb1a7f2..ee74830b31 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt @@ -15,7 +15,7 @@ class SOAPList { } $struct = new SOAPList('arg1',1,new SOAPList('arg2',2,new SOAPList('arg3',3,NULL))); $struct->child->child->child = $struct->child; -$client = new SoapClient(dirname(__FILE__)."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupE_list.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoLinkedList($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt index bc6af1a94a..e1425d58c6 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_ext_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupF Extensibility 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupF_ext.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupF_ext.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt index fa8940e338..fa75ade912 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_extreq_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupF Extensibility Required 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupF_extreq.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupF_extreq.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World"); echo $client->__getlastrequest(); //$HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt index 65bda0ccce..2920fa8526 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round3 GroupF Headers 001 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt index ae723a3b1c..131a4cb3d0 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_002w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/xsd","Header1", array("int"=>34,"string"=>"arg")); -$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString",array("Hello World"),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt index b4cb283264..eb9745dec1 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_003w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/xsd","Header2", array("int"=>34,"string"=>"arg")); -$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString",array("Hello World"),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt index f0a427a700..2861def542 100644 --- a/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt +++ b/ext/soap/tests/interop/Round3/GroupF/r3_groupF_headers_004w.phpt @@ -10,7 +10,7 @@ $hdr = array( new SoapHeader("http://soapinterop.org/xsd","Header1", array("int"=>34,"string"=>"arg1")), new SoapHeader("http://soapinterop.org/xsd","Header2", array("int"=>43,"string"=>"arg2")) ); -$client = new SoapClient(dirname(__FILE__)."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round3_groupF_headers.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoString",array("Hello World"),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt index 3e1593382b..e3b4615a6b 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_001w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } $struct = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSOAPStructFault($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt index b2cb8161f6..61cf4ea078 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_002w.phpt @@ -21,7 +21,7 @@ class BaseStruct { } } $struct = new BaseStruct(new SOAPStruct("a1",11,12.345),11); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBaseStructFault($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt index 3cf1236fc2..aafd26787a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_003w.phpt @@ -29,7 +29,7 @@ class ExtendedStruct extends BaseStruct { } } $struct = new ExtendedStruct(new SOAPStruct("a1",11,12.345),12,"arg",-3,5); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoExtendedStructFault($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt index 1c07c32009..16ff9d703e 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_004w.phpt @@ -22,7 +22,7 @@ class BaseStruct { } $s1 = new SOAPStruct('arg1',34,325.325); $s2 = new BaseStruct(new SOAPStruct('arg2',34,325.325),12); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(array("whichFault" => 1, "param1" => $s1, "param2" => $s2)); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt index c2710fc742..d62f33264f 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_005w.phpt @@ -22,7 +22,7 @@ class BaseStruct { } $s1 = new SOAPStruct('arg1',34,325.325); $s2 = new BaseStruct(new SOAPStruct('arg2',34,325.325),12); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(array("whichFault" => 2, "param1" => $s1, "param2" => $s2)); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt index 31976b740f..5d280e1c3d 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_006w.phpt @@ -22,7 +22,7 @@ class BaseStruct { } $s1 = new SOAPStruct('arg1',34,325.325); $s2 = new BaseStruct(new SOAPStruct('arg2',34,325.325),12); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(array("whichFault" => 3, "param1" => $s1, "param2" => $s2)); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt index 9db050ad67..eda7e18f68 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_007w.phpt @@ -36,7 +36,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); $s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); $s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 1, "param1" => $s1, "param2" => $s2, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt index d420abe183..154736e75b 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_008w.phpt @@ -36,7 +36,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); $s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); $s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 2, "param1" => $s1, "param2" => $s2, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt index 53c6b7fbc7..f1d56f055c 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_009w.phpt @@ -36,7 +36,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); $s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); $s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 3, "param1" => $s1, "param2" => $s2, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt index 2e966e9a36..caa70d53ad 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_doclit_010w.phpt @@ -36,7 +36,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(new SOAPStruct("s1",1,1.1),1); $s2 = new ExtendedStruct(new SOAPStruct("s2",2,2.2),2,"arg",-3,5); $s3 = new MoreExtendedStruct(new SOAPStruct("s3",3,3.3),3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 4, "param1" => $s1, "param2" => $s2, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt index c1695268d7..25814f6bc7 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_001w.phpt @@ -15,7 +15,7 @@ class SOAPStruct { } } $struct = new SOAPStruct('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSOAPStructFault(array("soapStruct"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt index 4bcdf1f441..ad8d2d8147 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_002w.phpt @@ -14,7 +14,7 @@ class BaseStruct { } } $struct = new BaseStruct(12.345,12); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBaseStructFault($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt index ec52aece46..76859d4e18 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_003w.phpt @@ -22,7 +22,7 @@ class ExtendedStruct extends BaseStruct { } } $struct = new ExtendedStruct(12.345,12,"arg",-3,5); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoExtendedStructFault($struct); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt index 07cde239e8..13cf2dfe7f 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_004w.phpt @@ -22,7 +22,7 @@ class BaseStruct { } $s1 = new SOAPStruct('arg',34,325.325); $s2 = new BaseStruct(12.345,12); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(1,$s1,$s2); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt index a68957441f..f092a7c5b9 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_005w.phpt @@ -22,7 +22,7 @@ class BaseStruct { } $s1 = new SOAPStruct('arg',34,325.325); $s2 = new BaseStruct(12.345,12); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(2,$s1,$s2); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt index bc0cef2ea2..eabe960f91 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_006w.phpt @@ -22,7 +22,7 @@ class BaseStruct { } $s1 = new SOAPStruct('arg',34,325.325); $s2 = new BaseStruct(12.345,12); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(3,$s1,$s2); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt index fd2df8f425..cdd19b8223 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_007w.phpt @@ -30,7 +30,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(12.345,1); $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(1,$s1,$s2,$s3); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt index cc1fc72b9c..c0fcefd538 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_008w.phpt @@ -30,7 +30,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(12.345,1); $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(2,$s1,$s2,$s3); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt index 1a2d950577..75ceb24368 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_009w.phpt @@ -30,7 +30,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(12.345,1); $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(3,$s1,$s2,$s3); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt index 906812e6b7..a4f51a041c 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_complex_rpcenc_010w.phpt @@ -30,7 +30,7 @@ class MoreExtendedStruct extends ExtendedStruct { $s1 = new BaseStruct(12.345,1); $s2 = new ExtendedStruct(12.345,2,"arg",-3,5); $s3 = new MoreExtendedStruct(12.345,3,"arg",-3,5,true); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_complex_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(4,$s1,$s2,$s3); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt index 104f7f58bd..5e2bbbc3bb 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 001 (php/wsdl): echoEmptyFault soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoEmptyFault(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt index b713aed722..deb67b3ba6 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 002 (php/wsdl): echoStringFault soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringFault("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt index e203ea0312..7933409d50 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_003w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 003 (php/wsdl): echoIntArrayFault soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoIntArrayFault(array(34,12.345)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt index f673ec0184..3a1b49cc42 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_004w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(array("whichFault" => 1, "param1" => "Hello world", "param2" => array(12.345,45,678))); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt index 67db5044f9..fc58dfa67f 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_005w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(array("whichFault" => 2, "param1" => "Hello world", "param2" => array(12.345,45,678))); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt index 7c6c1b5a5a..465bd19d99 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_006w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(array("whichFault" => 3, "param1" => "Hello world", "param2" => array(12.345,45,678))); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt index e8e9bba26a..69d78fe920 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_007w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(array("whichFault" => 4, "param1" => "Hello world", "param2" => array(12.345,45,678))); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt index 5bd6b4c7e7..1443812a2c 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_008w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 1, "param1" => "Hello world", "param2" => 12.345, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt index 461a4770c6..a4d4280925 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_009w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 2, "param1" => "Hello world", "param2" => 12.345, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt index f312c3630d..fc66a7fb89 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_010w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 3, "param1" => "Hello world", "param2" => 12.345, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt index 403cfaade8..8b62ff3bad 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_011w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(array("whichFault" => 4, "param1" => "Hello world", "param2" => 12.345, diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt index e97976592c..49594bfb20 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_012w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 012 (php/wsdl): echoMultipleFaults3(1) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults3(array("whichFault" => 1, "param1" => "arg1", "param2" => "arg2")); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt index 92e3e3d4f2..4f6851a73c 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_013w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 013 (php/wsdl): echoMultipleFaults3(2) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults3(array("whichFault" => 2, "param1" => "arg1", "param2" => "arg2")); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt index 84875bd972..c87ac861d8 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_014w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 014 (php/wsdl): echoMultipleFaults3(3) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults3(array("whichFault" => 3, "param1" => "arg1", "param2" => "arg2")); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt index 0f61447197..13316d4cfa 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_015w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 015 (php/wsdl): echoMultipleFaults4(1) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults4(array("whichFault" => 1, "param1" => 162, "param2" => 1)); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt index 1b2379a273..03e5afd8df 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_016w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 016 (php/wsdl): echoMultipleFaults4(2) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults4(array("whichFault" => 2, "param1" => 162, "param2" => 1)); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt index 003f3aca29..c6e67049e1 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_doclit_017w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple Doc Lit 017 (php/wsdl): echoMultipleFaults4(3) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_doclit.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults4(array("whichFault" => 3, "param1" => 162, "param2" => 1)); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt index ba76cfe11d..457e6fdcf2 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 001 (php/wsdl): echoEmptyFault soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoEmptyFault(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt index 0d82b6752e..55bde2cdb7 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 002 (php/wsdl): echoStringFault soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringFault("Hello World"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt index 29251977b2..2d4f3da6a4 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_003w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 003 (php/wsdl): echoIntArrayFault soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoIntArrayFault(array(34,12.345)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt index 7926e154a4..6b03648b0a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_004w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(1,"Hello world",array(12.345,45,678)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt index fb332a4f04..8b30f552fe 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_005w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(2,"Hello world",array(12.345,45,678)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt index 2ed546fcb9..a02b785e6d 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_006w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(3,"Hello world",array(12.345,45,678)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt index bd31aa3659..4e827700ec 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_007w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults1(4,"Hello world",array(12.345,45,678)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt index e61e374dca..170434bae1 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_008w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(1, "Hello World", 12.345, array("one","two","three")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt index d1869478f7..412e50b55a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_009w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(2, "Hello World", 12.345, array("one","two","three")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt index 3431180b17..410a683341 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_010w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(3, "Hello World", 12.345, array("one","two","three")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt index 1d66e0cbe3..4d13ee9e12 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_011w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults2(4, "Hello World", 12.345, array("one","two","three")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt index e6bbcc7053..48aad38d22 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_012w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 012 (php/wsdl): echoMultipleFaults3(1) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults3(1,"arg1","arg2"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt index ba93028f9f..a24ed8778a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_013w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 013 (php/wsdl): echoMultipleFaults3(2) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults3(2,"arg1","arg2"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt index e7449d93dd..9c7902c3fb 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_014w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 014 (php/wsdl): echoMultipleFaults3(3) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults3(3,"arg1","arg2"); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt index 7da5cd560f..f24c90e259 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_015w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 015 (php/wsdl): echoMultipleFaults4(1) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults4(1, 162, 1); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt index e44b743409..49235700f5 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_016w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 016 (php/wsdl): echoMultipleFaults4(2) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults4(2, 162, 1); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt index f7de4aaa8c..5b52cceb23 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_simple_rpcenc_017w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH Simple RPC Enc 017 (php/wsdl): echoMultipleFaults4(3) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_simple_rpcenc.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoMultipleFaults4(3, 162, 1); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt index d7c5172262..77ed867fb8 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH SoapFault 001 (php/wsdl): echoVersionMismatchFault(SO soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoVersionMismatchFault(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt index 64ebf7071d..af90e15c79 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupH SoapFault 002 (php/wsdl): echoVersionMismatchFault(SO soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0,"soap_version"=>SOAP_1_2)); +$client = new SoapClient(__DIR__."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0,"soap_version"=>SOAP_1_2)); $client->echoVersionMismatchFault(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt index ad791ddf1b..31ca13ee1a 100644 --- a/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupH/r4_groupH_soapfault_004w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/wsdl", "UnknownHeaderRequest", "Hello World", 1); -$client = new SoapClient(dirname(__FILE__)."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupH_soapfault.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVersionMismatchFault",array(), null, $hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt index 98ed58d992..77b8c8e7b3 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_001w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 001 (php/wsdl): echoVoid soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoVoid(); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt index 67929f8a07..9f1ee78d77 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_002w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 002 (php/wsdl): echoInteger soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoInteger(array("inputInteger"=>22)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt index 8ee9418f24..f161268eac 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_003w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoFloat(array("inputFloat"=>12.345)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt index 25b056d6dd..f36c3baa5c 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_004w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 004 (php/wsdl): echoString soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString(array("inputString"=>"Hello World")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt index 8d552dc1bc..f27bb8b455 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_005w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 005 (php/wsdl): echoString(empty) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoString(array()); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt Binary files differindex 2cc37b55b4..2a863f469d 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_006w.phpt diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt index 6f1edbe852..615fa43c39 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_007w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 007 (php/wsdl): echoDate soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoDate(array("inputDate"=>"2002-12-22T21:41:17Z")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt index 2ebcabd1db..0930f87001 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_008w.phpt @@ -15,7 +15,7 @@ class SOAPComplexType { } } $struct = new SOAPComplexType('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexType(array("inputComplexType"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt index af0040f783..884ea17387 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_009w.phpt @@ -16,7 +16,7 @@ class SOAPComplexType { } $struct = new SOAPComplexType('arg',34,325.325); unset($struct->varString); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexType(array("inputComplexType"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt index 0621716d64..b185b931f3 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_010w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 010 (php/wsdl): echoIntegerMultiOccurs soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoIntegerMultiOccurs(array("inputIntegerMultiOccurs"=>array(22,29,36))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt index 9e064e893a..930542708c 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_011w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoFloatMultiOccurs(array("inputFloatMultiOccurs"=>array(22.5,12.345))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt index ecf1d53316..8f7a616f49 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_012w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 012 (php/wsdl): echoStringMultiOccurs soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringMultiOccurs(array("inputStringMultiOccurs"=>array("arg1","arg2","arg3"))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt index c237ae22e6..c44c5472ff 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_013w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 013 (php/wsdl): echoStringMultiOccurs(nil) soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoStringMultiOccurs(array("inputStringMultiOccurs"=>array("arg1",NULL,"arg3"))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt index 4bcda95e38..6d3b344448 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_014w.phpt @@ -17,7 +17,7 @@ class SOAPComplexType { $struct1 = new SOAPComplexType('arg',34,325.325); $struct2 = new SOAPComplexType('arg',34,325.325); $struct3 = new SOAPComplexType('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,$struct2,$struct3))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt index 490d903e5a..239045c564 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_015w.phpt @@ -16,7 +16,7 @@ class SOAPComplexType { } $struct1 = new SOAPComplexType('arg',34,325.325); $struct2 = new SOAPComplexType('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeMultiOccurs(array("inputComplexTypeMultiOccurs"=>array($struct1,null,$struct2))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt index 55366c7353..bc78b3d5c8 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_016w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 016 (php/wsdl): echoDecimal soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoDecimal(array("inputDecimal"=>"123456789.123456789")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt index 20e3051bc8..18bc7bd23c 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_017w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 017 (php/wsdl): echoBoolean soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoBoolean(array("inputBoolean"=>true)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt index 1b60add22b..2be7297ce0 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_018w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 018 (php/wsdl): echoHexBinary soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoHexBinary(array("inputHexBinary"=>"\x80\xFF\x00\x01\x7F")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt index 4630add1c4..aecfe79a9d 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_019w.phpt @@ -15,7 +15,7 @@ class SOAPComplexType { } } $struct = new SOAPComplexType('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeAsSimpleTypes(array("inputComplexType"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt index 0034ba82b0..9fc63c6dd3 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_020w.phpt @@ -16,7 +16,7 @@ class SOAPComplexType { } $struct = new SOAPComplexType('arg',34,325.325); unset($struct->varString); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoComplexTypeAsSimpleTypes(array("inputComplexType"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt index ad1e60abb3..3e9ee065ee 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_021w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSimpleTypesAsComplexType(array("inputInteger"=>34, "inputFloat"=>12.345, "inputString"=>"arg")); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt index e9ad5d78ce..86523bd1ed 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_022w.phpt @@ -7,7 +7,7 @@ precision=14 soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoSimpleTypesAsComplexType(array("inputInteger"=>34, "inputFloat"=>12.345)); echo $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt index 4afa56485b..b9c2a3bd05 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_023w.phpt @@ -23,7 +23,7 @@ class SOAPComplexTypeComplexType { } } $struct = new SOAPComplexTypeComplexType("arg",34,12.345,new SOAPComplexType("arg",43,54.321)); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedComplexType(array("inputComplexType"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt index f30f1afb31..4af5375fed 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_024w.phpt @@ -17,7 +17,7 @@ class SOAPComplexTypeComplexType { } $struct = new SOAPComplexTypeComplexType("arg",34,12.345,NULL); unset($struct->varComplexType); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedComplexType(array("inputComplexType"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt index 7b6d8eceb2..b4bf0519a8 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_025w.phpt @@ -16,7 +16,7 @@ class SOAPMultiOccursComplexType { } } $struct = new SOAPMultiOccursComplexType("arg",34,12.345,array("red","green","blue")); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoNestedMultiOccurs(array("inputComplexType"=>$struct)); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt index 3cec539569..89e40e0d0f 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_026w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 026 (php/wsdl): echoChoice soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoChoice(array("inputChoice"=>(object)array("name1"=>"Hello World"))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt index c53b7aa657..ff9ad3abfb 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_027w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 027 (php/wsdl): echoEnum soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoEnum(array("inputEnum"=>"bitTwo")); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt index a5ff11a7b3..41e5da71e3 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_028w.phpt @@ -15,7 +15,7 @@ class SOAPComplexType { } } $struct = new SOAPComplexType('arg',34,325.325); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoAnyType(array('inputAnyType'=>new SoapVar($struct,SOAP_ENC_OBJECT,"SOAPComplexType","http://soapinterop.org/xsd"))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt index ddbe23a0bb..ad69b2f136 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_029w.phpt @@ -6,7 +6,7 @@ SOAP Interop Round4 GroupI XSD 029 (php/wsdl): echoAnyElement soap.wsdl_cache_enabled=0 --FILE-- <?php -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->echoAnyElement(array("inputAny"=>array("any"=>"<bold>Hello World</bold>"))); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt index 48c8c444af..58e359788a 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_030w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), 1); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt index c108fb63cd..67da316d56 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_031w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array(), 1); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt index 03b03852a6..aa37a913b2 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_032w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), 1); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt index e28f1808e2..2433a90b6b 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_033w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varFloat"=>12.345), 1); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt index 3639400fcc..0a3bec4c68 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_034w.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/","echoMeStringRequest", array("varString"=>"Hello World"), 1, SOAP_ACTOR_NEXT); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt index 2b894a7aab..670b0b116b 100644 --- a/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt +++ b/ext/soap/tests/interop/Round4/GroupI/r4_groupI_xsd_035w.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- <?php $hdr = new SoapHeader("http://soapinterop.org/","echoMeComplexTypeRequest", array("varInt"=>34,"varString"=>"arg","varFloat"=>12.345), 1, SOAP_ACTOR_NEXT); -$client = new SoapClient(dirname(__FILE__)."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); +$client = new SoapClient(__DIR__."/round4_groupI_xsd.wsdl",array("trace"=>1,"exceptions"=>0)); $client->__soapCall("echoVoidSoapHeader",array(),null,$hdr); echo $client->__getlastrequest(); $HTTP_RAW_POST_DATA = $client->__getlastrequest(); diff --git a/ext/soap/tests/server011.phpt b/ext/soap/tests/server011.phpt index 5b76a81299..1c367d7d56 100644 --- a/ext/soap/tests/server011.phpt +++ b/ext/soap/tests/server011.phpt @@ -12,12 +12,12 @@ function Add($x,$y) { return $x+$y; } -$server = new soapserver(dirname(__FILE__)."/test.wsdl"); +$server = new soapserver(__DIR__."/test.wsdl"); ob_start(); $server->handle(); $wsdl = ob_get_contents(); ob_end_clean(); -if ($wsdl == file_get_contents(dirname(__FILE__)."/test.wsdl")) { +if ($wsdl == file_get_contents(__DIR__."/test.wsdl")) { echo "ok\n"; } else { echo "fail\n"; diff --git a/ext/soap/tests/server025.phpt b/ext/soap/tests/server025.phpt index ed56750a0b..5366c7ad91 100644 --- a/ext/soap/tests/server025.phpt +++ b/ext/soap/tests/server025.phpt @@ -25,7 +25,7 @@ function test() { return "Hello Body!"; } -$server = new soapserver(dirname(__FILE__)."/server025.wsdl"); +$server = new soapserver(__DIR__."/server025.wsdl"); $server->addfunction("test"); $HTTP_RAW_POST_DATA = <<<EOF diff --git a/ext/soap/tests/server030.phpt b/ext/soap/tests/server030.phpt index ed5aad832a..bafb01f575 100644 --- a/ext/soap/tests/server030.phpt +++ b/ext/soap/tests/server030.phpt @@ -30,7 +30,7 @@ class handlerClass { } } -$server = new SoapServer(dirname(__FILE__)."/server030.wsdl"); +$server = new SoapServer(__DIR__."/server030.wsdl"); $server->setClass('handlerClass'); $HTTP_RAW_POST_DATA = <<<EOF diff --git a/ext/soap/tests/server031.phpt b/ext/soap/tests/server031.phpt index 23275796d8..c9f8d95f8e 100644 --- a/ext/soap/tests/server031.phpt +++ b/ext/soap/tests/server031.phpt @@ -46,7 +46,7 @@ class handlerClass { } } -$server = new SoapServer(dirname(__FILE__)."/server030.wsdl"); +$server = new SoapServer(__DIR__."/server030.wsdl"); $server->setClass('handlerClass'); $HTTP_RAW_POST_DATA = <<<EOF diff --git a/ext/soap/tests/typemap001.phpt b/ext/soap/tests/typemap001.phpt index 3268c694ae..c582406f41 100644 --- a/ext/soap/tests/typemap001.phpt +++ b/ext/soap/tests/typemap001.phpt @@ -52,7 +52,7 @@ $options=Array( "from_xml" => "book_from_xml")) ); -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server = new SoapServer(__DIR__."/classmap.wsdl",$options); $server->setClass("test"); $server->handle($HTTP_RAW_POST_DATA); echo "ok\n"; diff --git a/ext/soap/tests/typemap002.phpt b/ext/soap/tests/typemap002.phpt index 41bbc1505e..84ef043ac3 100644 --- a/ext/soap/tests/typemap002.phpt +++ b/ext/soap/tests/typemap002.phpt @@ -47,7 +47,7 @@ $options=Array( "to_xml" => "book_to_xml")) ); -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server = new SoapServer(__DIR__."/classmap.wsdl",$options); $server->setClass("test"); $server->handle($HTTP_RAW_POST_DATA); echo "ok\n"; diff --git a/ext/soap/tests/typemap003.phpt b/ext/soap/tests/typemap003.phpt index 85a6369313..0770d1be67 100644 --- a/ext/soap/tests/typemap003.phpt +++ b/ext/soap/tests/typemap003.phpt @@ -42,7 +42,7 @@ $options=Array( "from_xml" => "book_from_xml")) ); -$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$client = new TestSoapClient(__DIR__."/classmap.wsdl",$options); $ret = $client->dotest2("???"); var_dump($ret); echo "ok\n"; diff --git a/ext/soap/tests/typemap004.phpt b/ext/soap/tests/typemap004.phpt index ffd24c6a38..07d489db95 100644 --- a/ext/soap/tests/typemap004.phpt +++ b/ext/soap/tests/typemap004.phpt @@ -30,7 +30,7 @@ $options=Array( "to_xml" => "book_to_xml")) ); -$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$client = new TestSoapClient(__DIR__."/classmap.wsdl",$options); $book = new book(); $book->a = "foo"; $book->b = "bar"; diff --git a/ext/soap/tests/typemap009.phpt b/ext/soap/tests/typemap009.phpt index 7c7cd6fee7..37e73edeca 100644 --- a/ext/soap/tests/typemap009.phpt +++ b/ext/soap/tests/typemap009.phpt @@ -47,7 +47,7 @@ $options=Array( "from_xml" => "book_from_xml")) ); -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server = new SoapServer(__DIR__."/classmap.wsdl",$options); $server->setClass("test"); $server->handle($HTTP_RAW_POST_DATA); echo "ok\n"; diff --git a/ext/soap/tests/typemap010.phpt b/ext/soap/tests/typemap010.phpt index 0d27ba4936..46e9909a62 100644 --- a/ext/soap/tests/typemap010.phpt +++ b/ext/soap/tests/typemap010.phpt @@ -47,7 +47,7 @@ $options=Array( "to_xml" => "book_to_xml")) ); -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server = new SoapServer(__DIR__."/classmap.wsdl",$options); $server->setClass("test"); $server->handle($HTTP_RAW_POST_DATA); echo "ok\n"; diff --git a/ext/soap/tests/typemap011.phpt b/ext/soap/tests/typemap011.phpt index 7d89b71e06..ac6b9f3924 100644 --- a/ext/soap/tests/typemap011.phpt +++ b/ext/soap/tests/typemap011.phpt @@ -37,7 +37,7 @@ $options=Array( "from_xml" => "book_from_xml")) ); -$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$client = new TestSoapClient(__DIR__."/classmap.wsdl",$options); try { $ret = $client->dotest2("???"); } catch (SoapFault $e) { diff --git a/ext/soap/tests/typemap012.phpt b/ext/soap/tests/typemap012.phpt index 79e2319085..837ae1fd80 100644 --- a/ext/soap/tests/typemap012.phpt +++ b/ext/soap/tests/typemap012.phpt @@ -30,7 +30,7 @@ $options=Array( "to_xml" => "book_to_xml")) ); -$client = new TestSoapClient(dirname(__FILE__)."/classmap.wsdl",$options); +$client = new TestSoapClient(__DIR__."/classmap.wsdl",$options); $book = new book(); $book->a = "foo"; $book->b = "bar"; diff --git a/ext/soap/tests/typemap013.phpt b/ext/soap/tests/typemap013.phpt index 4ebeac71d8..6d414fdbc0 100644 --- a/ext/soap/tests/typemap013.phpt +++ b/ext/soap/tests/typemap013.phpt @@ -47,7 +47,7 @@ $options=Array( "to_xml" => "book_to_xml")) ); -$server = new SoapServer(dirname(__FILE__)."/classmap.wsdl",$options); +$server = new SoapServer(__DIR__."/classmap.wsdl",$options); $server->setClass("test"); $server->handle($HTTP_RAW_POST_DATA); echo "ok\n"; diff --git a/ext/sockets/tests/socket_create_listen-nobind.phpt b/ext/sockets/tests/socket_create_listen-nobind.phpt index bd7e5bfd43..c23ed5b642 100644 --- a/ext/sockets/tests/socket_create_listen-nobind.phpt +++ b/ext/sockets/tests/socket_create_listen-nobind.phpt @@ -5,7 +5,7 @@ Test if socket_create_listen() returns false, when it cannot bind to the port. if (!extension_loaded('sockets')) { die('SKIP The sockets extension is not loaded.'); } -$filename = dirname(__FILE__) . '/006_root_check.tmp'; +$filename = __DIR__ . '/006_root_check.tmp'; $fp = fopen($filename, 'w'); fclose($fp); if (fileowner($filename) == 0) { @@ -19,7 +19,7 @@ $sock = socket_create_listen(80); Warning: socket_create_listen(): unable to bind to given address [13]: Permission denied in %s on line %d --CLEAN-- <?php -unlink(dirname(__FILE__) . '/006_root_check.tmp'); +unlink(__DIR__ . '/006_root_check.tmp'); --CREDITS-- Till Klampaeckel, till@php.net PHP Testfest Berlin 2009-05-09 diff --git a/ext/sockets/tests/socket_set_option_error_socket_option.phpt b/ext/sockets/tests/socket_set_option_error_socket_option.phpt index ea3b36d99f..18afcc8fb1 100644 --- a/ext/sockets/tests/socket_set_option_error_socket_option.phpt +++ b/ext/sockets/tests/socket_set_option_error_socket_option.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('sockets')) { if (PHP_OS == 'Darwin') { die('skip Not for OSX'); } -$filename = dirname(__FILE__) . '/006_root_check.tmp'; +$filename = __DIR__ . '/006_root_check.tmp'; $fp = fopen($filename, 'w'); fclose($fp); if (fileowner($filename) == 0) { @@ -28,7 +28,7 @@ socket_close($socket); ?> --CLEAN-- <?php -unlink(dirname(__FILE__) . '/006_root_check.tmp'); +unlink(__DIR__ . '/006_root_check.tmp'); --EXPECTF-- Warning: socket_set_option(): unable to set socket option [%d]: Permission denied in %s on line %d --CREDITS-- diff --git a/ext/spl/tests/SplFileObject_fflush_basic_001.phpt b/ext/spl/tests/SplFileObject_fflush_basic_001.phpt index bacdcb1daa..2060bd2b43 100644 --- a/ext/spl/tests/SplFileObject_fflush_basic_001.phpt +++ b/ext/spl/tests/SplFileObject_fflush_basic_001.phpt @@ -5,7 +5,7 @@ SplFileObject::fflush function - basic test /* * test a successful flush */ -$obj = New SplFileObject(dirname(__FILE__).'/SplFileObject_testinput.csv'); +$obj = New SplFileObject(__DIR__.'/SplFileObject_testinput.csv'); var_dump($obj->fflush()); /* diff --git a/ext/spl/tests/SplFileObject_fpassthru_basic.phpt b/ext/spl/tests/SplFileObject_fpassthru_basic.phpt index 0bd349fc92..a79047830b 100644 --- a/ext/spl/tests/SplFileObject_fpassthru_basic.phpt +++ b/ext/spl/tests/SplFileObject_fpassthru_basic.phpt @@ -2,7 +2,7 @@ SplFileObject::fpassthru function - basic functionality test --FILE-- <?php -$obj = New SplFileObject(dirname(__FILE__).'/SplFileObject_testinput.csv'); +$obj = New SplFileObject(__DIR__.'/SplFileObject_testinput.csv'); $obj->fpassthru(); ?> --EXPECT-- diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation1.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation1.phpt index 879edefddf..47f8c609be 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation1.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation1.phpt @@ -23,7 +23,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation1.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation10.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation10.phpt index d23808b5ab..49f77d4158 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation10.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation10.phpt @@ -17,7 +17,7 @@ $fields = array( array('water_fruit\n'), array("") ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation10.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation11.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation11.phpt index ab78d21b80..77d041689c 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation11.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation11.phpt @@ -23,7 +23,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation11.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation12.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation12.phpt index b530cf61cf..947d89b763 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation12.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation12.phpt @@ -24,7 +24,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation12.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt index 002a7075a6..898d89681e 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt @@ -23,7 +23,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation5.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation6.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation6.phpt index 1f177df19f..33bae5e48d 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation6.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation6.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation6.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation7.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation7.phpt index d42b455820..bae8962567 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation7.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation7.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation7.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation8.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation8.phpt index f7cbd72b76..2306c92ce3 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation8.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation8.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = "$file_path/fputcsv_variation8.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/spl/tests/SplFileObject_fscanf_basic.phpt b/ext/spl/tests/SplFileObject_fscanf_basic.phpt index 2f668ac73e..02de3f8d12 100644 --- a/ext/spl/tests/SplFileObject_fscanf_basic.phpt +++ b/ext/spl/tests/SplFileObject_fscanf_basic.phpt @@ -2,7 +2,7 @@ SplFileObject::fscanf function - basic functionality test --FILE-- <?php -$obj = New SplFileObject(dirname(__FILE__).'/SplFileObject_testinput.csv'); +$obj = New SplFileObject(__DIR__.'/SplFileObject_testinput.csv'); var_dump($obj->fscanf('%s')); ?> --EXPECT-- diff --git a/ext/spl/tests/SplFileObject_fwrite_variation_001.phpt b/ext/spl/tests/SplFileObject_fwrite_variation_001.phpt index 61741a8bf5..a8e36cd046 100644 --- a/ext/spl/tests/SplFileObject_fwrite_variation_001.phpt +++ b/ext/spl/tests/SplFileObject_fwrite_variation_001.phpt @@ -2,7 +2,7 @@ SplFileObject::fwrite function - writing with two parameters length < input string length --FILE-- <?php -$file = dirname(__FILE__).'/SplFileObject_fwrite_variation_001.txt'; +$file = __DIR__.'/SplFileObject_fwrite_variation_001.txt'; if(file_exists($file)) { unlink($file); } @@ -12,7 +12,7 @@ var_dump(file_get_contents($file)); ?> --CLEAN-- <?php -$file = dirname(__FILE__).'/SplFileObject_fwrite_variation_001.txt'; +$file = __DIR__.'/SplFileObject_fwrite_variation_001.txt'; if(file_exists($file)) { unlink($file); } diff --git a/ext/spl/tests/SplFileObject_fwrite_variation_002.phpt b/ext/spl/tests/SplFileObject_fwrite_variation_002.phpt index 31399a0d02..cea92a349c 100644 --- a/ext/spl/tests/SplFileObject_fwrite_variation_002.phpt +++ b/ext/spl/tests/SplFileObject_fwrite_variation_002.phpt @@ -2,7 +2,7 @@ SplFileObject::fwrite function - writing with two parameters, length > input string length --FILE-- <?php -$file = dirname(__FILE__).'/SplFileObject_fwrite_variation_002.txt'; +$file = __DIR__.'/SplFileObject_fwrite_variation_002.txt'; if(file_exists($file)) { unlink($file); } @@ -12,7 +12,7 @@ var_dump(file_get_contents($file)); ?> --CLEAN-- <?php -$file = dirname(__FILE__).'/SplFileObject_fwrite_variation_002.txt'; +$file = __DIR__.'/SplFileObject_fwrite_variation_002.txt'; if(file_exists($file)) { unlink($file); } diff --git a/ext/spl/tests/SplFileObject_getCsvControl_basic_001.phpt b/ext/spl/tests/SplFileObject_getCsvControl_basic_001.phpt index 5c65a1b76b..97af917cb2 100644 --- a/ext/spl/tests/SplFileObject_getCsvControl_basic_001.phpt +++ b/ext/spl/tests/SplFileObject_getCsvControl_basic_001.phpt @@ -2,7 +2,7 @@ SplFileObject::getCsvControl function - basic test --FILE-- <?php -$obj = New SplFileObject(dirname(__FILE__).'/SplFileObject_testinput.csv'); +$obj = New SplFileObject(__DIR__.'/SplFileObject_testinput.csv'); var_dump($obj->getCsvControl()); ?> diff --git a/ext/spl/tests/array_013.phpt b/ext/spl/tests/array_013.phpt index 3aad7bf6f7..1f0c631c02 100644 --- a/ext/spl/tests/array_013.phpt +++ b/ext/spl/tests/array_013.phpt @@ -5,7 +5,7 @@ SPL: ArrayIterator::append if (!class_exists('NoRewindIterator', false)) { - require_once(dirname(__FILE__) . '/../examples/norewinditerator.inc'); + require_once(__DIR__ . '/../examples/norewinditerator.inc'); } echo "===Array===\n"; diff --git a/ext/spl/tests/bug45216.phpt b/ext/spl/tests/bug45216.phpt index 31e6d62352..e8b04cb1fb 100644 --- a/ext/spl/tests/bug45216.phpt +++ b/ext/spl/tests/bug45216.phpt @@ -5,7 +5,7 @@ Perrick Penet <perrick@noparking.net> #testfest phpcampparis 2008-06-07 --FILE-- <?php -$file = dirname(__FILE__) . '/foo.html'; +$file = __DIR__ . '/foo.html'; file_put_contents($file, 'text 0<div class="tested">text 1</div>'); $handle = fopen($file, 'r'); @@ -15,7 +15,7 @@ var_dump(fgetss($handle)); ?> --CLEAN-- <?php -unlink(dirname(__FILE__) . '/foo.html'); +unlink(__DIR__ . '/foo.html'); ?> --EXPECTF-- Deprecated: Function fgetss() is deprecated in %s on line %d diff --git a/ext/spl/tests/bug47534.phpt b/ext/spl/tests/bug47534.phpt index d221c23fdb..0d1a5a69ff 100644 --- a/ext/spl/tests/bug47534.phpt +++ b/ext/spl/tests/bug47534.phpt @@ -2,11 +2,11 @@ SPL: RecursiveDirectoryIterator bug 47534 --FILE-- <?php -$it1 = new RecursiveDirectoryIterator(dirname(__FILE__), FileSystemIterator::CURRENT_AS_PATHNAME); +$it1 = new RecursiveDirectoryIterator(__DIR__, FileSystemIterator::CURRENT_AS_PATHNAME); $it1->rewind(); echo gettype($it1->current())."\n"; -$it2 = new RecursiveDirectoryIterator(dirname(__FILE__)); +$it2 = new RecursiveDirectoryIterator(__DIR__); $it2->rewind(); echo gettype($it2->current())."\n"; --EXPECT-- diff --git a/ext/spl/tests/bug67359.phpt b/ext/spl/tests/bug67359.phpt index e97a403717..3e8f30cd2b 100644 --- a/ext/spl/tests/bug67359.phpt +++ b/ext/spl/tests/bug67359.phpt @@ -4,7 +4,7 @@ Bug #67359 (Segfault in recursiveDirectoryIterator) <?php try { - $rdi = new recursiveDirectoryIterator(dirname(__FILE__), FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS); + $rdi = new recursiveDirectoryIterator(__DIR__, FilesystemIterator::SKIP_DOTS | FilesystemIterator::UNIX_PATHS); $it = new recursiveIteratorIterator( $rdi ); $it->seek(1); while( $it->valid()) diff --git a/ext/spl/tests/dualiterator_001.phpt b/ext/spl/tests/dualiterator_001.phpt index dd75ca9463..934f28abee 100644 --- a/ext/spl/tests/dualiterator_001.phpt +++ b/ext/spl/tests/dualiterator_001.phpt @@ -5,7 +5,7 @@ SPL: DualIterator function spl_examples_autoload($classname) { - include(dirname(__FILE__) . '/' . strtolower($classname) . '.inc'); + include(__DIR__ . '/' . strtolower($classname) . '.inc'); } spl_autoload_register('spl_examples_autoload'); diff --git a/ext/spl/tests/fileobject_001.phpt b/ext/spl/tests/fileobject_001.phpt index 35a5156401..4059310bba 100644 --- a/ext/spl/tests/fileobject_001.phpt +++ b/ext/spl/tests/fileobject_001.phpt @@ -3,7 +3,7 @@ SPL: SplFileObject::seek'ing --FILE-- <?php -$o = new SplFileObject(dirname(__FILE__) . '/fileobject_001a.txt'); +$o = new SplFileObject(__DIR__ . '/fileobject_001a.txt'); var_dump($o->key()); var_dump($o->current()); @@ -31,7 +31,7 @@ foreach($o as $n => $l) } echo "===B===\n"; -$o = new SplFileObject(dirname(__FILE__) . '/fileobject_001b.txt'); +$o = new SplFileObject(__DIR__ . '/fileobject_001b.txt'); $o->setFlags(SplFileObject::DROP_NEW_LINE); foreach($o as $n => $l) { diff --git a/ext/spl/tests/fileobject_002.phpt b/ext/spl/tests/fileobject_002.phpt index 1f7e4eaf14..2f43949966 100644 --- a/ext/spl/tests/fileobject_002.phpt +++ b/ext/spl/tests/fileobject_002.phpt @@ -7,7 +7,7 @@ function test($name) { echo "===$name===\n"; - $o = new SplFileObject(dirname(__FILE__) . '/' . $name); + $o = new SplFileObject(__DIR__ . '/' . $name); var_dump($o->key()); while(($c = $o->fgetc()) !== false) diff --git a/ext/spl/tests/fileobject_003.phpt b/ext/spl/tests/fileobject_003.phpt index 822e21b9fa..c3452bc93f 100644 --- a/ext/spl/tests/fileobject_003.phpt +++ b/ext/spl/tests/fileobject_003.phpt @@ -41,9 +41,9 @@ function test($name, $lc, $lp) } } -test(dirname(__FILE__) . '/' . 'fileobject_001a.txt', 't', substr(dirname(__FILE__),-1)); -test(dirname(__FILE__) . '/', substr(dirname(__FILE__),-1), 'l'); -test(dirname(__FILE__), substr(dirname(__FILE__),-1), 'l'); +test(__DIR__ . '/' . 'fileobject_001a.txt', 't', substr(__DIR__,-1)); +test(__DIR__ . '/', substr(__DIR__,-1), 'l'); +test(__DIR__, substr(__DIR__,-1), 'l'); ?> ===DONE=== diff --git a/ext/spl/tests/fileobject_004.phpt b/ext/spl/tests/fileobject_004.phpt index 02e6725853..fad87298ca 100644 --- a/ext/spl/tests/fileobject_004.phpt +++ b/ext/spl/tests/fileobject_004.phpt @@ -5,7 +5,7 @@ SPL: SplFileObject realpath and include_path set_include_path('tests'); -chdir(dirname(dirname(__FILE__))); // ext/spl +chdir(dirname(__DIR__)); // ext/spl $fo = new SplFileObject('fileobject_004.phpt', 'r', true); diff --git a/ext/spl/tests/fileobject_005.phpt b/ext/spl/tests/fileobject_005.phpt index 7b012e7710..41a04dd118 100644 --- a/ext/spl/tests/fileobject_005.phpt +++ b/ext/spl/tests/fileobject_005.phpt @@ -6,9 +6,9 @@ Mark Ammann --FILE-- <?php -set_include_path(dirname(dirname(__FILE__))); +set_include_path(dirname(__DIR__)); -$path = dirname(__FILE__).DIRECTORY_SEPARATOR.'fileobject_005.txt'; +$path = __DIR__.DIRECTORY_SEPARATOR.'fileobject_005.txt'; touch($path); $fo = new SplFileObject('tests'.DIRECTORY_SEPARATOR.'fileobject_005.txt', 'w+', true); @@ -28,7 +28,7 @@ var_dump($fo->ftruncate()); ==DONE== --CLEAN-- <?php -$path = dirname(__FILE__).DIRECTORY_SEPARATOR.'fileobject_005.txt'; +$path = __DIR__.DIRECTORY_SEPARATOR.'fileobject_005.txt'; unlink($path); ?> --EXPECTF-- diff --git a/ext/sqlite3/tests/bug73068.phpt b/ext/sqlite3/tests/bug73068.phpt index 6cd12d017a..df85dafe82 100644 --- a/ext/sqlite3/tests/bug73068.phpt +++ b/ext/sqlite3/tests/bug73068.phpt @@ -2,7 +2,7 @@ Bug #73068 SQLite3 may fail to DELETE --SKIPIF-- <?php -require_once(dirname(__FILE__) . '/skipif.inc'); +require_once(__DIR__ . '/skipif.inc'); $version = SQLite3::version()['versionNumber']; if ($version >= 3011000 && $version < 3014002) die('skip libsqlite 3.11.0 to 3.14.1 exhibit erroneous behavior'); ?> diff --git a/ext/sqlite3/tests/sqlite3_busyTimeout.phpt b/ext/sqlite3/tests/sqlite3_busyTimeout.phpt index ba44e53ed9..ea97d8ee00 100644 --- a/ext/sqlite3/tests/sqlite3_busyTimeout.phpt +++ b/ext/sqlite3/tests/sqlite3_busyTimeout.phpt @@ -6,7 +6,7 @@ marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br <?php require 'skipif.inc'; ?> --FILE-- <?php -require_once(dirname(__FILE__) . '/new_db.inc'); +require_once(__DIR__ . '/new_db.inc'); var_dump($db->busyTimeout(0)); var_dump($db->busyTimeout(null)); var_dump($db->busyTimeout(-1000)); diff --git a/ext/standard/tests/array/001.phpt b/ext/standard/tests/array/001.phpt index 797a79781f..3b9804655b 100644 --- a/ext/standard/tests/array/001.phpt +++ b/ext/standard/tests/array/001.phpt @@ -4,7 +4,7 @@ Test array_merge and array_walk precision=14 --FILE-- <?php -require(dirname(__FILE__) . '/data.inc'); +require(__DIR__ . '/data.inc'); /* ** Create sample arrays ** Test alpha, numeric (decimal, hex, octal) and special data diff --git a/ext/standard/tests/array/002.phpt b/ext/standard/tests/array/002.phpt index 204863f0e9..f6aa37b9fb 100644 --- a/ext/standard/tests/array/002.phpt +++ b/ext/standard/tests/array/002.phpt @@ -4,7 +4,7 @@ Test arsort, asort, krsort, ksort, rsort, and sort precision=14 --FILE-- <?php -require(dirname(__FILE__) . '/data.inc'); +require(__DIR__ . '/data.inc'); function test_sort ($sort_function, $data) { echo "\n -- Testing $sort_function() -- \n"; diff --git a/ext/standard/tests/array/003.phpt b/ext/standard/tests/array/003.phpt index f307186553..cce2d4922c 100644 --- a/ext/standard/tests/array/003.phpt +++ b/ext/standard/tests/array/003.phpt @@ -4,7 +4,7 @@ Test usort, uksort and uasort precision=14 --FILE-- <?php -require(dirname(__FILE__) . '/data.inc'); +require(__DIR__ . '/data.inc'); function cmp ($a, $b) { is_array ($a) diff --git a/ext/standard/tests/array/array_search_variation4.phpt b/ext/standard/tests/array/array_search_variation4.phpt index cbbf714b6f..f9b55dfe4d 100644 --- a/ext/standard/tests/array/array_search_variation4.phpt +++ b/ext/standard/tests/array/array_search_variation4.phpt @@ -14,7 +14,7 @@ echo "*** Testing resource type with array_search() ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array for comparison. $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/array/end.phpt b/ext/standard/tests/array/end.phpt index dc3f2eb75e..724f2e612f 100644 --- a/ext/standard/tests/array/end.phpt +++ b/ext/standard/tests/array/end.phpt @@ -99,7 +99,7 @@ echo "\n*** Testing end() on resource type ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/array/end_64bit.phpt b/ext/standard/tests/array/end_64bit.phpt index 0af5064e82..0049041848 100644 --- a/ext/standard/tests/array/end_64bit.phpt +++ b/ext/standard/tests/array/end_64bit.phpt @@ -99,7 +99,7 @@ echo "\n*** Testing end() on resource type ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/array/in_array_variation4.phpt b/ext/standard/tests/array/in_array_variation4.phpt index 186eb2718d..d481010211 100644 --- a/ext/standard/tests/array/in_array_variation4.phpt +++ b/ext/standard/tests/array/in_array_variation4.phpt @@ -17,7 +17,7 @@ echo "*** Testing resource type with in_array() ***\n"; $file_handle = fopen(__FILE__, "r"); //directory type resource -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); //store resources in array for comparison. $resources = array($file_handle, $dir_handle); diff --git a/ext/standard/tests/dir/bug73877.phpt b/ext/standard/tests/dir/bug73877.phpt index 2fa6c90f02..633a4eef81 100644 --- a/ext/standard/tests/dir/bug73877.phpt +++ b/ext/standard/tests/dir/bug73877.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --FILE-- <?php -$base = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug73877"; +$base = __DIR__ . DIRECTORY_SEPARATOR . "bug73877"; $dir0 = $base . DIRECTORY_SEPARATOR . "bug73877"; $dir1 = $base . DIRECTORY_SEPARATOR . "Серёжка"; $junk0 = $base . DIRECTORY_SEPARATOR . "Серёжка2"; @@ -31,7 +31,7 @@ var_dump( --CLEAN-- <?php -$base = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug73877"; +$base = __DIR__ . DIRECTORY_SEPARATOR . "bug73877"; $dir0 = $base . DIRECTORY_SEPARATOR . "bug73877"; $dir1 = $base . DIRECTORY_SEPARATOR . "Серёжка"; $junk0 = $base . DIRECTORY_SEPARATOR . "Серёжка2"; diff --git a/ext/standard/tests/dir/chdir_basic.phpt b/ext/standard/tests/dir/chdir_basic.phpt index 4e18988076..6c96898dd8 100644 --- a/ext/standard/tests/dir/chdir_basic.phpt +++ b/ext/standard/tests/dir/chdir_basic.phpt @@ -12,7 +12,7 @@ Test chdir() function : basic functionality */ echo "*** Testing chdir() : basic functionality ***\n"; -$base_dir_path = dirname(__FILE__); +$base_dir_path = __DIR__; $level1_one_dir_name = "level1_one"; $level1_one_dir_path = "$base_dir_path/$level1_one_dir_name"; @@ -36,7 +36,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/level1_one/level1_two"); rmdir("$file_path/level1_one"); ?> diff --git a/ext/standard/tests/dir/chdir_variation2.phpt b/ext/standard/tests/dir/chdir_variation2.phpt index 097ab56e00..7f9c3845ee 100644 --- a/ext/standard/tests/dir/chdir_variation2.phpt +++ b/ext/standard/tests/dir/chdir_variation2.phpt @@ -13,7 +13,7 @@ Test chdir() function : usage variations - relative paths echo "*** Testing chdir() : usage variations ***\n"; -$base_dir_path = dirname(__FILE__); +$base_dir_path = __DIR__; $level2_one_dir_name = "level2_one"; $level2_one_dir_path = "$base_dir_path/$level2_one_dir_name"; @@ -62,7 +62,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/level2_one/level2_two"); rmdir("$file_path/level2_one"); ?> diff --git a/ext/standard/tests/dir/closedir_basic-win32-mb.phpt b/ext/standard/tests/dir/closedir_basic-win32-mb.phpt index 8515756b17..f74ac29952 100644 --- a/ext/standard/tests/dir/closedir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/closedir_basic-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing closedir() : basic functionality ***\n"; -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/私はガラスを食べられますclosedir_basic'; mkdir($dir_path); @@ -43,7 +43,7 @@ var_dump($dh2); ===DONE=== --CLEAN-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/私はガラスを食べられますclosedir_basic'; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/closedir_basic.phpt b/ext/standard/tests/dir/closedir_basic.phpt index 2ef1aa7814..94aaebf9f9 100644 --- a/ext/standard/tests/dir/closedir_basic.phpt +++ b/ext/standard/tests/dir/closedir_basic.phpt @@ -14,7 +14,7 @@ Test closedir() function : basic functionality echo "*** Testing closedir() : basic functionality ***\n"; -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/closedir_basic'; mkdir($dir_path); @@ -37,7 +37,7 @@ var_dump($dh2); ===DONE=== --CLEAN-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '/closedir_basic'; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/closedir_error-win32-mb.phpt b/ext/standard/tests/dir/closedir_error-win32-mb.phpt index e5ca80b7d2..e0a399c688 100644 --- a/ext/standard/tests/dir/closedir_error-win32-mb.phpt +++ b/ext/standard/tests/dir/closedir_error-win32-mb.phpt @@ -24,7 +24,7 @@ echo "*** Testing closedir() : error conditions ***\n"; //Test closedir with one more than the expected number of arguments echo "\n-- Testing closedir() function with more than expected no. of arguments --\n"; -$dir_path = dirname(__FILE__) . '\私はガラスを食べられますclosedir_error'; +$dir_path = __DIR__ . '\私はガラスを食べられますclosedir_error'; mkdir($dir_path); $dir_handle = opendir($dir_path); @@ -37,7 +37,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$base_dir = dirname(__FILE__); +$base_dir = __DIR__; $dir_path = $base_dir . '\私はガラスを食べられますclosedir_error'; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt b/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt index f46a99b872..07b9ab869a 100644 --- a/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt +++ b/ext/standard/tests/dir/closedir_variation2-win32-mb.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing closedir() : usage variations ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/私はガラスを食べられますclosedir_variation2"; +$directory = __DIR__ . "/私はガラスを食べられますclosedir_variation2"; mkdir($directory); $dh = opendir($directory); @@ -39,7 +39,7 @@ var_dump($dh); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/私はガラスを食べられますclosedir_variation2"; +$directory = __DIR__ . "/私はガラスを食べられますclosedir_variation2"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/closedir_variation2.phpt b/ext/standard/tests/dir/closedir_variation2.phpt index 303d47c84e..cb85750e71 100644 --- a/ext/standard/tests/dir/closedir_variation2.phpt +++ b/ext/standard/tests/dir/closedir_variation2.phpt @@ -15,7 +15,7 @@ Test closedir() function : usage variations - close directory handle twice echo "*** Testing closedir() : usage variations ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/closedir_variation2"; +$directory = __DIR__ . "/closedir_variation2"; mkdir($directory); $dh = opendir($directory); @@ -33,7 +33,7 @@ var_dump($dh); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/closedir_variation2"; +$directory = __DIR__ . "/closedir_variation2"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/dir_basic-win32-mb.phpt b/ext/standard/tests/dir/dir_basic-win32-mb.phpt index d6c8ebca8f..d643846852 100644 --- a/ext/standard/tests/dir/dir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/dir_basic-win32-mb.phpt @@ -17,10 +17,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing dir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -include(dirname(__FILE__)."/../file/file.inc"); +include(__DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/私はガラスを食べられますdir_basic"; @mkdir($dir_path); @@ -53,7 +53,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/私はガラスを食べられますdir_basic"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_basic.phpt b/ext/standard/tests/dir/dir_basic.phpt index 68ac552a6f..4360a749c7 100644 --- a/ext/standard/tests/dir/dir_basic.phpt +++ b/ext/standard/tests/dir/dir_basic.phpt @@ -11,10 +11,10 @@ Test dir() function : basic functionality echo "*** Testing dir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -include(dirname(__FILE__)."/../file/file.inc"); +include(__DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_basic"; @mkdir($dir_path); @@ -47,7 +47,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_basic"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation3.phpt b/ext/standard/tests/dir/dir_variation3.phpt index 91dc504713..041304eba4 100644 --- a/ext/standard/tests/dir/dir_variation3.phpt +++ b/ext/standard/tests/dir/dir_variation3.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -31,7 +31,7 @@ unlink($filename); echo "*** Testing dir() : different directory permissions ***"; // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation3"; @mkdir($dir_path); @@ -58,7 +58,7 @@ for($count = 0; $count < count($permission_values); $count++) { echo "\n-- Iteration ".($count + 1)." --\n"; // try to remove the dir if exists & create - $file_path = dirname(__FILE__); + $file_path = __DIR__; $dir_path = $file_path."/dir_variation3"; @chmod ($dir_path, 0777); // change dir permission to allow all operation @rmdir ($dir_path); // try n delete the dir @@ -86,7 +86,7 @@ echo "Done"; --CLEAN-- <?php // deleting temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation3"; rmdir($dir_path); ?> diff --git a/ext/standard/tests/dir/dir_variation4-win32-mb.phpt b/ext/standard/tests/dir/dir_variation4-win32-mb.phpt index 71fe0b2979..cdb9711f23 100644 --- a/ext/standard/tests/dir/dir_variation4-win32-mb.phpt +++ b/ext/standard/tests/dir/dir_variation4-win32-mb.phpt @@ -22,10 +22,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing dir() : operate on previously opened directory ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/私はガラスを食べられますdir_variation4"; @mkdir($dir_path); @@ -52,7 +52,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/私はガラスを食べられますdir_variation4"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation4.phpt b/ext/standard/tests/dir/dir_variation4.phpt index ae57413754..c0c8dda2b7 100644 --- a/ext/standard/tests/dir/dir_variation4.phpt +++ b/ext/standard/tests/dir/dir_variation4.phpt @@ -16,10 +16,10 @@ Test dir() function : usage variations - operate on previously opened directory echo "*** Testing dir() : operate on previously opened directory ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation4"; @mkdir($dir_path); @@ -46,7 +46,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation4"; rmdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation6.phpt b/ext/standard/tests/dir/dir_variation6.phpt index 3fdfc789e2..c7ce2bc080 100644 --- a/ext/standard/tests/dir/dir_variation6.phpt +++ b/ext/standard/tests/dir/dir_variation6.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing dir() : open a non-existent directory ***\n"; // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation6"; @mkdir($dir_path); diff --git a/ext/standard/tests/dir/dir_variation7.phpt b/ext/standard/tests/dir/dir_variation7.phpt index 11bfa0cb8e..e069043fe3 100644 --- a/ext/standard/tests/dir/dir_variation7.phpt +++ b/ext/standard/tests/dir/dir_variation7.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -36,7 +36,7 @@ echo "*** Testing dir() : remove execute permission from the parent dir ***\n"; |-> sub_dir ( sub parent ) |-> child_dir ( child dir) */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $parent_dir_path = $file_path."/dir_variation7"; @mkdir($parent_dir_path); chmod($parent_dir_path, 0777); @@ -67,7 +67,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $parent_dir_path = $file_path."/dir_variation7"; $sub_dir_path = $parent_dir_path."/sub_dir"; $child_dir_path = $sub_dir_path."/child_dir"; diff --git a/ext/standard/tests/dir/dir_variation8.phpt b/ext/standard/tests/dir/dir_variation8.phpt index 4e7bd13f2f..8664a33e34 100644 --- a/ext/standard/tests/dir/dir_variation8.phpt +++ b/ext/standard/tests/dir/dir_variation8.phpt @@ -22,7 +22,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing dir() : checking with wildcard characters ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path."/dir_variation81"; $sub_dir_path = $dir_path."/sub_dir1"; diff --git a/ext/standard/tests/dir/dir_variation9.phpt b/ext/standard/tests/dir/dir_variation9.phpt index 3756ffd42d..50f6d6c3ce 100644 --- a/ext/standard/tests/dir/dir_variation9.phpt +++ b/ext/standard/tests/dir/dir_variation9.phpt @@ -23,7 +23,7 @@ echo "*** Testing dir() : checking with valid and invalid paths ***\n"; /* create the temporary directories */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // directory dir_variation91 with one sub-directory sub_dir11 and sub-sub-directory sub_dir111 $dir_path1 = $file_path."/dir_variation91"; @@ -58,7 +58,7 @@ echo "Done"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path1 = $file_path."/dir_variation91"; $sub_dir11 = $dir_path1."/sub_dir11"; diff --git a/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt b/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt index f3d2a6d1d4..41d90864ef 100644 --- a/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing getcwd() : basic functionality ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/私はガラスを食べられますgetcwd_basic"; +$directory = __DIR__ . "/私はガラスを食べられますgetcwd_basic"; mkdir($directory); var_dump(getcwd()); @@ -30,7 +30,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/私はガラスを食べられますgetcwd_basic"; +$directory = __DIR__ . "/私はガラスを食べられますgetcwd_basic"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/getcwd_basic.phpt b/ext/standard/tests/dir/getcwd_basic.phpt index f09eb7165a..577521a347 100644 --- a/ext/standard/tests/dir/getcwd_basic.phpt +++ b/ext/standard/tests/dir/getcwd_basic.phpt @@ -14,7 +14,7 @@ Test getcwd() function : basic functionality echo "*** Testing getcwd() : basic functionality ***\n"; //create temporary directory for test, removed in CLEAN section -$directory = dirname(__FILE__) . "/getcwd_basic"; +$directory = __DIR__ . "/getcwd_basic"; mkdir($directory); var_dump(getcwd()); @@ -24,7 +24,7 @@ var_dump(getcwd()); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . "/getcwd_basic"; +$directory = __DIR__ . "/getcwd_basic"; rmdir($directory); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/opendir_error2.phpt b/ext/standard/tests/dir/opendir_error2.phpt index 9156585938..47b7709cec 100644 --- a/ext/standard/tests/dir/opendir_error2.phpt +++ b/ext/standard/tests/dir/opendir_error2.phpt @@ -20,11 +20,11 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing opendir() : error conditions ***\n"; echo "\n-- Pass a non-existent absolute path: --\n"; -$path = dirname(__FILE__) . "/idonotexist"; +$path = __DIR__ . "/idonotexist"; var_dump(opendir($path)); echo "\n-- Pass a non-existent relative path: --\n"; -chdir(dirname(__FILE__)); +chdir(__DIR__); var_dump(opendir('idonotexist')); ?> ===DONE=== diff --git a/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt b/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt index 6ffd12aaff..8bf2d3c26a 100644 --- a/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt +++ b/ext/standard/tests/dir/opendir_variation3-win32-mb.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing opendir() : usage variation ***\n"; -$path = dirname(__FILE__) . "/私はガラスを食べられますopendir_variation3"; +$path = __DIR__ . "/私はガラスを食べられますopendir_variation3"; mkdir($path); echo "\n-- Open directory first time: --\n"; @@ -40,7 +40,7 @@ closedir($dh2); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . "/私はガラスを食べられますopendir_variation3"; +$path = __DIR__ . "/私はガラスを食べられますopendir_variation3"; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/opendir_variation3.phpt b/ext/standard/tests/dir/opendir_variation3.phpt index 1e9a62f394..65ec8df82f 100644 --- a/ext/standard/tests/dir/opendir_variation3.phpt +++ b/ext/standard/tests/dir/opendir_variation3.phpt @@ -13,7 +13,7 @@ Test opendir() function : usage variations - open a directory twice echo "*** Testing opendir() : usage variation ***\n"; -$path = dirname(__FILE__) . "/opendir_variation3"; +$path = __DIR__ . "/opendir_variation3"; mkdir($path); echo "\n-- Open directory first time: --\n"; @@ -34,7 +34,7 @@ closedir($dh2); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . "/opendir_variation3"; +$path = __DIR__ . "/opendir_variation3"; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/opendir_variation5.phpt b/ext/standard/tests/dir/opendir_variation5.phpt index bd8b90d464..ac12930280 100644 --- a/ext/standard/tests/dir/opendir_variation5.phpt +++ b/ext/standard/tests/dir/opendir_variation5.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -36,7 +36,7 @@ echo "*** Testing opendir() : usage variations ***\n"; * |-> child_dir ( child dir) */ -$parent_dir_path = dirname(__FILE__) . "/opendir_variation5"; +$parent_dir_path = __DIR__ . "/opendir_variation5"; mkdir($parent_dir_path); chmod($parent_dir_path, 0777); @@ -74,7 +74,7 @@ if (is_resource($dir_handle2)) { ===DONE=== --CLEAN-- <?php -$parent_dir_path = dirname(__FILE__) . "/opendir_variation5"; +$parent_dir_path = __DIR__ . "/opendir_variation5"; $sub_dir_path = $parent_dir_path."/sub_dir"; $child_dir_path = $sub_dir_path."/child_dir"; diff --git a/ext/standard/tests/dir/opendir_variation6-win32.phpt b/ext/standard/tests/dir/opendir_variation6-win32.phpt index caca6a0504..3e3c26e679 100644 --- a/ext/standard/tests/dir/opendir_variation6-win32.phpt +++ b/ext/standard/tests/dir/opendir_variation6-win32.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing opendir() : usage variations ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; @@ -40,7 +40,7 @@ var_dump( opendir($dir_path . "/sub?dir1") ); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/opendir_variation6"; +$dir_path = __DIR__ . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; rmdir($sub_dir_path); diff --git a/ext/standard/tests/dir/opendir_variation6.phpt b/ext/standard/tests/dir/opendir_variation6.phpt index e16235ba87..c51cd4ca26 100644 --- a/ext/standard/tests/dir/opendir_variation6.phpt +++ b/ext/standard/tests/dir/opendir_variation6.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing opendir() : usage variations ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; @@ -40,7 +40,7 @@ var_dump( opendir($dir_path . "/sub?dir1") ); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/opendir_variation6"; +$dir_path = __DIR__ . "/opendir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; rmdir($sub_dir_path); diff --git a/ext/standard/tests/dir/opendir_variation7.phpt b/ext/standard/tests/dir/opendir_variation7.phpt index a75859b9fc..d468f27008 100644 --- a/ext/standard/tests/dir/opendir_variation7.phpt +++ b/ext/standard/tests/dir/opendir_variation7.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__) . "/opendir_root_check.tmp"; +$filename = __DIR__ . "/opendir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -29,7 +29,7 @@ unlink($filename); echo "*** Testing opendir() : usage variations ***\n"; // create the temporary directory -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/opendir_variation7"; mkdir($dir_path); @@ -79,7 +79,7 @@ foreach ($permission_values as $perm) { --CLEAN-- <?php // deleting temporary directory -$dir_path = dirname(__FILE__) . "/opendir_variation7"; +$dir_path = __DIR__ . "/opendir_variation7"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_basic-win32-mb.phpt b/ext/standard/tests/dir/readdir_basic-win32-mb.phpt index f9a7db632d..697d8774f9 100644 --- a/ext/standard/tests/dir/readdir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_basic-win32-mb.phpt @@ -20,10 +20,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path = dirname(__FILE__) . '/私はガラスを食べられますreaddir_basic'; +$path = __DIR__ . '/私はガラスを食べられますreaddir_basic'; mkdir($path); create_files($path, 3); @@ -55,7 +55,7 @@ closedir($dh); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/私はガラスを食べられますreaddir_basic'; +$path = __DIR__ . '/私はガラスを食べられますreaddir_basic'; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_basic.phpt b/ext/standard/tests/dir/readdir_basic.phpt index c6d1d79d79..8c615afc5e 100644 --- a/ext/standard/tests/dir/readdir_basic.phpt +++ b/ext/standard/tests/dir/readdir_basic.phpt @@ -14,10 +14,10 @@ Test readdir() function : basic functionality echo "*** Testing readdir() : basic functionality ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path = dirname(__FILE__) . '/readdir_basic'; +$path = __DIR__ . '/readdir_basic'; mkdir($path); create_files($path, 3); @@ -49,7 +49,7 @@ closedir($dh); ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/readdir_basic'; +$path = __DIR__ . '/readdir_basic'; rmdir($path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt index 31e52c1105..ede4199ac6 100644 --- a/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation2-win32-mb.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; -$path = dirname(__FILE__) . '/私はガラスを食べられますreaddir_variation2'; +$path = __DIR__ . '/私はガラスを食べられますreaddir_variation2'; mkdir($path); $dir_handle = opendir($path); @@ -42,7 +42,7 @@ foreach($entries as $entry) { ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/私はガラスを食べられますreaddir_variation2'; +$path = __DIR__ . '/私はガラスを食べられますreaddir_variation2'; rmdir($path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/readdir_variation2.phpt b/ext/standard/tests/dir/readdir_variation2.phpt index 38965872b0..fbe383e768 100644 --- a/ext/standard/tests/dir/readdir_variation2.phpt +++ b/ext/standard/tests/dir/readdir_variation2.phpt @@ -13,7 +13,7 @@ Test readdir() function : usage variations - empty directories echo "*** Testing readdir() : usage variations ***\n"; -$path = dirname(__FILE__) . '/readdir_variation2'; +$path = __DIR__ . '/readdir_variation2'; mkdir($path); $dir_handle = opendir($path); @@ -36,7 +36,7 @@ foreach($entries as $entry) { ===DONE=== --CLEAN-- <?php -$path = dirname(__FILE__) . '/readdir_variation2'; +$path = __DIR__ . '/readdir_variation2'; rmdir($path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt index 1b3114c550..2f343dcd62 100644 --- a/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation3-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/私はガラスを食べられますsub_folder'; mkdir($path_top); mkdir($path_sub); @@ -52,7 +52,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/私はガラスを食べられますsub_folder'; rmdir($path_sub); rmdir($path_top); diff --git a/ext/standard/tests/dir/readdir_variation3.phpt b/ext/standard/tests/dir/readdir_variation3.phpt index 1a7566c547..849068e97a 100644 --- a/ext/standard/tests/dir/readdir_variation3.phpt +++ b/ext/standard/tests/dir/readdir_variation3.phpt @@ -15,10 +15,10 @@ Test readdir() function : usage variations - sub-directories echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -chdir(dirname(__FILE__)); -include(dirname(__FILE__)."/../file/file.inc"); +chdir(__DIR__); +include(__DIR__."/../file/file.inc"); -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/sub_folder'; mkdir($path_top); mkdir($path_sub); @@ -46,7 +46,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$path_top = dirname(__FILE__) . '/readdir_variation3'; +$path_top = __DIR__ . '/readdir_variation3'; $path_sub = $path_top . '/sub_folder'; rmdir($path_sub); rmdir($path_top); diff --git a/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt index 1c766a51d5..a77fcd8ca4 100644 --- a/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation4-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/私はガラスを食べられますreaddir_variation4/"; +$dir_path = __DIR__ . "/私はガラスを食べられますreaddir_variation4/"; mkdir($dir_path); // heredoc string @@ -84,7 +84,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/私はガラスを食べられますreaddir_variation4/"; +$dir_path = __DIR__ . "/私はガラスを食べられますreaddir_variation4/"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation4.phpt b/ext/standard/tests/dir/readdir_variation4.phpt index acbb8f32ab..22eb62381a 100644 --- a/ext/standard/tests/dir/readdir_variation4.phpt +++ b/ext/standard/tests/dir/readdir_variation4.phpt @@ -14,7 +14,7 @@ Test readdir() function : usage variations - different file names echo "*** Testing readdir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/readdir_variation4/"; +$dir_path = __DIR__ . "/readdir_variation4/"; mkdir($dir_path); // heredoc string @@ -78,7 +78,7 @@ closedir($dir_handle); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/readdir_variation4/"; +$dir_path = __DIR__ . "/readdir_variation4/"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation5.phpt b/ext/standard/tests/dir/readdir_variation5.phpt index 0ed40964a6..575a4000ac 100644 --- a/ext/standard/tests/dir/readdir_variation5.phpt +++ b/ext/standard/tests/dir/readdir_variation5.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/readdir_root_check.tmp"; +$filename = __DIR__."/readdir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -30,7 +30,7 @@ unlink($filename); echo "*** Testing readdir() : usage variations ***\n"; // create the temporary directory -$dir_path = dirname(__FILE__) . "/readdir_variation5"; +$dir_path = __DIR__ . "/readdir_variation5"; mkdir($dir_path); /* different values for directory permissions */ @@ -76,7 +76,7 @@ foreach($permission_values as $perm) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/readdir_variation5"; +$dir_path = __DIR__ . "/readdir_variation5"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt b/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt index fc7d0f78c5..57a8147a46 100644 --- a/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt +++ b/ext/standard/tests/dir/readdir_variation6-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$dir_path = dirname(__FILE__) . "/私はガラスを食べられますreaddir_variation6"; +$dir_path = __DIR__ . "/私はガラスを食べられますreaddir_variation6"; mkdir($dir_path); // create files within the temporary directory @@ -64,7 +64,7 @@ closedir(); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/私はガラスを食べられますreaddir_variation6"; +$dir_path = __DIR__ . "/私はガラスを食べられますreaddir_variation6"; rmdir($dir_path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/readdir_variation6.phpt b/ext/standard/tests/dir/readdir_variation6.phpt index 889d96a387..379d5cc80c 100644 --- a/ext/standard/tests/dir/readdir_variation6.phpt +++ b/ext/standard/tests/dir/readdir_variation6.phpt @@ -15,10 +15,10 @@ Test readdir() function : usage variations - operate on previously opened direct echo "*** Testing readdir() : usage variations ***\n"; // include the file.inc for Function: function create_files() -include( dirname(__FILE__)."/../file/file.inc"); +include( __DIR__."/../file/file.inc"); // create the temporary directory -$dir_path = dirname(__FILE__) . "/readdir_variation6"; +$dir_path = __DIR__ . "/readdir_variation6"; mkdir($dir_path); // create files within the temporary directory @@ -58,7 +58,7 @@ closedir(); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/readdir_variation6"; +$dir_path = __DIR__ . "/readdir_variation6"; rmdir($dir_path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt b/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt index aaf01aab09..5e704870ee 100644 --- a/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/rewinddir_basic-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing rewinddir() : basic functionality ***\n"; // include file.inc for create_files function -include(dirname(__FILE__) . "/../file/file.inc"); +include(__DIR__ . "/../file/file.inc"); -$dir_path1 = dirname(__FILE__) . "/私はガラスを食べられますrewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/私はガラスを食べられますrewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/私はガラスを食べられますrewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/私はガラスを食べられますrewinddir_basic_dir2"; mkdir($dir_path1); mkdir($dir_path2); @@ -66,8 +66,8 @@ delete_files($dir_path2, 1, "私はガラスを食べられますfile", 2); ===DONE=== --CLEAN-- <?php -$dir_path1 = dirname(__FILE__) . "/私はガラスを食べられますrewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/私はガラスを食べられますrewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/私はガラスを食べられますrewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/私はガラスを食べられますrewinddir_basic_dir2"; rmdir($dir_path1); rmdir($dir_path2); ?> diff --git a/ext/standard/tests/dir/rewinddir_basic.phpt b/ext/standard/tests/dir/rewinddir_basic.phpt index 3571808f85..b0abc0a379 100644 --- a/ext/standard/tests/dir/rewinddir_basic.phpt +++ b/ext/standard/tests/dir/rewinddir_basic.phpt @@ -15,10 +15,10 @@ Test rewinddir() function : basic functionality echo "*** Testing rewinddir() : basic functionality ***\n"; // include file.inc for create_files function -include(dirname(__FILE__) . "/../file/file.inc"); +include(__DIR__ . "/../file/file.inc"); -$dir_path1 = dirname(__FILE__) . "/rewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/rewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/rewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/rewinddir_basic_dir2"; mkdir($dir_path1); mkdir($dir_path2); @@ -60,8 +60,8 @@ delete_files($dir_path2, 1, 'file', 2); ===DONE=== --CLEAN-- <?php -$dir_path1 = dirname(__FILE__) . "/rewinddir_basic_dir1"; -$dir_path2 = dirname(__FILE__) . "/rewinddir_basic_dir2"; +$dir_path1 = __DIR__ . "/rewinddir_basic_dir1"; +$dir_path2 = __DIR__ . "/rewinddir_basic_dir2"; rmdir($dir_path1); rmdir($dir_path2); ?> diff --git a/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt b/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt index b8f36d7eb2..e46640c41e 100644 --- a/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt +++ b/ext/standard/tests/dir/rewinddir_variation2-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing rewinddir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . '/私はガラスを食べられますrewinddir_variation2'; +$dir_path = __DIR__ . '/私はガラスを食べられますrewinddir_variation2'; mkdir($dir_path); echo "\n-- Create the directory handle, read and close the directory --\n"; @@ -34,7 +34,7 @@ var_dump(rewinddir($dir_handle)); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . '/私はガラスを食べられますrewinddir_variation2'; +$dir_path = __DIR__ . '/私はガラスを食べられますrewinddir_variation2'; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/rewinddir_variation2.phpt b/ext/standard/tests/dir/rewinddir_variation2.phpt index aa18641292..02654aa80c 100644 --- a/ext/standard/tests/dir/rewinddir_variation2.phpt +++ b/ext/standard/tests/dir/rewinddir_variation2.phpt @@ -14,7 +14,7 @@ Test rewinddir() function : usage variations - operate on a closed directory echo "*** Testing rewinddir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . '/rewinddir_variation2'; +$dir_path = __DIR__ . '/rewinddir_variation2'; mkdir($dir_path); echo "\n-- Create the directory handle, read and close the directory --\n"; @@ -28,7 +28,7 @@ var_dump(rewinddir($dir_handle)); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . '/rewinddir_variation2'; +$dir_path = __DIR__ . '/rewinddir_variation2'; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_basic-win32-mb.phpt b/ext/standard/tests/dir/scandir_basic-win32-mb.phpt index 14e9405303..39c375461e 100644 --- a/ext/standard/tests/dir/scandir_basic-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_basic-win32-mb.phpt @@ -20,10 +20,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : basic functionality ***\n"; // include file.inc for create_files function -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); // set up directory -$directory = dirname(__FILE__) . '/私はガラスを食べられますscandir_basic'; +$directory = __DIR__ . '/私はガラスを食べられますscandir_basic'; mkdir($directory); create_files($directory, 3, "numeric", 0755, 1, "w", "私はガラスを食べられますfile"); @@ -40,7 +40,7 @@ delete_files($directory, 3, "私はガラスを食べられますfile"); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . '/私はガラスを食べられますscandir_basic'; +$directory = __DIR__ . '/私はガラスを食べられますscandir_basic'; rmdir($directory); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_basic.phpt b/ext/standard/tests/dir/scandir_basic.phpt index 568ae5a5e2..e0e40f5620 100644 --- a/ext/standard/tests/dir/scandir_basic.phpt +++ b/ext/standard/tests/dir/scandir_basic.phpt @@ -14,10 +14,10 @@ Test scandir() function : basic functionality echo "*** Testing scandir() : basic functionality ***\n"; // include file.inc for create_files function -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); // set up directory -$directory = dirname(__FILE__) . '/scandir_basic'; +$directory = __DIR__ . '/scandir_basic'; mkdir($directory); create_files($directory, 3); @@ -34,7 +34,7 @@ delete_files($directory, 3); ===DONE=== --CLEAN-- <?php -$directory = dirname(__FILE__) . '/scandir_basic'; +$directory = __DIR__ . '/scandir_basic'; rmdir($directory); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_error2.phpt b/ext/standard/tests/dir/scandir_error2.phpt index 2044471c66..121d68bab8 100644 --- a/ext/standard/tests/dir/scandir_error2.phpt +++ b/ext/standard/tests/dir/scandir_error2.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing scandir() : error conditions ***\n"; -$directory = dirname(__FILE__) . '/idonotexist'; +$directory = __DIR__ . '/idonotexist'; echo "\n-- Pass scandir() an absolute path that does not exist --\n"; var_dump(scandir($directory)); diff --git a/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt index b525e3caed..b596eb0e17 100644 --- a/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation10-win32-mb.phpt @@ -25,10 +25,10 @@ printf("SCANDIR_SORT_NONE: %d\n", SCANDIR_SORT_NONE); echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation10'; +$dir = __DIR__ . '/私はガラスを食べられますscandir_variation10'; mkdir($dir); @create_files($dir, 2, "numeric", 0755, 1, "w", "私はガラスを食べられますfile"); @@ -49,7 +49,7 @@ delete_files($dir, 2, "私はガラスを食べられますfile"); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation10'; +$dir = __DIR__ . '/私はガラスを食べられますscandir_variation10'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation10.phpt b/ext/standard/tests/dir/scandir_variation10.phpt index 0fade971b4..28220c66ba 100644 --- a/ext/standard/tests/dir/scandir_variation10.phpt +++ b/ext/standard/tests/dir/scandir_variation10.phpt @@ -19,10 +19,10 @@ printf("SCANDIR_SORT_NONE: %d\n", SCANDIR_SORT_NONE); echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/scandir_variation10'; +$dir = __DIR__ . '/scandir_variation10'; mkdir($dir); @create_files($dir, 2); @@ -43,7 +43,7 @@ delete_files($dir, 2); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/scandir_variation10'; +$dir = __DIR__ . '/scandir_variation10'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt index ffb0284d95..5505b3db6d 100644 --- a/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation3-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // Initialise function arguments not being substituted -$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation3'; +$dir = __DIR__ . '/私はガラスを食べられますscandir_variation3'; mkdir($dir); $sorting_order = SCANDIR_SORT_ASCENDING; @@ -106,7 +106,7 @@ fclose($fp); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation3'; +$dir = __DIR__ . '/私はガラスを食べられますscandir_variation3'; rmdir($dir); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt index 24fc04df6f..9bfeddf556 100644 --- a/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation4-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); $base_dir_path = __DIR__ . '/scandir_variation4-win32-mb'; @mkdir($base_dir_path); diff --git a/ext/standard/tests/dir/scandir_variation4.phpt b/ext/standard/tests/dir/scandir_variation4.phpt index 2b7e6b6dbe..6030ace2ac 100644 --- a/ext/standard/tests/dir/scandir_variation4.phpt +++ b/ext/standard/tests/dir/scandir_variation4.phpt @@ -14,7 +14,7 @@ Test scandir() function : usage variations - different relative paths echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include (dirname(__FILE__) . '/../file/file.inc'); +include (__DIR__ . '/../file/file.inc'); $base_dir_path = __DIR__ . '/scandir_variation4'; @mkdir($base_dir_path); diff --git a/ext/standard/tests/dir/scandir_variation5.phpt b/ext/standard/tests/dir/scandir_variation5.phpt index a17e8a5d35..47539c493f 100644 --- a/ext/standard/tests/dir/scandir_variation5.phpt +++ b/ext/standard/tests/dir/scandir_variation5.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/dir_root_check.tmp"; +$filename = __DIR__."/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -37,7 +37,7 @@ echo "*** Testing scandir() : usage variations ***\n"; * |-> child_dir ( child dir) */ -$parent_dir_path = dirname(__FILE__) . "/scandir_variation5"; +$parent_dir_path = __DIR__ . "/scandir_variation5"; mkdir($parent_dir_path); chmod($parent_dir_path, 0777); @@ -66,7 +66,7 @@ var_dump(scandir($child_dir_path)); ===DONE=== --CLEAN-- <?php -$parent_dir_path = dirname(__FILE__) . "/scandir_variation5"; +$parent_dir_path = __DIR__ . "/scandir_variation5"; $sub_dir_path = $parent_dir_path."/sub_dir"; $child_dir_path = $sub_dir_path."/child_dir"; diff --git a/ext/standard/tests/dir/scandir_variation6.phpt b/ext/standard/tests/dir/scandir_variation6.phpt index c4467d1536..d516411886 100644 --- a/ext/standard/tests/dir/scandir_variation6.phpt +++ b/ext/standard/tests/dir/scandir_variation6.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // create the temporary directories -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_path = $file_path . "/scandir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; @@ -41,7 +41,7 @@ var_dump( scandir($dir_path . "/sub?dir1") ); ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/scandir_variation6"; +$dir_path = __DIR__ . "/scandir_variation6"; $sub_dir_path = $dir_path . "/sub_dir1"; rmdir($sub_dir_path); diff --git a/ext/standard/tests/dir/scandir_variation7.phpt b/ext/standard/tests/dir/scandir_variation7.phpt index 6c77f69e4d..b0305a6e03 100644 --- a/ext/standard/tests/dir/scandir_variation7.phpt +++ b/ext/standard/tests/dir/scandir_variation7.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not for Windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__) . "/dir_root_check.tmp"; +$filename = __DIR__ . "/dir_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -29,7 +29,7 @@ unlink($filename); echo "*** Testing scandir() : usage variations ***\n"; // create the temporary directory -$dir_path = dirname(__FILE__) . "/scandir_variation7"; +$dir_path = __DIR__ . "/scandir_variation7"; mkdir($dir_path); // different values for directory permissions @@ -71,7 +71,7 @@ foreach ($permission_values as $perm) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/scandir_variation7"; +$dir_path = __DIR__ . "/scandir_variation7"; rmdir($dir_path); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt index 9fead1e455..acc289e590 100644 --- a/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation8-win32-mb.phpt @@ -20,7 +20,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/私はガラスを食べられますscandir_variation8/"; +$dir_path = __DIR__ . "/私はガラスを食べられますscandir_variation8/"; mkdir($dir_path); // heredoc string @@ -74,7 +74,7 @@ foreach ($content as $file_name) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/私はガラスを食べられますscandir_variation8"; +$dir_path = __DIR__ . "/私はガラスを食べられますscandir_variation8"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_variation8.phpt b/ext/standard/tests/dir/scandir_variation8.phpt index 9311d030c1..5ba7a6391b 100644 --- a/ext/standard/tests/dir/scandir_variation8.phpt +++ b/ext/standard/tests/dir/scandir_variation8.phpt @@ -14,7 +14,7 @@ Test scandir() function : usage variations - different file names echo "*** Testing scandir() : usage variations ***\n"; -$dir_path = dirname(__FILE__) . "/scandir_variation8/"; +$dir_path = __DIR__ . "/scandir_variation8/"; mkdir($dir_path); // heredoc string @@ -68,7 +68,7 @@ foreach ($content as $file_name) { ===DONE=== --CLEAN-- <?php -$dir_path = dirname(__FILE__) . "/scandir_variation8"; +$dir_path = __DIR__ . "/scandir_variation8"; rmdir($dir_path); ?> --EXPECTF-- diff --git a/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt b/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt index 022c1e5ba8..c634f2d3b3 100644 --- a/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt +++ b/ext/standard/tests/dir/scandir_variation9-win32-mb.phpt @@ -21,10 +21,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation9'; +$dir = __DIR__ . '/私はガラスを食べられますscandir_variation9'; mkdir($dir); @create_files($dir, 2, "numeric", 0755, 1, "w", "私はガラスを食べられますfile"); @@ -40,7 +40,7 @@ delete_files($dir, 2, "私はガラスを食べられますfile"); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/私はガラスを食べられますscandir_variation9'; +$dir = __DIR__ . '/私はガラスを食べられますscandir_variation9'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/dir/scandir_variation9.phpt b/ext/standard/tests/dir/scandir_variation9.phpt index 8cabeb5e36..42e42bb6cb 100644 --- a/ext/standard/tests/dir/scandir_variation9.phpt +++ b/ext/standard/tests/dir/scandir_variation9.phpt @@ -15,10 +15,10 @@ Test scandir() function : usage variations - different ints as $sorting_order ar echo "*** Testing scandir() : usage variations ***\n"; // include for create_files/delete_files functions -include(dirname(__FILE__) . '/../file/file.inc'); +include(__DIR__ . '/../file/file.inc'); // create directory and files -$dir = dirname(__FILE__) . '/scandir_variation9'; +$dir = __DIR__ . '/scandir_variation9'; mkdir($dir); @create_files($dir, 2); @@ -34,7 +34,7 @@ delete_files($dir, 2); ===DONE=== --CLEAN-- <?php -$dir = dirname(__FILE__) . '/scandir_variation9'; +$dir = __DIR__ . '/scandir_variation9'; rmdir($dir); ?> --EXPECT-- diff --git a/ext/standard/tests/directory/bug74589_utf8.phpt b/ext/standard/tests/directory/bug74589_utf8.phpt index 126857da5c..1bec90fe16 100644 --- a/ext/standard/tests/directory/bug74589_utf8.phpt +++ b/ext/standard/tests/directory/bug74589_utf8.phpt @@ -16,7 +16,7 @@ internal_encoding=utf-8 */ $item = "bug74589_新建文件夹"; // utf-8 string -$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item; +$dir = __DIR__ . DIRECTORY_SEPARATOR . $item; $test_file = $dir . DIRECTORY_SEPARATOR . "test.php"; mkdir($dir); @@ -25,7 +25,7 @@ file_put_contents($test_file, "<?php var_dump(__DIR__); var_dump(__FILE__); - var_dump(__DIR__ === dirname(__FILE__));"); + var_dump(__DIR__ === __DIR__);"); $php = getenv('TEST_PHP_EXECUTABLE'); @@ -41,7 +41,7 @@ bool(true) --CLEAN-- <?php $item = "bug74589_新建文件夹"; // utf-8 string - $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item; + $dir = __DIR__ . DIRECTORY_SEPARATOR . $item; $test_file = $dir . DIRECTORY_SEPARATOR . "test.php"; unlink($test_file); rmdir($dir); diff --git a/ext/standard/tests/file/001-win32-mb.phpt b/ext/standard/tests/file/001-win32-mb.phpt index e593270b12..cd7cc75ddc 100644 --- a/ext/standard/tests/file/001-win32-mb.phpt +++ b/ext/standard/tests/file/001-win32-mb.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $fname = 'test_私はガラスを食べられます.file'; diff --git a/ext/standard/tests/file/001-win32.phpt b/ext/standard/tests/file/001-win32.phpt index 3372c6cb83..f40804fe23 100644 --- a/ext/standard/tests/file/001-win32.phpt +++ b/ext/standard/tests/file/001-win32.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); @unlink('test.file'); if (file_exists('test.file')) { echo "test.file exists\n"; diff --git a/ext/standard/tests/file/001.phpt b/ext/standard/tests/file/001.phpt index d604699ac4..d5ab2e5a0b 100644 --- a/ext/standard/tests/file/001.phpt +++ b/ext/standard/tests/file/001.phpt @@ -9,7 +9,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); @unlink('test.file'); @unlink('test.link'); if (file_exists('test.file')) { diff --git a/ext/standard/tests/file/004.phpt b/ext/standard/tests/file/004.phpt index 3fead8b215..522b8320e4 100644 --- a/ext/standard/tests/file/004.phpt +++ b/ext/standard/tests/file/004.phpt @@ -2,7 +2,7 @@ file_put_contents() test --FILE-- <?php - chdir(dirname(__FILE__)); + chdir(__DIR__); for ($i = 1; $i < 6; $i++) { @unlink("./TEST{$i}"); } diff --git a/ext/standard/tests/file/005_basic.phpt b/ext/standard/tests/file/005_basic.phpt index 329fd15773..242110cef3 100644 --- a/ext/standard/tests/file/005_basic.phpt +++ b/ext/standard/tests/file/005_basic.phpt @@ -24,20 +24,20 @@ echo "*** Testing the basic functionality with file ***\n"; print( @date('Y:M:D:H:i:s', fileatime(__FILE__)) )."\n"; print( @date('Y:M:D:H:i:s', filemtime(__FILE__)) )."\n"; print( @date('Y:M:D:H:i:s', filectime(__FILE__)) )."\n"; -print( @date('Y:M:D:H:i:s', touch(dirname(__FILE__)."/005_basic.tmp")) )."\n"; +print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic.tmp")) )."\n"; echo "*** Testing the basic functionality with dir ***\n"; print( @date('Y:M:D:H:i:s', fileatime(".")) )."\n"; print( @date('Y:M:D:H:i:s', filemtime(".")) )."\n"; print( @date('Y:M:D:H:i:s', filectime(".")) )."\n"; -print( @date('Y:M:D:H:i:s', touch(dirname(__FILE__)."/005_basic")) )."\n"; +print( @date('Y:M:D:H:i:s', touch(__DIR__."/005_basic")) )."\n"; echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/005_basic.tmp"); -unlink(dirname(__FILE__)."/005_basic"); +unlink(__DIR__."/005_basic.tmp"); +unlink(__DIR__."/005_basic"); ?> --EXPECTF-- *** Testing the basic functionality with file *** diff --git a/ext/standard/tests/file/005_variation-win32.phpt b/ext/standard/tests/file/005_variation-win32.phpt index 68fa209b24..1e712b7828 100644 --- a/ext/standard/tests/file/005_variation-win32.phpt +++ b/ext/standard/tests/file/005_variation-win32.phpt @@ -44,7 +44,7 @@ function stat_fn( $filename ) { } echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // create files $file_handle = fopen("$file_path/005_variation1.tmp", "w"); fclose($file_handle); @@ -143,7 +143,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/005_variation_softlink.tmp"); unlink($file_path."/005_variation_hardlink.tmp"); unlink($file_path."/005_variation1.tmp"); diff --git a/ext/standard/tests/file/005_variation.phpt b/ext/standard/tests/file/005_variation.phpt index f2bf19f6a3..1f92bb73aa 100644 --- a/ext/standard/tests/file/005_variation.phpt +++ b/ext/standard/tests/file/005_variation.phpt @@ -47,7 +47,7 @@ function stat_fn( $filename ) { } echo "*** Testing fileattime(), filemtime(), filectime() & touch() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // create files $file_handle = fopen("$file_path/005_variation1.tmp", "w"); fclose($file_handle); @@ -158,7 +158,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; if(file_exists($file_path."/005_variation_softlink.tmp")) { unlink($file_path."/005_variation_softlink.tmp"); } diff --git a/ext/standard/tests/file/006_basic.phpt b/ext/standard/tests/file/006_basic.phpt index e8b36c2c0d..553e8445f1 100644 --- a/ext/standard/tests/file/006_basic.phpt +++ b/ext/standard/tests/file/006_basic.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); Description: Attempts to change the mode of the file specified by filename to that given in mode */ -$path = dirname(__FILE__); +$path = __DIR__; echo "*** Testing fileperms(), chmod() with files and dirs ***\n"; fopen($path."/perm.tmp", "w"); @@ -46,8 +46,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/perm.tmp"); -rmdir(dirname(__FILE__)."/perm"); +unlink(__DIR__."/perm.tmp"); +rmdir(__DIR__."/perm"); ?> --EXPECT-- *** Testing fileperms(), chmod() with files and dirs *** diff --git a/ext/standard/tests/file/006_error.phpt b/ext/standard/tests/file/006_error.phpt index c35eba2128..0e95f8056e 100644 --- a/ext/standard/tests/file/006_error.phpt +++ b/ext/standard/tests/file/006_error.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -47,23 +47,23 @@ var_dump( fileperms("/no/such/file/dir") ); echo "\n"; /* With args less than expected */ -$fp = fopen(dirname(__FILE__)."/006_error.tmp", "w"); +$fp = fopen(__DIR__."/006_error.tmp", "w"); fclose($fp); -var_dump( chmod(dirname(__FILE__)."/006_error.tmp") ); +var_dump( chmod(__DIR__."/006_error.tmp") ); var_dump( chmod("nofile") ); var_dump( chmod() ); var_dump( fileperms() ); /* With args greater than expected */ -var_dump( chmod(dirname(__FILE__)."/006_error.tmp", 0755, TRUE) ); -var_dump( fileperms(dirname(__FILE__)."/006_error.tmp", 0777) ); +var_dump( chmod(__DIR__."/006_error.tmp", 0755, TRUE) ); +var_dump( fileperms(__DIR__."/006_error.tmp", 0777) ); var_dump( fileperms("nofile", 0777) ); echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -unlink( dirname(__FILE__)."/006_error.tmp"); +unlink( __DIR__."/006_error.tmp"); ?> --EXPECTF-- *** Testing error conditions for fileperms(), chmod() *** diff --git a/ext/standard/tests/file/006_variation1.phpt b/ext/standard/tests/file/006_variation1.phpt index 410f923a86..102bc28432 100644 --- a/ext/standard/tests/file/006_variation1.phpt +++ b/ext/standard/tests/file/006_variation1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -30,10 +30,10 @@ unlink($filename); echo "*** Testing fileperms() & chmod() : usage variations ***\n"; -$file_name = dirname(__FILE__)."/006_variation1.tmp"; +$file_name = __DIR__."/006_variation1.tmp"; $file_handle = fopen($file_name, "w"); fclose($file_handle); -$dir_name = dirname(__FILE__)."/006_variation1"; +$dir_name = __DIR__."/006_variation1"; mkdir($dir_name); $count = 1; @@ -56,10 +56,10 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -chmod(dirname(__FILE__)."/006_variation1.tmp", 0777); -chmod(dirname(__FILE__)."/006_variation1", 0777); -unlink(dirname(__FILE__)."/006_variation1.tmp"); -rmdir(dirname(__FILE__)."/006_variation1"); +chmod(__DIR__."/006_variation1.tmp", 0777); +chmod(__DIR__."/006_variation1", 0777); +unlink(__DIR__."/006_variation1.tmp"); +rmdir(__DIR__."/006_variation1"); ?> --EXPECT-- *** Testing fileperms() & chmod() : usage variations *** diff --git a/ext/standard/tests/file/006_variation2.phpt b/ext/standard/tests/file/006_variation2.phpt index 19bbf60fe9..cba524882f 100644 --- a/ext/standard/tests/file/006_variation2.phpt +++ b/ext/standard/tests/file/006_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not on Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/006_root_check.tmp"; +$filename = __DIR__."/006_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -32,10 +32,10 @@ unlink($filename); echo "*** Testing fileperms() & chmod() : usage variations ***\n"; -$file_name = dirname(__FILE__)."/006_variation2.tmp"; +$file_name = __DIR__."/006_variation2.tmp"; $file_handle = fopen($file_name, "w"); fclose($file_handle); -$dir_name = dirname(__FILE__)."/006_variation2"; +$dir_name = __DIR__."/006_variation2"; mkdir($dir_name); echo "\n*** Testing fileperms(), chmod() with miscellaneous permissions ***\n"; @@ -83,10 +83,10 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -chmod(dirname(__FILE__)."/006_variation2.tmp", 0777); -chmod(dirname(__FILE__)."/006_variation2", 0777); -unlink(dirname(__FILE__)."/006_variation2.tmp"); -rmdir(dirname(__FILE__)."/006_variation2"); +chmod(__DIR__."/006_variation2.tmp", 0777); +chmod(__DIR__."/006_variation2", 0777); +unlink(__DIR__."/006_variation2.tmp"); +rmdir(__DIR__."/006_variation2"); ?> --EXPECTF-- *** Testing fileperms() & chmod() : usage variations *** diff --git a/ext/standard/tests/file/007_basic.phpt b/ext/standard/tests/file/007_basic.phpt index 9fb473b368..fd2e5575a9 100644 --- a/ext/standard/tests/file/007_basic.phpt +++ b/ext/standard/tests/file/007_basic.phpt @@ -41,7 +41,7 @@ $modes = array( for( $i=0; $i<count($modes); $i++ ) { echo "\n-- Iteration with mode '$modes[$i]' --\n"; - $filename = dirname(__FILE__)."/007_basic.tmp"; + $filename = __DIR__."/007_basic.tmp"; // check fopen() $handle = fopen($filename, $modes[$i]); var_dump($handle ); diff --git a/ext/standard/tests/file/007_variation1.phpt b/ext/standard/tests/file/007_variation1.phpt index 2731b3bdc9..6ae441f61e 100644 --- a/ext/standard/tests/file/007_variation1.phpt +++ b/ext/standard/tests/file/007_variation1.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 1, "bytes"); @@ -38,7 +38,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation1.tmp"); +unlink(__DIR__."/007_variation1.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r' mode *** diff --git a/ext/standard/tests/file/007_variation10.phpt b/ext/standard/tests/file/007_variation10.phpt index 3093535e64..7f163265aa 100644 --- a/ext/standard/tests/file/007_variation10.phpt +++ b/ext/standard/tests/file/007_variation10.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r+t" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 10, "bytes"); @@ -40,7 +40,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation10.tmp"); +unlink(__DIR__."/007_variation10.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r+t' mode *** diff --git a/ext/standard/tests/file/007_variation11-win32-mb.phpt b/ext/standard/tests/file/007_variation11-win32-mb.phpt index 68b8396639..b0d84dfe93 100644 --- a/ext/standard/tests/file/007_variation11-win32-mb.phpt +++ b/ext/standard/tests/file/007_variation11-win32-mb.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file truncation when trying to open an existing file in "wt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wt", "007_variation_私はガラスを食べられます", 11, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = $file_path."/007_variation_私はガラスを食べられます11.tmp"; unlink($file); ?> diff --git a/ext/standard/tests/file/007_variation11-win32.phpt b/ext/standard/tests/file/007_variation11-win32.phpt index 242b38cada..436b22f8eb 100644 --- a/ext/standard/tests/file/007_variation11-win32.phpt +++ b/ext/standard/tests/file/007_variation11-win32.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file truncation when trying to open an existing file in "wt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wt", "007_variation", 11, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation11.tmp"); +unlink(__DIR__."/007_variation11.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'wt' mode *** diff --git a/ext/standard/tests/file/007_variation11.phpt b/ext/standard/tests/file/007_variation11.phpt index 92ec32eb22..9c6bff1417 100644 --- a/ext/standard/tests/file/007_variation11.phpt +++ b/ext/standard/tests/file/007_variation11.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) checking for the file truncation when trying to open an existing file in "wt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wt", "007_variation", 11, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation11.tmp"); +unlink(__DIR__."/007_variation11.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'wt' mode *** diff --git a/ext/standard/tests/file/007_variation12-win32.phpt b/ext/standard/tests/file/007_variation12-win32.phpt index 87bfc45c49..08a3ff80d8 100644 --- a/ext/standard/tests/file/007_variation12-win32.phpt +++ b/ext/standard/tests/file/007_variation12-win32.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file truncation when trying to open an existing file in "w+t" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 12, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation12.tmp"); +unlink(__DIR__."/007_variation12.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+t' mode *** diff --git a/ext/standard/tests/file/007_variation12.phpt b/ext/standard/tests/file/007_variation12.phpt index 43ca4f78ff..f75ef8df96 100644 --- a/ext/standard/tests/file/007_variation12.phpt +++ b/ext/standard/tests/file/007_variation12.phpt @@ -25,7 +25,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) checking for the file truncation when trying to open an existing file in "w+t" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 12, "bytes"); @@ -57,7 +57,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation12.tmp"); +unlink(__DIR__."/007_variation12.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+t' mode *** diff --git a/ext/standard/tests/file/007_variation13-win32.phpt b/ext/standard/tests/file/007_variation13-win32.phpt index 6c6d22f64e..12484cfcde 100644 --- a/ext/standard/tests/file/007_variation13-win32.phpt +++ b/ext/standard/tests/file/007_variation13-win32.phpt @@ -24,7 +24,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 13, "bytes"); @@ -49,7 +49,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation13.tmp"); +unlink(__DIR__."/007_variation13.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'at' mode *** diff --git a/ext/standard/tests/file/007_variation13.phpt b/ext/standard/tests/file/007_variation13.phpt index 6c416d1103..98be673d8a 100644 --- a/ext/standard/tests/file/007_variation13.phpt +++ b/ext/standard/tests/file/007_variation13.phpt @@ -24,7 +24,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 13, "bytes"); @@ -49,7 +49,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation13.tmp"); +unlink(__DIR__."/007_variation13.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'at' mode *** diff --git a/ext/standard/tests/file/007_variation14.phpt b/ext/standard/tests/file/007_variation14.phpt index af07d1652a..405a6a2dfe 100644 --- a/ext/standard/tests/file/007_variation14.phpt +++ b/ext/standard/tests/file/007_variation14.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a+t" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 14, "bytes"); @@ -43,7 +43,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation14.tmp"); +unlink(__DIR__."/007_variation14.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a+t' mode *** diff --git a/ext/standard/tests/file/007_variation15.phpt b/ext/standard/tests/file/007_variation15.phpt index d17a89f64f..39a7e506e5 100644 --- a/ext/standard/tests/file/007_variation15.phpt +++ b/ext/standard/tests/file/007_variation15.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "xt" mode checking for the warning msg when trying to open an existing file in "xt" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation15.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "xt"); //Opening the existing data file in 'xt' mod echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation15.tmp"); +unlink(__DIR__."/007_variation15.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'xt' mode *** diff --git a/ext/standard/tests/file/007_variation16.phpt b/ext/standard/tests/file/007_variation16.phpt index c48776a4cd..9173138db4 100644 --- a/ext/standard/tests/file/007_variation16.phpt +++ b/ext/standard/tests/file/007_variation16.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x+t" mode checking for the warning msg when trying to open an existing file in "x+t" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation16.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x+t"); //Opening the existing data file in "x+t" m echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation16.tmp"); +unlink(__DIR__."/007_variation16.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x+t' mode *** diff --git a/ext/standard/tests/file/007_variation17.phpt b/ext/standard/tests/file/007_variation17.phpt index 716dbbacb7..d468ad0452 100644 --- a/ext/standard/tests/file/007_variation17.phpt +++ b/ext/standard/tests/file/007_variation17.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "rb" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 17, "bytes"); @@ -38,7 +38,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation17.tmp"); +unlink(__DIR__."/007_variation17.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'rb' mode *** diff --git a/ext/standard/tests/file/007_variation18.phpt b/ext/standard/tests/file/007_variation18.phpt index 5d9b1ea212..0e510a421e 100644 --- a/ext/standard/tests/file/007_variation18.phpt +++ b/ext/standard/tests/file/007_variation18.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r+b" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 18, "bytes"); @@ -40,7 +40,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation18.tmp"); +unlink(__DIR__."/007_variation18.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r+b' mode *** diff --git a/ext/standard/tests/file/007_variation19.phpt b/ext/standard/tests/file/007_variation19.phpt index ebb19a0b2e..d6d3a3d761 100644 --- a/ext/standard/tests/file/007_variation19.phpt +++ b/ext/standard/tests/file/007_variation19.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "wb" mode checking for the file truncation when trying to open an existing file in "wb" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "wb", "007_variation", 19, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation19.tmp"); +unlink(__DIR__."/007_variation19.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'wb' mode *** diff --git a/ext/standard/tests/file/007_variation2.phpt b/ext/standard/tests/file/007_variation2.phpt index 2adb9864f1..87ee8a3dd6 100644 --- a/ext/standard/tests/file/007_variation2.phpt +++ b/ext/standard/tests/file/007_variation2.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "r+" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 2, "bytes"); @@ -40,7 +40,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation2.tmp"); +unlink(__DIR__."/007_variation2.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'r+' mode *** diff --git a/ext/standard/tests/file/007_variation20.phpt b/ext/standard/tests/file/007_variation20.phpt index 26c5bb7152..d470063228 100644 --- a/ext/standard/tests/file/007_variation20.phpt +++ b/ext/standard/tests/file/007_variation20.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "w+b" mode checking for the file truncation when trying to open an existing file in "w+b" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 20, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation20.tmp"); +unlink(__DIR__."/007_variation20.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+b' mode *** diff --git a/ext/standard/tests/file/007_variation21.phpt b/ext/standard/tests/file/007_variation21.phpt index 62d7f84568..92d8f1dee7 100644 --- a/ext/standard/tests/file/007_variation21.phpt +++ b/ext/standard/tests/file/007_variation21.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "ab" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 21, "bytes"); @@ -44,7 +44,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation21.tmp"); +unlink(__DIR__."/007_variation21.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'ab' mode *** diff --git a/ext/standard/tests/file/007_variation22.phpt b/ext/standard/tests/file/007_variation22.phpt index 106cd4b6f4..8e14a84b5b 100644 --- a/ext/standard/tests/file/007_variation22.phpt +++ b/ext/standard/tests/file/007_variation22.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a+b" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 22, "bytes"); @@ -43,7 +43,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation22.tmp"); +unlink(__DIR__."/007_variation22.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a+b' mode *** diff --git a/ext/standard/tests/file/007_variation23.phpt b/ext/standard/tests/file/007_variation23.phpt index 3c8bd2ff48..c4b4aa86a5 100644 --- a/ext/standard/tests/file/007_variation23.phpt +++ b/ext/standard/tests/file/007_variation23.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "xb" mode checking for the warning msg when trying to open an existing file in "xb" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation23.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "xb"); //Opening the existing data file in 'xb' mod echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation23.tmp"); +unlink(__DIR__."/007_variation23.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'xb' mode *** diff --git a/ext/standard/tests/file/007_variation24.phpt b/ext/standard/tests/file/007_variation24.phpt index b9c819f0a5..86b7347a1c 100644 --- a/ext/standard/tests/file/007_variation24.phpt +++ b/ext/standard/tests/file/007_variation24.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x+b" mode checking for the warning msg when trying to open an existing file in "x+b" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation24.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x+b"); //Opening the existing data file in "x+b" m echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation24.tmp"); +unlink(__DIR__."/007_variation24.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x+b' mode *** diff --git a/ext/standard/tests/file/007_variation3.phpt b/ext/standard/tests/file/007_variation3.phpt index b2a276cacf..344a774f87 100644 --- a/ext/standard/tests/file/007_variation3.phpt +++ b/ext/standard/tests/file/007_variation3.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "w" mode checking for the file truncation when trying to open an existing file in "w" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 3, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation3.tmp"); +unlink(__DIR__."/007_variation3.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w' mode *** diff --git a/ext/standard/tests/file/007_variation4.phpt b/ext/standard/tests/file/007_variation4.phpt index 4124a143f0..217dbc5ce5 100644 --- a/ext/standard/tests/file/007_variation4.phpt +++ b/ext/standard/tests/file/007_variation4.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "w+" mode checking for the file truncation when trying to open an existing file in "w+" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 4, "bytes"); @@ -52,7 +52,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation4.tmp"); +unlink(__DIR__."/007_variation4.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'w+' mode *** diff --git a/ext/standard/tests/file/007_variation5.phpt b/ext/standard/tests/file/007_variation5.phpt index 4c54f473b2..1c50e96f71 100644 --- a/ext/standard/tests/file/007_variation5.phpt +++ b/ext/standard/tests/file/007_variation5.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 5, "bytes"); @@ -44,7 +44,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation5.tmp"); +unlink(__DIR__."/007_variation5.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a' mode *** diff --git a/ext/standard/tests/file/007_variation6.phpt b/ext/standard/tests/file/007_variation6.phpt index 47bd3628d4..a2ac5d8050 100644 --- a/ext/standard/tests/file/007_variation6.phpt +++ b/ext/standard/tests/file/007_variation6.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "a+" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 6, "bytes"); @@ -43,7 +43,7 @@ var_dump( file_exists($file) ); //Check for the existence of file echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation6.tmp"); +unlink(__DIR__."/007_variation6.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'a+' mode *** diff --git a/ext/standard/tests/file/007_variation7.phpt b/ext/standard/tests/file/007_variation7.phpt index 9474041581..974bfe0c8c 100644 --- a/ext/standard/tests/file/007_variation7.phpt +++ b/ext/standard/tests/file/007_variation7.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x" mode checking for the warning msg when trying to open an existing file in "x" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation7.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x"); //Opening the existing data file in 'x' mode echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation7.tmp"); +unlink(__DIR__."/007_variation7.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x' mode *** diff --git a/ext/standard/tests/file/007_variation8.phpt b/ext/standard/tests/file/007_variation8.phpt index a57c76bd67..b19fbaf9ec 100644 --- a/ext/standard/tests/file/007_variation8.phpt +++ b/ext/standard/tests/file/007_variation8.phpt @@ -20,7 +20,7 @@ Test fopen and fclose() functions - usage variations - "x+" mode checking for the warning msg when trying to open an existing file in "x+" mode, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "abcdefghij\nmnopqrst\tuvwxyz\n0123456789"; $file = $file_path."/007_variation8.tmp"; @@ -40,7 +40,7 @@ $file_handle = fopen($file, "x+"); //Opening the existing data file in "x+" mod echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation8.tmp"); +unlink(__DIR__."/007_variation8.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'x+' mode *** diff --git a/ext/standard/tests/file/007_variation9.phpt b/ext/standard/tests/file/007_variation9.phpt index 7d8ebbee91..cd0fd63c75 100644 --- a/ext/standard/tests/file/007_variation9.phpt +++ b/ext/standard/tests/file/007_variation9.phpt @@ -19,7 +19,7 @@ Test fopen and fclose() functions - usage variations - "rt" mode checking for the file pointer position, and fclose function */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); create_files($file_path, 1, "text_with_new_line", 0755, 20, "w", "007_variation", 9, "bytes"); @@ -38,7 +38,7 @@ var_dump( get_resource_type($file_handle) ); //Check whether resource is lost a echo "*** Done ***\n"; --CLEAN-- <?php -unlink(dirname(__FILE__)."/007_variation9.tmp"); +unlink(__DIR__."/007_variation9.tmp"); ?> --EXPECTF-- *** Test fopen() & fclose() functions: with 'rt' mode *** diff --git a/ext/standard/tests/file/bug12556.phpt b/ext/standard/tests/file/bug12556.phpt index c8e35cfcad..30299899a1 100644 --- a/ext/standard/tests/file/bug12556.phpt +++ b/ext/standard/tests/file/bug12556.phpt @@ -2,7 +2,7 @@ Bug #12556 (fgetcsv() ignores lengths when quotes not closed) --FILE-- <?php -$fp = fopen(dirname(__FILE__)."/test.csv", "r"); +$fp = fopen(__DIR__."/test.csv", "r"); while($line = fgetcsv($fp, 24)) { $line = str_replace("\x0d\x0a", "\x0a", $line); var_dump($line); diff --git a/ext/standard/tests/file/bug22382.phpt b/ext/standard/tests/file/bug22382.phpt index 2ba36ee1de..7768a13b3e 100644 --- a/ext/standard/tests/file/bug22382.phpt +++ b/ext/standard/tests/file/bug22382.phpt @@ -2,7 +2,7 @@ Bug #22382 (fgetcsv() does not handle escaped quotes correctly) --FILE-- <?php -$fp = fopen(dirname(__FILE__)."/test2.csv", "r"); +$fp = fopen(__DIR__."/test2.csv", "r"); while(($line = fgetcsv($fp, 1024))) { var_dump($line); } diff --git a/ext/standard/tests/file/bug26003.phpt b/ext/standard/tests/file/bug26003.phpt Binary files differindex 7d08374693..aaf3b34135 100644 --- a/ext/standard/tests/file/bug26003.phpt +++ b/ext/standard/tests/file/bug26003.phpt diff --git a/ext/standard/tests/file/bug30362.phpt b/ext/standard/tests/file/bug30362.phpt index 59fe02ad06..07117c5210 100644 --- a/ext/standard/tests/file/bug30362.phpt +++ b/ext/standard/tests/file/bug30362.phpt @@ -3,7 +3,7 @@ Bug #30362 (stream_get_line() not working as documented) --FILE-- <?php -$resource = fopen(dirname(__FILE__).'/bug30362.txt', 'rb'); +$resource = fopen(__DIR__.'/bug30362.txt', 'rb'); for ($i = 0; ($i < 10) && !feof($resource); ++$i ) { $a = "Y"; diff --git a/ext/standard/tests/file/bug32160.phpt b/ext/standard/tests/file/bug32160.phpt index e4968034ad..10b09daec2 100644 --- a/ext/standard/tests/file/bug32160.phpt +++ b/ext/standard/tests/file/bug32160.phpt @@ -2,9 +2,9 @@ Bug #32160 (copying a file into itself leads to data loss) --FILE-- <?php -$path = dirname(__FILE__) . "/bug32160.txt"; +$path = __DIR__ . "/bug32160.txt"; var_dump(copy($path, $path)); -chdir(dirname(__FILE__)); +chdir(__DIR__); var_dump(copy($path, "bug32160.txt")); var_dump(copy("bug32160.txt", "bug32160.txt")); ?> diff --git a/ext/standard/tests/file/bug35740.phpt b/ext/standard/tests/file/bug35740.phpt index 184dff264f..29e8d8ebf8 100644 --- a/ext/standard/tests/file/bug35740.phpt +++ b/ext/standard/tests/file/bug35740.phpt @@ -3,7 +3,7 @@ Bug #35740 (memory leak when including a directory) --FILE-- <?php -include (dirname(__FILE__)); +include (__DIR__); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/bug35781.phpt b/ext/standard/tests/file/bug35781.phpt index 226277b20f..b7ffa98760 100644 --- a/ext/standard/tests/file/bug35781.phpt +++ b/ext/standard/tests/file/bug35781.phpt @@ -3,7 +3,7 @@ Bug #35781 (stream_filter_append() causes segfault) --FILE-- <?php -$filename = dirname(__FILE__)."/bug35781.txt"; +$filename = __DIR__."/bug35781.txt"; $fp = fopen($filename, "w"); stream_filter_append($fp, "string.rot13", -49); diff --git a/ext/standard/tests/file/bug37158.phpt b/ext/standard/tests/file/bug37158.phpt index 673b4c6f3c..3200a62cf9 100644 --- a/ext/standard/tests/file/bug37158.phpt +++ b/ext/standard/tests/file/bug37158.phpt @@ -13,7 +13,7 @@ class VariableStream { stream_wrapper_register("var", "VariableStream"); -$file = dirname(__FILE__) . '/footest.txt'; +$file = __DIR__ . '/footest.txt'; $x = str_repeat(1, 8192); $fp = fopen($file, 'w'); for ($i = 0; $i < 5; $i++) { diff --git a/ext/standard/tests/file/bug38086.phpt b/ext/standard/tests/file/bug38086.phpt index 0544e06692..ed9b7cc114 100644 --- a/ext/standard/tests/file/bug38086.phpt +++ b/ext/standard/tests/file/bug38086.phpt @@ -4,8 +4,8 @@ Bug #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger than the act <?php define('WIN', substr(PHP_OS, 0, 3) == 'WIN'); -$initial_file = dirname(__FILE__).'/bug38086.txt'; -$new_file = dirname(__FILE__).'/bug38086_1.txt'; +$initial_file = __DIR__.'/bug38086.txt'; +$new_file = __DIR__.'/bug38086_1.txt'; $src = fopen($initial_file, 'r'); stream_filter_append($src, "string.rot13", STREAM_FILTER_READ); diff --git a/ext/standard/tests/file/bug39538.phpt b/ext/standard/tests/file/bug39538.phpt index 71b5dea616..cdff507b48 100644 --- a/ext/standard/tests/file/bug39538.phpt +++ b/ext/standard/tests/file/bug39538.phpt @@ -4,7 +4,7 @@ Bug #39538 (fgetcsv can't handle starting newlines and trailing odd number of ba <?php $content = array("\"\nthis is an test\", \"next data\", \"p\narsed\"","\"\r\nthis is an test\", \"next data\", \"p\r\narsed\"","\"\n\rthis is an test\", \"next data\", \"p\n\rarsed\""); -$file = dirname(__FILE__) . "/bug39538.csv"; +$file = __DIR__ . "/bug39538.csv"; @unlink($file); foreach ($content as $v) { file_put_contents($file, $v); diff --git a/ext/standard/tests/file/bug39673.phpt b/ext/standard/tests/file/bug39673.phpt index 71484578d0..70a47e3fc1 100644 --- a/ext/standard/tests/file/bug39673.phpt +++ b/ext/standard/tests/file/bug39673.phpt @@ -5,7 +5,7 @@ Bug #39673 (file_get_contents causes bus error on certain offsets) $str = str_repeat("test", 3456); -$filename = dirname(__FILE__).'/bug39673.txt'; +$filename = __DIR__.'/bug39673.txt'; file_put_contents($filename, $str); $offsets = array( diff --git a/ext/standard/tests/file/bug40501.phpt b/ext/standard/tests/file/bug40501.phpt index 806aba637c..42fcd296cf 100644 --- a/ext/standard/tests/file/bug40501.phpt +++ b/ext/standard/tests/file/bug40501.phpt @@ -2,7 +2,7 @@ Bug #40501 (fgetcsv() can't handle trailing odd number of backslashes) --FILE-- <?php -$file = dirname(__FILE__).'/bug40501.csv'; +$file = __DIR__.'/bug40501.csv'; $h = fopen($file, 'r'); $data = fgetcsv($h, NULL, ',', '"', '"'); diff --git a/ext/standard/tests/file/bug41655_2.phpt b/ext/standard/tests/file/bug41655_2.phpt index 96f5cc86f0..20c29844c1 100644 --- a/ext/standard/tests/file/bug41655_2.phpt +++ b/ext/standard/tests/file/bug41655_2.phpt @@ -4,7 +4,7 @@ Bug #41655 (open_basedir bypass via glob()) 2/2 open_basedir=/ --FILE-- <?php - $dir = dirname(__FILE__); + $dir = __DIR__; $a=glob($dir . "/test*csv"); print_r($a); ?> diff --git a/ext/standard/tests/file/bug41815.phpt b/ext/standard/tests/file/bug41815.phpt index 040754b131..58f287cedf 100644 --- a/ext/standard/tests/file/bug41815.phpt +++ b/ext/standard/tests/file/bug41815.phpt @@ -3,7 +3,7 @@ Bug #41815 (Concurrent read/write fails when EOF is reached) --FILE-- <?php -$filename = dirname(__FILE__)."/concur_rw.txt"; +$filename = __DIR__."/concur_rw.txt"; @unlink($filename); $writer = fopen($filename, "wt"); diff --git a/ext/standard/tests/file/bug43248.phpt b/ext/standard/tests/file/bug43248.phpt index 1096435832..05a0cbda6b 100644 --- a/ext/standard/tests/file/bug43248.phpt +++ b/ext/standard/tests/file/bug43248.phpt @@ -2,7 +2,7 @@ Bug #43248 (backward compatibility break in realpath()) --FILE-- <?php -echo realpath(dirname(__FILE__) . '/../file/'); +echo realpath(__DIR__ . '/../file/'); ?> --EXPECTF-- %sfile diff --git a/ext/standard/tests/file/bug44805.phpt b/ext/standard/tests/file/bug44805.phpt index c9a2918e9c..ac4e334f53 100644 --- a/ext/standard/tests/file/bug44805.phpt +++ b/ext/standard/tests/file/bug44805.phpt @@ -2,7 +2,7 @@ Bug#44806 (rename() function is not portable to Windows) --FILE-- <?php -$dirname = dirname(__FILE__); +$dirname = __DIR__; $file1 = $dirname . DIRECTORY_SEPARATOR . "file1.txt"; $file2 = $dirname . DIRECTORY_SEPARATOR . "file2.txt"; diff --git a/ext/standard/tests/file/bug53848.phpt b/ext/standard/tests/file/bug53848.phpt index 016d59d0ca..eacf110969 100644 --- a/ext/standard/tests/file/bug53848.phpt +++ b/ext/standard/tests/file/bug53848.phpt @@ -2,7 +2,7 @@ Bug #53848 (fgetcsv removes leading spaces from fields) --FILE-- <?php -$file = dirname(__FILE__) . "/bug39538.csv"; +$file = __DIR__ . "/bug39538.csv"; @unlink($file); file_put_contents($file, "a,b\n c, d"); $fp = fopen($file, "r"); diff --git a/ext/standard/tests/file/bug65272.phpt b/ext/standard/tests/file/bug65272.phpt index 81a1e48979..24e50d15be 100644 --- a/ext/standard/tests/file/bug65272.phpt +++ b/ext/standard/tests/file/bug65272.phpt @@ -3,7 +3,7 @@ Bug #65272: flock() correctly sets wouldblock out param in windows --FILE-- <?php -$file = dirname(__FILE__)."/flock_bug65272.dat"; +$file = __DIR__."/flock_bug65272.dat"; $fp1 = fopen($file, "w"); var_dump(flock($fp1, LOCK_SH)); @@ -16,7 +16,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file = dirname(__FILE__)."/flock_bug65272.dat"; +$file = __DIR__."/flock_bug65272.dat"; unlink($file); ?> --EXPECT-- diff --git a/ext/standard/tests/file/bug65701.phpt b/ext/standard/tests/file/bug65701.phpt index 98c3d3d381..c4a356b41b 100644 --- a/ext/standard/tests/file/bug65701.phpt +++ b/ext/standard/tests/file/bug65701.phpt @@ -4,7 +4,7 @@ Test for bug #65701: copy() doesn't work when destination filename is created by Boro Sitnikovski <buritomath@yahoo.com> --FILE-- <?php -$file_path = dirname(__FILE__) . "/bug65701/"; +$file_path = __DIR__ . "/bug65701/"; if (!is_dir($file_path)) { mkdir($file_path); @@ -20,7 +20,7 @@ var_dump(filesize($dst)); ?> --CLEAN-- <?php -$file_path = dirname(__FILE__) . "/bug65701/"; +$file_path = __DIR__ . "/bug65701/"; foreach (scandir($file_path) as $file) { if (strpos($file, "bug65701") !== false || 'WIN' == substr(PHP_OS, 0, 3)) { unlink($file_path . $file); diff --git a/ext/standard/tests/file/bug68335.phpt b/ext/standard/tests/file/bug68335.phpt index 63eda4d923..b3a8165e5b 100644 --- a/ext/standard/tests/file/bug68335.phpt +++ b/ext/standard/tests/file/bug68335.phpt @@ -2,7 +2,7 @@ Bug #68335: rmdir doesnt work with file:// stream wrapper --FILE-- <?php -$dir = 'file://' . dirname(__FILE__) . '/testDir'; +$dir = 'file://' . __DIR__ . '/testDir'; mkdir($dir); var_dump(is_dir($dir)); rmdir($dir); diff --git a/ext/standard/tests/file/bug69628.phpt b/ext/standard/tests/file/bug69628.phpt index 7e18619a3e..378a8f722e 100644 --- a/ext/standard/tests/file/bug69628.phpt +++ b/ext/standard/tests/file/bug69628.phpt @@ -9,7 +9,7 @@ if (!defined('GLOB_BRACE')) { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dirname used here $dirname = "$file_path/bug69628"; @@ -33,7 +33,7 @@ function sort_var_dump($results) { --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/bug69628/image.jPg"); unlink("$file_path/bug69628/image.gIf"); unlink("$file_path/bug69628/image.png"); diff --git a/ext/standard/tests/file/bug72035.phpt b/ext/standard/tests/file/bug72035.phpt index feb4eb9acd..704d746efc 100644 --- a/ext/standard/tests/file/bug72035.phpt +++ b/ext/standard/tests/file/bug72035.phpt @@ -11,7 +11,7 @@ if (!file_exists($cgi)) die('skip CGI binary not found'); --FILE-- <?php -$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()) . ".php"; +$fl = __DIR__ . DIRECTORY_SEPARATOR . md5(uniqid()) . ".php"; $fl = substr($fl, 2); $cgi = realpath(dirname(PHP_BINARY) . DIRECTORY_SEPARATOR . "php-cgi.exe"); diff --git a/ext/standard/tests/file/bug75679.phpt b/ext/standard/tests/file/bug75679.phpt index af44565c45..1441447853 100644 --- a/ext/standard/tests/file/bug75679.phpt +++ b/ext/standard/tests/file/bug75679.phpt @@ -2,7 +2,7 @@ Bug #75679 Path 260 character problem --FILE-- <?php -$d = dirname(__FILE__); +$d = __DIR__; $Files2Report = [ str_pad ($d . '/' . str_repeat (str_pad ('bug75679_path_259_characters_long_', 100, '_') . '/', 1), 259, '_') => [], @@ -27,7 +27,7 @@ foreach ($Files2Report as $file => &$Report) ==DONE== --CLEAN-- <?php -$d = dirname(__FILE__); +$d = __DIR__; $Files2Report = [ str_pad ($d . '/' . str_repeat (str_pad ('bug75679_path_259_characters_long_', 100, '_') . '/', 1), 259, '_') => [], diff --git a/ext/standard/tests/file/chmod_variation1.phpt b/ext/standard/tests/file/chmod_variation1.phpt index f35e54efb6..935d30ce55 100644 --- a/ext/standard/tests/file/chmod_variation1.phpt +++ b/ext/standard/tests/file/chmod_variation1.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { define("PERMISSIONS_MASK", 0777); -$dirname = dirname(__FILE__) . "/" . basename(__FILE__, ".php") . "testdir"; +$dirname = __DIR__ . "/" . basename(__FILE__, ".php") . "testdir"; mkdir($dirname); for ($perms_to_set = 0777; $perms_to_set >= 0; $perms_to_set--) { diff --git a/ext/standard/tests/file/chmod_variation2-win32-mb.phpt b/ext/standard/tests/file/chmod_variation2-win32-mb.phpt index 525052b9d9..2766e224aa 100644 --- a/ext/standard/tests/file/chmod_variation2-win32-mb.phpt +++ b/ext/standard/tests/file/chmod_variation2-win32-mb.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { define("PERMISSIONS_MASK", 0777); -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir私はガラスを食べられます"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/chmod_variation2-win32.phpt b/ext/standard/tests/file/chmod_variation2-win32.phpt index 1e6f3286f9..9cab065024 100644 --- a/ext/standard/tests/file/chmod_variation2-win32.phpt +++ b/ext/standard/tests/file/chmod_variation2-win32.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { define("PERMISSIONS_MASK", 0777); -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/chmod_variation2.phpt b/ext/standard/tests/file/chmod_variation2.phpt index c7a3db0fe7..e96af25ec4 100644 --- a/ext/standard/tests/file/chmod_variation2.phpt +++ b/ext/standard/tests/file/chmod_variation2.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { define("PERMISSIONS_MASK", 0777); -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/copy_basic.phpt b/ext/standard/tests/file/copy_basic.phpt index b23a262649..2bd3fc5176 100644 --- a/ext/standard/tests/file/copy_basic.phpt +++ b/ext/standard/tests/file/copy_basic.phpt @@ -12,7 +12,7 @@ echo "*** Testing copy() function: to copy file from source to destination --\n" var_dump( file_exists(__FILE__) ); /* copying the file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name1 = $file_path."/copy_basic1.tmp"; $file_name2 = $file_path."/copy_basic2.tmp"; var_dump( copy(__FILE__, $file_name1) ); @@ -34,7 +34,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name1 = $file_path."/copy_basic1.tmp"; $file_name2 = $file_path."/copy_basic2.tmp"; unlink($file_name1); diff --git a/ext/standard/tests/file/copy_variation1.phpt b/ext/standard/tests/file/copy_variation1.phpt index bb7ae44fe1..018ff47048 100644 --- a/ext/standard/tests/file/copy_variation1.phpt +++ b/ext/standard/tests/file/copy_variation1.phpt @@ -12,7 +12,7 @@ Test copy() function: usage variations - destination file names(numerics/strings */ echo "*** Test copy() function: destination file names containing numerics/strings ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation1.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -71,7 +71,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation1.tmp"); +unlink(__DIR__."/copy_variation1.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing numerics/strings *** diff --git a/ext/standard/tests/file/copy_variation10.phpt b/ext/standard/tests/file/copy_variation10.phpt index a0daa2a574..78c3426adc 100644 --- a/ext/standard/tests/file/copy_variation10.phpt +++ b/ext/standard/tests/file/copy_variation10.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - identical names /* Test copy(): Try copying source file to desntination file, where destination file name is identical to source name */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n"; $file = $file_path."/copy_variation10.tmp"; @@ -25,7 +25,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation10.tmp"); +unlink(__DIR__."/copy_variation10.tmp"); ?> --EXPECT-- *** Test copy(): Trying to create a copy of file with the same source name *** diff --git a/ext/standard/tests/file/copy_variation11.phpt b/ext/standard/tests/file/copy_variation11.phpt index 225351c619..312802f181 100644 --- a/ext/standard/tests/file/copy_variation11.phpt +++ b/ext/standard/tests/file/copy_variation11.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - existing dir as destination /* Test copy(): Trying to copy the file to a destination, where destination is an existing dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n"; $file = $file_path."/copy_variation11.tmp"; @@ -46,8 +46,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation11.tmp"); -rmdir(dirname(__FILE__)."/copy_variation11"); +unlink(__DIR__."/copy_variation11.tmp"); +rmdir(__DIR__."/copy_variation11"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of source file as a dir *** diff --git a/ext/standard/tests/file/copy_variation12-win32.phpt b/ext/standard/tests/file/copy_variation12-win32.phpt index ff74c5e42c..01bf14cc54 100644 --- a/ext/standard/tests/file/copy_variation12-win32.phpt +++ b/ext/standard/tests/file/copy_variation12-win32.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Test copy(): Trying to create a copy of an existing dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of an existing dir ***\n"; $src_dir = $file_path."/copy_variation12"; @@ -32,8 +32,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_copy_variation12"); -rmdir(dirname(__FILE__)."/copy_variation12"); +unlink(__DIR__."/copy_copy_variation12"); +rmdir(__DIR__."/copy_variation12"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** diff --git a/ext/standard/tests/file/copy_variation12.phpt b/ext/standard/tests/file/copy_variation12.phpt index a5f375b6c9..945ec07083 100644 --- a/ext/standard/tests/file/copy_variation12.phpt +++ b/ext/standard/tests/file/copy_variation12.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Test copy(): Trying to create a copy of an existing dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of an existing dir ***\n"; $src_dir = $file_path."/copy_variation12"; @@ -33,7 +33,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/copy_variation12"); +rmdir(__DIR__."/copy_variation12"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of an existing dir *** diff --git a/ext/standard/tests/file/copy_variation13.phpt b/ext/standard/tests/file/copy_variation13.phpt index a831d845c7..fcd3d6a2a6 100644 --- a/ext/standard/tests/file/copy_variation13.phpt +++ b/ext/standard/tests/file/copy_variation13.phpt @@ -10,7 +10,7 @@ Test copy() function: usage variations - src as dir and dest as an existing file /* Test copy(): Trying to copy dir to an existing file */ echo "*** Test copy() function: Trying to copy dir to file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file = $file_path."/copy_variation13_dir.tmp"; fclose(fopen($file, "w")); $dir = $file_path."/copy_variation13"; @@ -35,8 +35,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation13_dir.tmp"); -rmdir(dirname(__FILE__)."/copy_variation13"); +unlink(__DIR__."/copy_variation13_dir.tmp"); +rmdir(__DIR__."/copy_variation13"); ?> --EXPECTF-- *** Test copy() function: Trying to copy dir to file *** diff --git a/ext/standard/tests/file/copy_variation14.phpt b/ext/standard/tests/file/copy_variation14.phpt index 49251bb495..45289af90a 100644 --- a/ext/standard/tests/file/copy_variation14.phpt +++ b/ext/standard/tests/file/copy_variation14.phpt @@ -10,7 +10,7 @@ Test copy() function: usage variations - non existing src/dest /* Test copy(): Trying to create a copy of non-existing source in an existing destination and an existing source in non-existing destiantion */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of non-existing source in existing destination ***"; $file = $file_path."/copy_variation14.tmp"; @@ -30,7 +30,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation14.tmp"); +unlink(__DIR__."/copy_variation14.tmp"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of non-existing source in existing destination *** diff --git a/ext/standard/tests/file/copy_variation15.phpt b/ext/standard/tests/file/copy_variation15.phpt index 8f85f923d5..a641a8675a 100644 --- a/ext/standard/tests/file/copy_variation15.phpt +++ b/ext/standard/tests/file/copy_variation15.phpt @@ -5,7 +5,7 @@ Test copy() function: usage variations - destination dir access perms if(substr(PHP_OS, 0, 3) == 'WIN') die("skip do not run on Windows"); // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/copy_variation15_root_check.tmp"; +$filename = __DIR__."/copy_variation15_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,7 +23,7 @@ unlink($filename); /* Test copy(): Trying to create a copy of file in a dir which doesn't have write permissions */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: Trying to create a copy of file in a dir which doesn't have write permissions ***"; $file = $file_path."/copy_variation15.tmp"; @@ -50,8 +50,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation15.tmp"); -rmdir(dirname(__FILE__)."/copy_variation15"); +unlink(__DIR__."/copy_variation15.tmp"); +rmdir(__DIR__."/copy_variation15"); ?> --EXPECTF-- *** Test copy() function: Trying to create a copy of file in a dir which doesn't have write permissions *** diff --git a/ext/standard/tests/file/copy_variation16-win32.phpt b/ext/standard/tests/file/copy_variation16-win32.phpt index 7872a2138e..9321c1d9a9 100644 --- a/ext/standard/tests/file/copy_variation16-win32.phpt +++ b/ext/standard/tests/file/copy_variation16-win32.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") into different destination dir paths given in various notations */ echo "*** Testing copy() function: copying data file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation16"; +$base_dir = __DIR__."/copy_variation16"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation16_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation16"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation16.tmp"; +$src_file_name = __DIR__."/copy_variation16.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite($file_handle, str_repeat("Hello world, this is 2007 year ...\n", 100)); fclose($file_handle); diff --git a/ext/standard/tests/file/copy_variation16.phpt b/ext/standard/tests/file/copy_variation16.phpt index e231715b0b..e594aa244b 100644 --- a/ext/standard/tests/file/copy_variation16.phpt +++ b/ext/standard/tests/file/copy_variation16.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") into different destination dir paths given in various notations */ echo "*** Testing copy() function: copying data file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation16"; +$base_dir = __DIR__."/copy_variation16"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation16_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation16"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation16.tmp"; +$src_file_name = __DIR__."/copy_variation16.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite($file_handle, str_repeat("Hello world, this is 2007 year ...\n", 100)); fclose($file_handle); diff --git a/ext/standard/tests/file/copy_variation17.phpt b/ext/standard/tests/file/copy_variation17.phpt index 970e3155c3..337e7ec46e 100644 --- a/ext/standard/tests/file/copy_variation17.phpt +++ b/ext/standard/tests/file/copy_variation17.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - wildcard chars in source /* Test copy(): Trying to copy the source file which is given with the combination of wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: With source file names containing wild-card chars ***\n"; $src_file = $file_path."/copy_variation17.tmp"; @@ -47,8 +47,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation17.tmp"); -rmdir(dirname(__FILE__)."/copy_variation17"); +unlink(__DIR__."/copy_variation17.tmp"); +rmdir(__DIR__."/copy_variation17"); ?> --EXPECTF-- *** Test copy() function: With source file names containing wild-card chars *** diff --git a/ext/standard/tests/file/copy_variation18.phpt b/ext/standard/tests/file/copy_variation18.phpt index 0e39ca6c67..81d5e3dab9 100644 --- a/ext/standard/tests/file/copy_variation18.phpt +++ b/ext/standard/tests/file/copy_variation18.phpt @@ -9,7 +9,7 @@ Test copy() function: usage variations - stat after copy /* Test copy(): checking stat of file before and after after copy operation */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); @@ -44,8 +44,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_copy_variation18.tmp"); -unlink(dirname(__FILE__)."/copy_variation18.tmp"); +unlink(__DIR__."/copy_copy_variation18.tmp"); +unlink(__DIR__."/copy_variation18.tmp"); ?> --EXPECT-- *** Test copy() function: stat of file before and after copy *** diff --git a/ext/standard/tests/file/copy_variation2-win32-mb.phpt b/ext/standard/tests/file/copy_variation2-win32-mb.phpt index 50c91b1936..530fb6089c 100644 --- a/ext/standard/tests/file/copy_variation2-win32-mb.phpt +++ b/ext/standard/tests/file/copy_variation2-win32-mb.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: destination file names containing special characters ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation2私はガラスを食べられます.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -85,7 +85,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation2私はガラスを食べられます.tmp"); +unlink(__DIR__."/copy_variation2私はガラスを食べられます.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing special characters *** diff --git a/ext/standard/tests/file/copy_variation2-win32.phpt b/ext/standard/tests/file/copy_variation2-win32.phpt index 3bde2e37de..563475a3bb 100644 --- a/ext/standard/tests/file/copy_variation2-win32.phpt +++ b/ext/standard/tests/file/copy_variation2-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: destination file names containing special characters ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -85,7 +85,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation2.tmp"); +unlink(__DIR__."/copy_variation2.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing special characters *** diff --git a/ext/standard/tests/file/copy_variation2.phpt b/ext/standard/tests/file/copy_variation2.phpt index b3bd5e6a8a..2106cd5ed7 100644 --- a/ext/standard/tests/file/copy_variation2.phpt +++ b/ext/standard/tests/file/copy_variation2.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Test copy() function: destination file names containing special characters ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation2.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -86,7 +86,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation2.tmp"); +unlink(__DIR__."/copy_variation2.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing special characters *** diff --git a/ext/standard/tests/file/copy_variation3-win32.phpt b/ext/standard/tests/file/copy_variation3-win32.phpt index 28cbd7b120..011e342be4 100644 --- a/ext/standard/tests/file/copy_variation3-win32.phpt +++ b/ext/standard/tests/file/copy_variation3-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: destination file names containing whitespaces ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -72,7 +72,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation3.tmp"); +unlink(__DIR__."/copy_variation3.tmp"); ?> --EXPECTF-- *** Test copy() function: destination file names containing whitespaces *** diff --git a/ext/standard/tests/file/copy_variation3.phpt b/ext/standard/tests/file/copy_variation3.phpt index cbbfd51ebc..af2b47749d 100644 --- a/ext/standard/tests/file/copy_variation3.phpt +++ b/ext/standard/tests/file/copy_variation3.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Test copy() function: destination file names containing whitespaces ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation3.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -71,7 +71,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation3.tmp"); +unlink(__DIR__."/copy_variation3.tmp"); ?> --EXPECT-- *** Test copy() function: destination file names containing whitespaces *** diff --git a/ext/standard/tests/file/copy_variation4.phpt b/ext/standard/tests/file/copy_variation4.phpt Binary files differindex 3c3abea05a..b082c082b5 100644 --- a/ext/standard/tests/file/copy_variation4.phpt +++ b/ext/standard/tests/file/copy_variation4.phpt diff --git a/ext/standard/tests/file/copy_variation5-win32.phpt b/ext/standard/tests/file/copy_variation5-win32.phpt index d26161a226..8ef72ef8ce 100644 --- a/ext/standard/tests/file/copy_variation5-win32.phpt +++ b/ext/standard/tests/file/copy_variation5-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") */ echo "*** Test copy() function: checking case sensitivity in creation of destination file names ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -75,7 +75,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation5.tmp"); +unlink(__DIR__."/copy_variation5.tmp"); ?> --EXPECTF-- *** Test copy() function: checking case sensitivity in creation of destination file names *** diff --git a/ext/standard/tests/file/copy_variation5.phpt b/ext/standard/tests/file/copy_variation5.phpt index 5a577508e7..404ff843fb 100644 --- a/ext/standard/tests/file/copy_variation5.phpt +++ b/ext/standard/tests/file/copy_variation5.phpt @@ -17,7 +17,7 @@ if( (stristr(PHP_OS, "Darwin")) || (stristr(PHP_OS, "Win")) ) */ echo "*** Test copy() function: checking case sensitivity in creation of destination file names ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $src_file_name = $file_path."/copy_variation5.tmp"; $file_handle = fopen($src_file_name, "w"); fwrite( $file_handle, str_repeat("Hello2World...\n", 100) ); @@ -74,7 +74,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_variation5.tmp"); +unlink(__DIR__."/copy_variation5.tmp"); ?> --EXPECTF-- *** Test copy() function: checking case sensitivity in creation of destination file names *** diff --git a/ext/standard/tests/file/copy_variation6-win32.phpt b/ext/standard/tests/file/copy_variation6-win32.phpt index a65b63f3b0..ce2dc89f99 100644 --- a/ext/standard/tests/file/copy_variation6-win32.phpt +++ b/ext/standard/tests/file/copy_variation6-win32.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") into different destination dir paths given in various notations */ echo "*** Test copy() function: copying file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation6"; +$base_dir = __DIR__."/copy_variation6"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation6_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation6"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation6.tmp"; +$src_file_name = __DIR__."/copy_variation6.tmp"; fclose( fopen($src_file_name, "w") ); echo "Size of source file => "; diff --git a/ext/standard/tests/file/copy_variation6.phpt b/ext/standard/tests/file/copy_variation6.phpt index 15de119035..2e7ffd64d4 100644 --- a/ext/standard/tests/file/copy_variation6.phpt +++ b/ext/standard/tests/file/copy_variation6.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") into different destination dir paths given in various notations */ echo "*** Test copy() function: copying file across directories ***\n"; -$base_dir = dirname(__FILE__)."/copy_variation6"; +$base_dir = __DIR__."/copy_variation6"; mkdir($base_dir); $sub_dir = $base_dir."/copy_variation6_sub"; @@ -25,7 +25,7 @@ mkdir($sub_dir); $dirname_with_blank = $sub_dir."/copy variation6"; mkdir($dirname_with_blank); -$src_file_name = dirname(__FILE__)."/copy_variation6.tmp"; +$src_file_name = __DIR__."/copy_variation6.tmp"; fclose( fopen($src_file_name, "w") ); echo "Size of source file => "; diff --git a/ext/standard/tests/file/copy_variation7.phpt b/ext/standard/tests/file/copy_variation7.phpt index 8a0fae01e3..0ab30cdb7b 100644 --- a/ext/standard/tests/file/copy_variation7.phpt +++ b/ext/standard/tests/file/copy_variation7.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Test copy() function: Trying to create copy of links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing copy() with symlink and hardlink ***\n"; $file = $file_path."/copy_variation7.tmp"; @@ -55,7 +55,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/copy_copy_variation7_symlink.tmp"); unlink($file_path."/copy_copy_variation7_hardlink.tmp"); unlink($file_path."/copy_variation7_symlink.tmp"); diff --git a/ext/standard/tests/file/copy_variation8.phpt b/ext/standard/tests/file/copy_variation8.phpt index e67375dfb5..ebad6e2c4e 100644 --- a/ext/standard/tests/file/copy_variation8.phpt +++ b/ext/standard/tests/file/copy_variation8.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") echo "*** Testing copy() function: copying links across different directories ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $base_dir = $file_path."/copy_variation8"; mkdir($base_dir); diff --git a/ext/standard/tests/file/copy_variation9.phpt b/ext/standard/tests/file/copy_variation9.phpt index c6cb309433..c0651a7375 100644 --- a/ext/standard/tests/file/copy_variation9.phpt +++ b/ext/standard/tests/file/copy_variation9.phpt @@ -6,7 +6,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN') die("skip do not run on Windows"); // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/copy_variation9_root_check.tmp"; +$filename = __DIR__."/copy_variation9_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,7 +24,7 @@ unlink($filename); /* Test copy(): Trying to copy source file to destination file with and without write permissions */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test copy() function: destination with/without write permissions ***\n"; $src_file_name = $file_path."/copy_variation9.tmp"; @@ -52,8 +52,8 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/copy_copy_variation9.tmp"); -unlink(dirname(__FILE__)."/copy_variation9.tmp"); +unlink(__DIR__."/copy_copy_variation9.tmp"); +unlink(__DIR__."/copy_variation9.tmp"); ?> --EXPECTF-- *** Test copy() function: destination with/without write permissions *** diff --git a/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt index 2c3aea79cf..9131a4cfcd 100644 --- a/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt +++ b/ext/standard/tests/file/directory_wrapper_fstat_basic.phpt @@ -2,7 +2,7 @@ Test function fstat() on directory wrapper --FILE-- <?php -$d = dirname(__FILE__); +$d = __DIR__; $h = opendir($d); var_dump(fstat($h)); closedir($h); diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt index 4ab48604ad..fcb2a93e41 100644 --- a/ext/standard/tests/file/disk_free_space_basic.phpt +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -15,7 +15,7 @@ memory_limit=32M * filesystem or disk partition */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with existing directory ***\n"; var_dump( disk_free_space($file_path) ); @@ -51,7 +51,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_free_space/disk_free_space.tmp"); rmdir($file_path."/disk_free_space"); ?> diff --git a/ext/standard/tests/file/disk_free_space_error-win32.phpt b/ext/standard/tests/file/disk_free_space_error-win32.phpt index acb0fdd717..43e71719c0 100644 --- a/ext/standard/tests/file/disk_free_space_error-win32.phpt +++ b/ext/standard/tests/file/disk_free_space_error-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_free_space() ); // Zero Arguments var_dump( diskfreespace() ); @@ -36,7 +36,7 @@ echo"\n-- Done --"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_free_space.tmp"); ?> diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt index 6433cde702..aca17b2331 100644 --- a/ext/standard/tests/file/disk_free_space_error.phpt +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN') */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_free_space() ); // Zero Arguments var_dump( diskfreespace() ); @@ -36,7 +36,7 @@ echo"\n-- Done --"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_free_space.tmp"); ?> diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt index 6c6575d896..1008d9ecbb 100644 --- a/ext/standard/tests/file/disk_free_space_variation.phpt +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -9,7 +9,7 @@ Test disk_free_space and its alias diskfreespace() functions : Usage Variations * filesystem or disk partition */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with a directory ***\n"; var_dump( disk_free_space($file_path."/..") ); @@ -57,7 +57,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/disk_free_space"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt index 52c46e7785..f6f041118c 100644 --- a/ext/standard/tests/file/disk_total_space_basic.phpt +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -9,7 +9,7 @@ Test disk_total_space() function : basic functionality * or disk partition. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with normal directory ***\n"; var_dump( disk_total_space($file_path) ); @@ -31,7 +31,7 @@ echo"\n-- Done --"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_total_space/disk_total_space.tmp"); rmdir($file_path."/disk_total_space"); ?> diff --git a/ext/standard/tests/file/disk_total_space_error-win32.phpt b/ext/standard/tests/file/disk_total_space_error-win32.phpt index 0d511b37a7..c3a2854eff 100644 --- a/ext/standard/tests/file/disk_total_space_error-win32.phpt +++ b/ext/standard/tests/file/disk_total_space_error-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_total_space() ); // Zero Arguments var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments @@ -32,7 +32,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_total_space.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt index 2c8a940117..125d093ccd 100644 --- a/ext/standard/tests/file/disk_total_space_error.phpt +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN') */ echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( disk_total_space() ); // Zero Arguments var_dump( disk_total_space( $file_path, "extra argument") ); // More than valid number of arguments @@ -32,7 +32,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/disk_total_space.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt index 071fa60749..3ba3771aac 100644 --- a/ext/standard/tests/file/disk_total_space_variation.phpt +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -9,7 +9,7 @@ Testing disk_total_space() functions : Usage Variations. * filesystem or disk partition. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing with a directory ***\n"; var_dump( disk_total_space($file_path."/..") ); @@ -60,7 +60,7 @@ echo"\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/disk_total_space"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fflush_basic.phpt b/ext/standard/tests/file/fflush_basic.phpt index 22a62ed1b0..2c9314394b 100644 --- a/ext/standard/tests/file/fflush_basic.phpt +++ b/ext/standard/tests/file/fflush_basic.phpt @@ -13,7 +13,7 @@ second line of string third line of string EOD; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fflush_basic.tmp"; // opening a file @@ -38,7 +38,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fflush_basic.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fflush_variation1-win32-mb.phpt b/ext/standard/tests/file/fflush_variation1-win32-mb.phpt index 19349b4442..9c654a8688 100644 --- a/ext/standard/tests/file/fflush_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/fflush_variation1-win32-mb.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) /* test fflush() with handle to the files opened in different modes */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with various types of files ***\n"; diff --git a/ext/standard/tests/file/fflush_variation1-win32.phpt b/ext/standard/tests/file/fflush_variation1-win32.phpt index 3ebde9ef85..fd72d652b4 100644 --- a/ext/standard/tests/file/fflush_variation1-win32.phpt +++ b/ext/standard/tests/file/fflush_variation1-win32.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) /* test fflush() with handle to the files opened in different modes */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with various types of files ***\n"; diff --git a/ext/standard/tests/file/fflush_variation1.phpt b/ext/standard/tests/file/fflush_variation1.phpt index caadbf2de4..8dd2db1d21 100644 --- a/ext/standard/tests/file/fflush_variation1.phpt +++ b/ext/standard/tests/file/fflush_variation1.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) /* test fflush() with handle of files opened in different modes */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with various types of files ***\n"; diff --git a/ext/standard/tests/file/fflush_variation2.phpt b/ext/standard/tests/file/fflush_variation2.phpt index 39d29f699c..7f6b914304 100644 --- a/ext/standard/tests/file/fflush_variation2.phpt +++ b/ext/standard/tests/file/fflush_variation2.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') /* test fflush() with handle to symbollic link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with soft links to files opened in diff modes ***\n"; diff --git a/ext/standard/tests/file/fflush_variation3.phpt b/ext/standard/tests/file/fflush_variation3.phpt index 1f13ee5c31..c74eeb8e25 100644 --- a/ext/standard/tests/file/fflush_variation3.phpt +++ b/ext/standard/tests/file/fflush_variation3.phpt @@ -13,7 +13,7 @@ if( substr(PHP_OS, 0, 3) == 'WIN') /* test fflush() with handle to hard links as resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with hard links to files opened in diff modes ***\n"; diff --git a/ext/standard/tests/file/fflush_variation4.phpt b/ext/standard/tests/file/fflush_variation4.phpt index 823de4c56a..94c0f6a31e 100644 --- a/ext/standard/tests/file/fflush_variation4.phpt +++ b/ext/standard/tests/file/fflush_variation4.phpt @@ -8,7 +8,7 @@ Test fflush() function: usage variations - file opened in read-only mode /* test fflush() with handle to a file opened in read-only mode as resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require $file_path.'/file.inc'; echo "*** Testing fflush(): with file handles of files opened in various read modes ***\n"; diff --git a/ext/standard/tests/file/fgetc_basic.phpt b/ext/standard/tests/file/fgetc_basic.phpt index 6db0d58c91..f5b8ef9055 100644 --- a/ext/standard/tests/file/fgetc_basic.phpt +++ b/ext/standard/tests/file/fgetc_basic.phpt @@ -21,7 +21,7 @@ for($outerloop_counter = 0; $outerloop_counter < count($file_content_types); $ou echo $outerloop_counter + 1; echo " ---\n"; // create file file - create_files(dirname(__FILE__), 1, $file_content_types[$outerloop_counter], 0755, 1, "w", "fgetc_basic", 1); + create_files(__DIR__, 1, $file_content_types[$outerloop_counter], 0755, 1, "w", "fgetc_basic", 1); //open the file in different modes and check the working of fgetc for($innerloop_counter = 0; $innerloop_counter < count($file_modes); $innerloop_counter++) { @@ -32,7 +32,7 @@ for($outerloop_counter = 0; $outerloop_counter < count($file_content_types); $ou echo " --\n"; // open the file using the $file_modes - $filename = dirname(__FILE__)."/fgetc_basic1.tmp"; // file name that is created by create_files + $filename = __DIR__."/fgetc_basic1.tmp"; // file name that is created by create_files echo "-- Testing fgetc() : file opened using $file_modes[$innerloop_counter] mode --\n"; $file_handle = fopen($filename, $file_modes[$innerloop_counter]); if ( !$file_handle ) { @@ -55,7 +55,7 @@ for($outerloop_counter = 0; $outerloop_counter < count($file_content_types); $ou } // end of innerloop for // delete the file - delete_files(dirname(__FILE__), 1, "fgetc_basic", 1, ".tmp"); + delete_files(__DIR__, 1, "fgetc_basic", 1, ".tmp"); } // end of outerloop for diff --git a/ext/standard/tests/file/fgetc_variation1.phpt b/ext/standard/tests/file/fgetc_variation1.phpt index 6635e8d554..7c6a01ded9 100644 --- a/ext/standard/tests/file/fgetc_variation1.phpt +++ b/ext/standard/tests/file/fgetc_variation1.phpt @@ -12,9 +12,9 @@ include ("file.inc"); echo "*** Testing fgetc() : usage variations ***\n"; echo "-- Testing fgetc() with file whose file pointer is pointing to EOF --\n"; // create a file -create_files(dirname(__FILE__), 1, "text_with_new_line", 0755, 1, "w", "fgetc_variation"); +create_files(__DIR__, 1, "text_with_new_line", 0755, 1, "w", "fgetc_variation"); -$filename = dirname(__FILE__)."/fgetc_variation1.tmp"; +$filename = __DIR__."/fgetc_variation1.tmp"; // loop to check the file opened in different read modes $file_modes = array("r", "rb", "rt", "r+", "r+b", "r+t"); @@ -44,7 +44,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink( dirname(__FILE__)."/fgetc_variation1.tmp"); +unlink( __DIR__."/fgetc_variation1.tmp"); ?> --EXPECT-- *** Testing fgetc() : usage variations *** diff --git a/ext/standard/tests/file/fgetc_variation3.phpt b/ext/standard/tests/file/fgetc_variation3.phpt index aab7bbbf8f..8e052907e8 100644 --- a/ext/standard/tests/file/fgetc_variation3.phpt +++ b/ext/standard/tests/file/fgetc_variation3.phpt @@ -18,7 +18,7 @@ include ("file.inc"); echo "*** Testing fgetc() with file opened in write only mode ***\n"; $file_modes = array("w", "wb", "wt", "a", "ab", "at", "x", "xb", "xt"); -$filename = dirname(__FILE__)."/fgetc_variation3.tmp"; +$filename = __DIR__."/fgetc_variation3.tmp"; foreach ($file_modes as $file_mode ) { echo "-- File opened in mode : $file_mode --\n"; diff --git a/ext/standard/tests/file/fgetc_variation4.phpt b/ext/standard/tests/file/fgetc_variation4.phpt index 1a61108f41..99af3c80af 100644 --- a/ext/standard/tests/file/fgetc_variation4.phpt +++ b/ext/standard/tests/file/fgetc_variation4.phpt @@ -17,7 +17,7 @@ $file_modes = array( "a+", "a+b", "a+t", "x+", "x+b", "x+t", "w+", "w+b", "w+t" ); -$filename = dirname(__FILE__)."/fgetc_variation4.tmp"; +$filename = __DIR__."/fgetc_variation4.tmp"; foreach ($file_modes as $file_mode ) { echo "-- File opened in mode : $file_mode --\n"; diff --git a/ext/standard/tests/file/fgetcsv.phpt b/ext/standard/tests/file/fgetcsv.phpt index 868212c033..45be06ba0b 100644 --- a/ext/standard/tests/file/fgetcsv.phpt +++ b/ext/standard/tests/file/fgetcsv.phpt @@ -25,7 +25,7 @@ various fgetcsv() functionality tests 'aaa"\\"a","bbb"' ); - $file = dirname(__FILE__) . 'fgetcsv.csv'; + $file = __DIR__ . 'fgetcsv.csv'; @unlink($file); foreach ($list as $v) { $fp = fopen($file, "w"); diff --git a/ext/standard/tests/file/fgetcsv_variation1.phpt b/ext/standard/tests/file/fgetcsv_variation1.phpt index 5fc8108a62..e0569288fc 100644 --- a/ext/standard/tests/file/fgetcsv_variation1.phpt +++ b/ext/standard/tests/file/fgetcsv_variation1.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation1.tmp'; +$filename = __DIR__ . '/fgetcsv_variation1.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation10.phpt b/ext/standard/tests/file/fgetcsv_variation10.phpt index 41388fb00c..ee173b8cd6 100644 --- a/ext/standard/tests/file/fgetcsv_variation10.phpt +++ b/ext/standard/tests/file/fgetcsv_variation10.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation10.tmp'; +$filename = __DIR__ . '/fgetcsv_variation10.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation11.phpt b/ext/standard/tests/file/fgetcsv_variation11.phpt index ed15ae3e83..25815a0174 100644 --- a/ext/standard/tests/file/fgetcsv_variation11.phpt +++ b/ext/standard/tests/file/fgetcsv_variation11.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation11.tmp'; +$filename = __DIR__ . '/fgetcsv_variation11.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation12.phpt b/ext/standard/tests/file/fgetcsv_variation12.phpt index 6ae6ae61b1..4989f5f8e7 100644 --- a/ext/standard/tests/file/fgetcsv_variation12.phpt +++ b/ext/standard/tests/file/fgetcsv_variation12.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation12.tmp'; +$filename = __DIR__ . '/fgetcsv_variation12.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation13.phpt b/ext/standard/tests/file/fgetcsv_variation13.phpt index 97edcab1c8..f1ca0a6ab0 100644 --- a/ext/standard/tests/file/fgetcsv_variation13.phpt +++ b/ext/standard/tests/file/fgetcsv_variation13.phpt @@ -12,7 +12,7 @@ Test fgetcsv() : usage variations - with line without any csv fields echo "*** Testing fgetcsv() : reading the line which is without csv fields ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation13.tmp'; +$filename = __DIR__ . '/fgetcsv_variation13.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation14.phpt b/ext/standard/tests/file/fgetcsv_variation14.phpt index 44eb066e9c..a8486e56a8 100644 --- a/ext/standard/tests/file/fgetcsv_variation14.phpt +++ b/ext/standard/tests/file/fgetcsv_variation14.phpt @@ -12,7 +12,7 @@ Test fgetcsv() : usage variations - reading the blank line echo "*** Testing fgetcsv() : reading the blank line ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation14.tmp'; +$filename = __DIR__ . '/fgetcsv_variation14.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation15.phpt b/ext/standard/tests/file/fgetcsv_variation15.phpt index 212f197745..6e1c71438b 100644 --- a/ext/standard/tests/file/fgetcsv_variation15.phpt +++ b/ext/standard/tests/file/fgetcsv_variation15.phpt @@ -22,7 +22,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation15.tmp'; +$filename = __DIR__ . '/fgetcsv_variation15.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation16.phpt b/ext/standard/tests/file/fgetcsv_variation16.phpt index 4768cf2770..3e83ca46bb 100644 --- a/ext/standard/tests/file/fgetcsv_variation16.phpt +++ b/ext/standard/tests/file/fgetcsv_variation16.phpt @@ -24,7 +24,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation16.tmp'; +$filename = __DIR__ . '/fgetcsv_variation16.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation17.phpt b/ext/standard/tests/file/fgetcsv_variation17.phpt index 75cb1c5ced..1dffb6c2be 100644 --- a/ext/standard/tests/file/fgetcsv_variation17.phpt +++ b/ext/standard/tests/file/fgetcsv_variation17.phpt @@ -24,7 +24,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation17.tmp'; +$filename = __DIR__ . '/fgetcsv_variation17.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation18.phpt b/ext/standard/tests/file/fgetcsv_variation18.phpt index a5889ee77d..022a46075d 100644 --- a/ext/standard/tests/file/fgetcsv_variation18.phpt +++ b/ext/standard/tests/file/fgetcsv_variation18.phpt @@ -24,7 +24,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation18.tmp'; +$filename = __DIR__ . '/fgetcsv_variation18.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation19.phpt b/ext/standard/tests/file/fgetcsv_variation19.phpt index 5200b5e8e1..0f40f25266 100644 --- a/ext/standard/tests/file/fgetcsv_variation19.phpt +++ b/ext/standard/tests/file/fgetcsv_variation19.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation19.tmp'; +$filename = __DIR__ . '/fgetcsv_variation19.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation2.phpt b/ext/standard/tests/file/fgetcsv_variation2.phpt index 40fb910cf9..f235186d3a 100644 --- a/ext/standard/tests/file/fgetcsv_variation2.phpt +++ b/ext/standard/tests/file/fgetcsv_variation2.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation2.tmp'; +$filename = __DIR__ . '/fgetcsv_variation2.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation20.phpt b/ext/standard/tests/file/fgetcsv_variation20.phpt index 529fc89957..dce4c82c59 100644 --- a/ext/standard/tests/file/fgetcsv_variation20.phpt +++ b/ext/standard/tests/file/fgetcsv_variation20.phpt @@ -14,7 +14,7 @@ Test fgetcsv() : usage variations - with default enclosure, line without any csv echo "*** Testing fgetcsv() : with default enclosure, line without any csv fields ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation20.tmp'; +$filename = __DIR__ . '/fgetcsv_variation20.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation21.phpt b/ext/standard/tests/file/fgetcsv_variation21.phpt index 6acbbf4f88..91503ff487 100644 --- a/ext/standard/tests/file/fgetcsv_variation21.phpt +++ b/ext/standard/tests/file/fgetcsv_variation21.phpt @@ -14,7 +14,7 @@ Test fgetcsv() : usage variations - with default enclosure, blank line echo "*** Testing fgetcsv() : with default enclosure, blank line ***\n"; -$filename = dirname(__FILE__) . '/fgetcsv_variation21.tmp'; +$filename = __DIR__ . '/fgetcsv_variation21.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation22.phpt b/ext/standard/tests/file/fgetcsv_variation22.phpt index ed4e129eb5..14d808ab87 100644 --- a/ext/standard/tests/file/fgetcsv_variation22.phpt +++ b/ext/standard/tests/file/fgetcsv_variation22.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation22.tmp'; +$filename = __DIR__ . '/fgetcsv_variation22.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation23.phpt b/ext/standard/tests/file/fgetcsv_variation23.phpt index a9b51f06a5..cb74351fb9 100644 --- a/ext/standard/tests/file/fgetcsv_variation23.phpt +++ b/ext/standard/tests/file/fgetcsv_variation23.phpt @@ -13,7 +13,7 @@ echo "*** Testing fgetcsv() : reading from file which is having zero content *** // try reading from file which is having zero content // create the file and then open in read mode and try reading -$filename = dirname(__FILE__) . '/fgetcsv_variation23.tmp'; +$filename = __DIR__ . '/fgetcsv_variation23.tmp'; $fp = fopen ($filename, "w"); fclose($fp); $fp = fopen ($filename, "r"); diff --git a/ext/standard/tests/file/fgetcsv_variation24.phpt b/ext/standard/tests/file/fgetcsv_variation24.phpt index 154c6f9104..d1e8b7ca80 100644 --- a/ext/standard/tests/file/fgetcsv_variation24.phpt +++ b/ext/standard/tests/file/fgetcsv_variation24.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation24.tmp'; +$filename = __DIR__ . '/fgetcsv_variation24.tmp'; @unlink($filename); $file_modes = array ("w+", "w+b", "w+t", diff --git a/ext/standard/tests/file/fgetcsv_variation25.phpt b/ext/standard/tests/file/fgetcsv_variation25.phpt index 9ba0aa15ed..073248c101 100644 --- a/ext/standard/tests/file/fgetcsv_variation25.phpt +++ b/ext/standard/tests/file/fgetcsv_variation25.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation25.tmp'; +$filename = __DIR__ . '/fgetcsv_variation25.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation26.phpt b/ext/standard/tests/file/fgetcsv_variation26.phpt index 53077f3372..16f080aaf2 100644 --- a/ext/standard/tests/file/fgetcsv_variation26.phpt +++ b/ext/standard/tests/file/fgetcsv_variation26.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation26.tmp'; +$filename = __DIR__ . '/fgetcsv_variation26.tmp'; @unlink($filename); $file_modes = array ("w", "wb", "wt", diff --git a/ext/standard/tests/file/fgetcsv_variation27.phpt b/ext/standard/tests/file/fgetcsv_variation27.phpt index ff10286b4c..484ac89472 100644 --- a/ext/standard/tests/file/fgetcsv_variation27.phpt +++ b/ext/standard/tests/file/fgetcsv_variation27.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation27.tmp'; +$filename = __DIR__ . '/fgetcsv_variation27.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation28.phpt b/ext/standard/tests/file/fgetcsv_variation28.phpt index 4facbcf1ea..95d59dcec4 100644 --- a/ext/standard/tests/file/fgetcsv_variation28.phpt +++ b/ext/standard/tests/file/fgetcsv_variation28.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation28.tmp'; +$filename = __DIR__ . '/fgetcsv_variation28.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation29.phpt b/ext/standard/tests/file/fgetcsv_variation29.phpt index df4ee6c6f5..de9d4b0e5d 100644 --- a/ext/standard/tests/file/fgetcsv_variation29.phpt +++ b/ext/standard/tests/file/fgetcsv_variation29.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation29.tmp'; +$filename = __DIR__ . '/fgetcsv_variation29.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation3.phpt b/ext/standard/tests/file/fgetcsv_variation3.phpt index 20507973db..e94f81d56d 100644 --- a/ext/standard/tests/file/fgetcsv_variation3.phpt +++ b/ext/standard/tests/file/fgetcsv_variation3.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation3.tmp'; +$filename = __DIR__ . '/fgetcsv_variation3.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation30.phpt b/ext/standard/tests/file/fgetcsv_variation30.phpt index 2cb570c8dc..120267849e 100644 --- a/ext/standard/tests/file/fgetcsv_variation30.phpt +++ b/ext/standard/tests/file/fgetcsv_variation30.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation30.tmp'; +$filename = __DIR__ . '/fgetcsv_variation30.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation31.phpt b/ext/standard/tests/file/fgetcsv_variation31.phpt index d4e3d8a43d..c487d2eb28 100644 --- a/ext/standard/tests/file/fgetcsv_variation31.phpt +++ b/ext/standard/tests/file/fgetcsv_variation31.phpt @@ -25,7 +25,7 @@ $csv_lists = array ( array('\\', '"water"\\"fruit"\\"""'), ); -$filename = dirname(__FILE__) . '/fgetcsv_variation31.tmp'; +$filename = __DIR__ . '/fgetcsv_variation31.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation4.phpt b/ext/standard/tests/file/fgetcsv_variation4.phpt index e42163bd98..1f32907b53 100644 --- a/ext/standard/tests/file/fgetcsv_variation4.phpt +++ b/ext/standard/tests/file/fgetcsv_variation4.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation4.tmp'; +$filename = __DIR__ . '/fgetcsv_variation4.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation5.phpt b/ext/standard/tests/file/fgetcsv_variation5.phpt index ff18d6fe13..4c883abf69 100644 --- a/ext/standard/tests/file/fgetcsv_variation5.phpt +++ b/ext/standard/tests/file/fgetcsv_variation5.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation5.tmp'; +$filename = __DIR__ . '/fgetcsv_variation5.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation6.phpt b/ext/standard/tests/file/fgetcsv_variation6.phpt index 95db326598..23bbfffcf8 100644 --- a/ext/standard/tests/file/fgetcsv_variation6.phpt +++ b/ext/standard/tests/file/fgetcsv_variation6.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation6.tmp'; +$filename = __DIR__ . '/fgetcsv_variation6.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation7.phpt b/ext/standard/tests/file/fgetcsv_variation7.phpt index 2854dc766f..b351757c91 100644 --- a/ext/standard/tests/file/fgetcsv_variation7.phpt +++ b/ext/standard/tests/file/fgetcsv_variation7.phpt @@ -26,7 +26,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation7.tmp'; +$filename = __DIR__ . '/fgetcsv_variation7.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation8.phpt b/ext/standard/tests/file/fgetcsv_variation8.phpt index cd518cb144..073a44e4cc 100644 --- a/ext/standard/tests/file/fgetcsv_variation8.phpt +++ b/ext/standard/tests/file/fgetcsv_variation8.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation8.tmp'; +$filename = __DIR__ . '/fgetcsv_variation8.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgetcsv_variation9.phpt b/ext/standard/tests/file/fgetcsv_variation9.phpt index dd0d788f6c..859d0ef002 100644 --- a/ext/standard/tests/file/fgetcsv_variation9.phpt +++ b/ext/standard/tests/file/fgetcsv_variation9.phpt @@ -29,7 +29,7 @@ $csv_lists = array ( array(':', '&', '&""""&:&"&:,:":&,&:,,,,') ); -$filename = dirname(__FILE__) . '/fgetcsv_variation9.tmp'; +$filename = __DIR__ . '/fgetcsv_variation9.tmp'; @unlink($filename); $file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fgets_basic.phpt b/ext/standard/tests/file/fgets_basic.phpt index a8e8249aa8..9b2cd715cc 100644 --- a/ext/standard/tests/file/fgets_basic.phpt +++ b/ext/standard/tests/file/fgets_basic.phpt @@ -20,8 +20,8 @@ foreach($file_modes as $file_mode) { foreach($file_content_types as $file_content_type) { echo "-- File content type : $file_content_type --\n"; /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 50, "w", "fgets_basic", 1, "bytes"); //create a file - $filename = dirname(__FILE__)."/fgets_basic1.tmp"; // this is name of the file created by create_files() + create_files ( __DIR__, 1, $file_content_type, 0755, 50, "w", "fgets_basic", 1, "bytes"); //create a file + $filename = __DIR__."/fgets_basic1.tmp"; // this is name of the file created by create_files() $file_handle = fopen($filename, $file_mode); if ( !$file_handle ) { echo "Error: failed to open file $filename!"; diff --git a/ext/standard/tests/file/fgets_variation1.phpt b/ext/standard/tests/file/fgets_variation1.phpt index 3e7eba9fb1..b4f7ad5a0e 100644 --- a/ext/standard/tests/file/fgets_variation1.phpt +++ b/ext/standard/tests/file/fgets_variation1.phpt @@ -17,7 +17,7 @@ include ("file.inc"); echo "*** Testing fgets() with file opened in write only mode ***\n"; $file_modes = array("w", "wb", "wt", "a", "ab", "at", "x", "xb", "xt"); -$filename = dirname(__FILE__)."/fgets_variation1.tmp"; +$filename = __DIR__."/fgets_variation1.tmp"; foreach ($file_modes as $file_mode ) { echo "-- File opened in mode : $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation3.phpt b/ext/standard/tests/file/fgets_variation3.phpt index d63ab8c268..ee3f8996ab 100644 --- a/ext/standard/tests/file/fgets_variation3.phpt +++ b/ext/standard/tests/file/fgets_variation3.phpt @@ -18,7 +18,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation3.tmp"; +$filename = __DIR__."/fgets_variation3.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation4-win32-mb.phpt b/ext/standard/tests/file/fgets_variation4-win32-mb.phpt index b5c3eaae8f..629af64ad1 100644 --- a/ext/standard/tests/file/fgets_variation4-win32-mb.phpt +++ b/ext/standard/tests/file/fgets_variation4-win32-mb.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4私はガラスを食べられます.tmp"; +$filename = __DIR__."/fgets_variation4私はガラスを食べられます.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation4-win32.phpt b/ext/standard/tests/file/fgets_variation4-win32.phpt index d5b2c5a53d..ed8378d357 100644 --- a/ext/standard/tests/file/fgets_variation4-win32.phpt +++ b/ext/standard/tests/file/fgets_variation4-win32.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation4.phpt b/ext/standard/tests/file/fgets_variation4.phpt index 3a26dca477..cc29e2a620 100644 --- a/ext/standard/tests/file/fgets_variation4.phpt +++ b/ext/standard/tests/file/fgets_variation4.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation5.phpt b/ext/standard/tests/file/fgets_variation5.phpt index f474e45a1d..e0eaa9fe5d 100644 --- a/ext/standard/tests/file/fgets_variation5.phpt +++ b/ext/standard/tests/file/fgets_variation5.phpt @@ -18,7 +18,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation5.tmp"; +$filename = __DIR__."/fgets_variation5.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation6-win32.phpt b/ext/standard/tests/file/fgets_variation6-win32.phpt index a402cb1073..aa69e31ec7 100644 --- a/ext/standard/tests/file/fgets_variation6-win32.phpt +++ b/ext/standard/tests/file/fgets_variation6-win32.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgets_variation6.phpt b/ext/standard/tests/file/fgets_variation6.phpt index 23e447db3b..7e7db3e59a 100644 --- a/ext/standard/tests/file/fgets_variation6.phpt +++ b/ext/standard/tests/file/fgets_variation6.phpt @@ -24,7 +24,7 @@ $file_content_types = array("numeric", "text", "text_with_new_line", "alphanumer echo "*** Testing fgets() : usage variations ***\n"; -$filename = dirname(__FILE__)."/fgets_variation4.tmp"; +$filename = __DIR__."/fgets_variation4.tmp"; foreach($file_modes as $file_mode) { echo "\n-- Testing fgets() with file opened using mode $file_mode --\n"; diff --git a/ext/standard/tests/file/fgetss.phpt b/ext/standard/tests/file/fgetss.phpt index 41ac46dc92..7ca6169762 100644 --- a/ext/standard/tests/file/fgetss.phpt +++ b/ext/standard/tests/file/fgetss.phpt @@ -3,7 +3,7 @@ fgetss() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fgetss.html"; +$filename = __DIR__."/fgetss.html"; $array = array( "askasdfasdf<b>aaaaaa\n</b>dddddd", diff --git a/ext/standard/tests/file/fgetss1.phpt b/ext/standard/tests/file/fgetss1.phpt index 0266371865..55b6adbe6b 100644 --- a/ext/standard/tests/file/fgetss1.phpt +++ b/ext/standard/tests/file/fgetss1.phpt @@ -4,7 +4,7 @@ more fgetss() tests <?php error_reporting(E_ALL & ~E_DEPRECATED); -$filename = dirname(__FILE__)."/fgetss1.html"; +$filename = __DIR__."/fgetss1.html"; $array = array( "askasdfasdf<b>aaaaaa\n</b>dddddd", @@ -34,7 +34,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/fgetss1.html"; +$filename = __DIR__."/fgetss1.html"; unlink($filename); ?> --EXPECT-- diff --git a/ext/standard/tests/file/fgetss_basic1.phpt b/ext/standard/tests/file/fgetss_basic1.phpt index b1e4a89c64..80d1b74f3c 100644 --- a/ext/standard/tests/file/fgetss_basic1.phpt +++ b/ext/standard/tests/file/fgetss_basic1.phpt @@ -34,7 +34,7 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) { echo "\n-- Testing fgetss() with file opened using $file_modes[$mode_counter] mode --\n"; /* create an empty file and write the strings with tags */ - $filename = dirname(__FILE__)."/fgetss_basic1.tmp"; + $filename = __DIR__."/fgetss_basic1.tmp"; create_file ($filename); //create an empty file file_put_contents($filename, $string_with_tags); $file_handle = fopen($filename, $file_modes[$mode_counter]); diff --git a/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt b/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt index 41ebf8e1da..68fd7059d0 100644 --- a/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt +++ b/ext/standard/tests/file/fgetss_basic2-win32-mb.phpt @@ -34,7 +34,7 @@ EOT; if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_basic2私はガラスを食べられます.tmp"; +$filename = __DIR__."/fgetss_basic2私はガラスを食べられます.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_basic2-win32.phpt b/ext/standard/tests/file/fgetss_basic2-win32.phpt index ea76bb8a8b..9e9ab50788 100644 --- a/ext/standard/tests/file/fgetss_basic2-win32.phpt +++ b/ext/standard/tests/file/fgetss_basic2-win32.phpt @@ -34,7 +34,7 @@ EOT; if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_basic2.tmp"; +$filename = __DIR__."/fgetss_basic2.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_basic2.phpt b/ext/standard/tests/file/fgetss_basic2.phpt index d77689d980..887a752435 100644 --- a/ext/standard/tests/file/fgetss_basic2.phpt +++ b/ext/standard/tests/file/fgetss_basic2.phpt @@ -32,7 +32,7 @@ is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg> <html> html </html> <?php echo "php"; ?> EOT; -$filename = dirname(__FILE__)."/fgetss_basic2.tmp"; +$filename = __DIR__."/fgetss_basic2.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation1-win32.phpt b/ext/standard/tests/file/fgetss_variation1-win32.phpt index b8ad242d9e..54c48e4280 100644 --- a/ext/standard/tests/file/fgetss_variation1-win32.phpt +++ b/ext/standard/tests/file/fgetss_variation1-win32.phpt @@ -42,7 +42,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_variation1.tmp"; +$filename = __DIR__."/fgetss_variation1.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w","wb", "wt","a", "ab", "at","x","xb","xt"); diff --git a/ext/standard/tests/file/fgetss_variation1.phpt b/ext/standard/tests/file/fgetss_variation1.phpt index 6166f8468c..391e0ec4af 100644 --- a/ext/standard/tests/file/fgetss_variation1.phpt +++ b/ext/standard/tests/file/fgetss_variation1.phpt @@ -38,7 +38,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation1.tmp"; +$filename = __DIR__."/fgetss_variation1.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w","wb", "wt","a", "ab", "at","x","xb","xt"); diff --git a/ext/standard/tests/file/fgetss_variation2.phpt b/ext/standard/tests/file/fgetss_variation2.phpt index 228d476079..7c581793c2 100644 --- a/ext/standard/tests/file/fgetss_variation2.phpt +++ b/ext/standard/tests/file/fgetss_variation2.phpt @@ -29,7 +29,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation2.tmp"; +$filename = __DIR__."/fgetss_variation2.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("r","rb", "rt","r+", "r+b", "r+t"); diff --git a/ext/standard/tests/file/fgetss_variation3-win32.phpt b/ext/standard/tests/file/fgetss_variation3-win32.phpt index c1777fc495..f53d76ce27 100644 --- a/ext/standard/tests/file/fgetss_variation3-win32.phpt +++ b/ext/standard/tests/file/fgetss_variation3-win32.phpt @@ -41,7 +41,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_variation3.tmp"; +$filename = __DIR__."/fgetss_variation3.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation3.phpt b/ext/standard/tests/file/fgetss_variation3.phpt index 53a2ac879c..d4120f7fc9 100644 --- a/ext/standard/tests/file/fgetss_variation3.phpt +++ b/ext/standard/tests/file/fgetss_variation3.phpt @@ -37,7 +37,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation3.tmp"; +$filename = __DIR__."/fgetss_variation3.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation4.phpt b/ext/standard/tests/file/fgetss_variation4.phpt index 91470e1d44..585f277e72 100644 --- a/ext/standard/tests/file/fgetss_variation4.phpt +++ b/ext/standard/tests/file/fgetss_variation4.phpt @@ -32,7 +32,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation4.tmp"; +$filename = __DIR__."/fgetss_variation4.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("r","rb", "rt","r+", "r+b", "r+t"); diff --git a/ext/standard/tests/file/fgetss_variation5-win32.phpt b/ext/standard/tests/file/fgetss_variation5-win32.phpt index 57f1fd9059..035186fd09 100644 --- a/ext/standard/tests/file/fgetss_variation5-win32.phpt +++ b/ext/standard/tests/file/fgetss_variation5-win32.phpt @@ -39,7 +39,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") { $string_with_tags = str_replace("\r",'', $string_with_tags); } -$filename = dirname(__FILE__)."/fgetss_variation5.tmp"; +$filename = __DIR__."/fgetss_variation5.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/fgetss_variation5.phpt b/ext/standard/tests/file/fgetss_variation5.phpt index e6fc15a98c..928fdeadf5 100644 --- a/ext/standard/tests/file/fgetss_variation5.phpt +++ b/ext/standard/tests/file/fgetss_variation5.phpt @@ -36,7 +36,7 @@ this text contains some html tags <body> body </body> <br> br </br> this is the line with \n character. EOT; -$filename = dirname(__FILE__)."/fgetss_variation5.tmp"; +$filename = __DIR__."/fgetss_variation5.tmp"; /* try reading the file opened in different modes of reading */ $file_modes = array("w+","w+b", "w+t","a+", "a+b", "a+t","x+","x+b","x+t"); diff --git a/ext/standard/tests/file/file_basic.phpt b/ext/standard/tests/file/file_basic.phpt index 3518968110..f1fb58f621 100644 --- a/ext/standard/tests/file/file_basic.phpt +++ b/ext/standard/tests/file/file_basic.phpt @@ -7,8 +7,8 @@ Test file() function : basic functionality * Description: Reads entire file into an array * Returns the file in an array */ -require(dirname(__FILE__) . '/file.inc'); -$file_path = dirname(__FILE__); +require(__DIR__ . '/file.inc'); +$file_path = __DIR__; echo "*** Testing file() with basic types of files ***\n"; $filetypes = array("numeric", "text", "empty", "text_with_new_line"); diff --git a/ext/standard/tests/file/file_error.phpt b/ext/standard/tests/file/file_error.phpt index 12148189e8..d932966ee5 100644 --- a/ext/standard/tests/file/file_error.phpt +++ b/ext/standard/tests/file/file_error.phpt @@ -7,7 +7,7 @@ Test file() function : error conditions Description: Reads entire file into an array Returns the file in an array */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Testing error conditions ***"; $file_handle = fopen($file_path."/file.tmp", "w"); var_dump( file() ); // Zero No. of args @@ -25,7 +25,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/file_get_contents_basic.phpt b/ext/standard/tests/file/file_get_contents_basic.phpt index 267f86e3f6..7fbca00249 100644 --- a/ext/standard/tests/file/file_get_contents_basic.phpt +++ b/ext/standard/tests/file/file_get_contents_basic.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> * Description: Reads entire file into a string */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing the basic functionality of the file_get_contents() function ***\n"; diff --git a/ext/standard/tests/file/file_get_contents_basic001.phpt b/ext/standard/tests/file/file_get_contents_basic001.phpt index 71b69634d2..86569d7917 100644 --- a/ext/standard/tests/file/file_get_contents_basic001.phpt +++ b/ext/standard/tests/file/file_get_contents_basic001.phpt @@ -5,7 +5,7 @@ file_get_contents() test using basic syntax --FILE-- <?php $file_content = "Bienvenue au CodeFest a Montreal"; - $temp_filename = dirname(__FILE__)."/fichier_a_lire.txt"; + $temp_filename = __DIR__."/fichier_a_lire.txt"; $handle = fopen($temp_filename,"w"); fwrite($handle,$file_content); fclose($handle); @@ -14,7 +14,7 @@ file_get_contents() test using basic syntax ?> --CLEAN-- <?php - $temp_filename = dirname(__FILE__)."/fichier_a_lire.txt"; + $temp_filename = __DIR__."/fichier_a_lire.txt"; unlink($temp_filename); ?> --EXPECT-- diff --git a/ext/standard/tests/file/file_get_contents_error.phpt b/ext/standard/tests/file/file_get_contents_error.phpt index f06628f516..d4c6f16529 100644 --- a/ext/standard/tests/file/file_get_contents_error.phpt +++ b/ext/standard/tests/file/file_get_contents_error.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "\n-- Testing with Non-existing file --\n"; @@ -37,7 +37,7 @@ echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; if(file_exists($file_path."/file_put_contents_error.tmp")) { unlink($file_path."/file_put_contents_error.tmp"); } diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt index 3d5a688b9b..85f44f2cb7 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_basic.phpt @@ -12,7 +12,7 @@ Test file_put_contents() and file_get_contents() functions : basic functionality * Description: Write a string to a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing the basic functionality of file_put_contents() and file_get_contents() functions ***\n"; @@ -35,7 +35,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_put_contents.tmp"); unlink($file_path."/file_put_contents1.tmp"); ?> diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt index b2a09798e3..f34e6ef418 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_error.phpt @@ -13,7 +13,7 @@ Test file-get_contents() and file_put_contents() functions : error conditions echo "*** Testing error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n-- Testing with Non-existing file --\n"; print( file_get_contents("/no/such/file/or/dir") ); @@ -38,7 +38,7 @@ echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_put_contents.tmp"); unlink($file_path."/file_put_contents1.tmp"); diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt index 4a604fa56d..80ddf1f5db 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_variation1.phpt @@ -12,7 +12,7 @@ Test file_get_contents() and file_put_contents() functions : usage variations - */ /* Testing variation in all argument values */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing with variations in the arguments values ***\n"; @@ -37,7 +37,7 @@ echo "--- Done ---"; <?php //Deleting the temporary file -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_put_contents_variation1.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt b/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt index aa67869597..0a35283aeb 100644 --- a/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt +++ b/ext/standard/tests/file/file_get_contents_file_put_contents_variation2.phpt @@ -12,7 +12,7 @@ Test file_get_contents() and file_put_contents() functions : usage variations - */ /* Testing variation using use_include_path argument */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; include($file_path."/file.inc"); echo "*** Testing with variation in use_include_path argument ***\n"; @@ -41,7 +41,7 @@ echo "--- Done ---"; <?php //Deleting the temporary files and directory used in the testcase -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_get_contents_variation2/file_get_contents_variation2.tmp"); rmdir($file_path."/file_get_contents_variation2"); ?> diff --git a/ext/standard/tests/file/file_get_contents_variation2.phpt b/ext/standard/tests/file/file_get_contents_variation2.phpt index 12d740c5f0..c1f07d920f 100644 --- a/ext/standard/tests/file/file_get_contents_variation2.phpt +++ b/ext/standard/tests/file/file_get_contents_variation2.phpt @@ -23,7 +23,7 @@ mkdir($thisTestDir); chdir($thisTestDir); $filename = 'FileGetContentsVar2.tmp'; -$scriptLocFile = dirname(__FILE__)."/".$filename; +$scriptLocFile = __DIR__."/".$filename; $newpath = create_include_path(); set_include_path($newpath); diff --git a/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt b/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt index 27ddea0060..0f2c58a86d 100644 --- a/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt +++ b/ext/standard/tests/file/file_get_contents_variation7-win32-mb.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing file_get_contents() : variation ***\n"; $mainDir = "fileGetContentsVar7私はガラスを食べられます.dir"; $subDir = "fileGetContentsVar7Sub私はガラスを食べられます"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/file_get_contents_variation7-win32.phpt b/ext/standard/tests/file/file_get_contents_variation7-win32.phpt index 4f1dfac57b..8e9f34520a 100644 --- a/ext/standard/tests/file/file_get_contents_variation7-win32.phpt +++ b/ext/standard/tests/file/file_get_contents_variation7-win32.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing file_get_contents() : variation ***\n"; $mainDir = "fileGetContentsVar7.dir"; $subDir = "fileGetContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/file_get_contents_variation7.phpt b/ext/standard/tests/file/file_get_contents_variation7.phpt index 0fb662b0a8..e2d317a4a0 100644 --- a/ext/standard/tests/file/file_get_contents_variation7.phpt +++ b/ext/standard/tests/file/file_get_contents_variation7.phpt @@ -13,13 +13,13 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing file_get_contents() : variation ***\n"; $mainDir = "fileGetContentsVar7.dir"; $subDir = "fileGetContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/file_get_contents_variation9.phpt b/ext/standard/tests/file/file_get_contents_variation9.phpt index 74e2cb4a6e..c5bd75f331 100644 --- a/ext/standard/tests/file/file_get_contents_variation9.phpt +++ b/ext/standard/tests/file/file_get_contents_variation9.phpt @@ -16,10 +16,10 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Testing file_get_contents() : variation ***\n"; -$filename = dirname(__FILE__).'/fileGetContentsVar9.tmp'; -$softlink = dirname(__FILE__).'/fileGetContentsVar9.SoftLink'; -$hardlink = dirname(__FILE__).'/fileGetContentsVar9.HardLink'; -$chainlink = dirname(__FILE__).'/fileGetContentsVar9.ChainLink'; +$filename = __DIR__.'/fileGetContentsVar9.tmp'; +$softlink = __DIR__.'/fileGetContentsVar9.SoftLink'; +$hardlink = __DIR__.'/fileGetContentsVar9.HardLink'; +$chainlink = __DIR__.'/fileGetContentsVar9.ChainLink'; // create file $h = fopen($filename,"w"); diff --git a/ext/standard/tests/file/file_put_contents.phpt b/ext/standard/tests/file/file_put_contents.phpt index 1607ab1bde..be2a6ca0ac 100644 --- a/ext/standard/tests/file/file_put_contents.phpt +++ b/ext/standard/tests/file/file_put_contents.phpt @@ -7,7 +7,7 @@ class foo { return __METHOD__; } } -$file = dirname(__FILE__)."/file_put_contents.txt"; +$file = __DIR__."/file_put_contents.txt"; $context = stream_context_create(); diff --git a/ext/standard/tests/file/file_put_contents_variation5.phpt b/ext/standard/tests/file/file_put_contents_variation5.phpt index fed872f8a3..c069c35a7e 100644 --- a/ext/standard/tests/file/file_put_contents_variation5.phpt +++ b/ext/standard/tests/file/file_put_contents_variation5.phpt @@ -6,12 +6,12 @@ Dave Kelsey <d_kelsey@uk.ibm.com> <?php -$thisTestDir = dirname(__FILE__) . '/' .basename(__FILE__, ".php") . ".directory"; +$thisTestDir = __DIR__ . '/' .basename(__FILE__, ".php") . ".directory"; mkdir($thisTestDir); chdir($thisTestDir); $filename = basename(__FILE__, ".php") . ".tmp"; -$scriptLocFile = dirname(__FILE__)."/".$filename; +$scriptLocFile = __DIR__."/".$filename; $newpath = "rubbish"; set_include_path($newpath); @@ -24,7 +24,7 @@ runtest(); set_include_path(";; ; ;c:\\rubbish"); runtest(); -chdir(dirname(__FILE__)); +chdir(__DIR__); rmdir($thisTestDir); diff --git a/ext/standard/tests/file/file_put_contents_variation7-win32.phpt b/ext/standard/tests/file/file_put_contents_variation7-win32.phpt index d4ee0585fd..138b4ede84 100644 --- a/ext/standard/tests/file/file_put_contents_variation7-win32.phpt +++ b/ext/standard/tests/file/file_put_contents_variation7-win32.phpt @@ -19,13 +19,13 @@ echo "*** Testing file_put_contents() : usage variation ***\n"; $mainDir = "filePutContentsVar7.dir"; $subDir = "filePutContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); diff --git a/ext/standard/tests/file/file_put_contents_variation7.phpt b/ext/standard/tests/file/file_put_contents_variation7.phpt index 94cfa627d3..561c78b374 100644 --- a/ext/standard/tests/file/file_put_contents_variation7.phpt +++ b/ext/standard/tests/file/file_put_contents_variation7.phpt @@ -14,13 +14,13 @@ echo "*** Testing file_put_contents() : usage variation ***\n"; $mainDir = "filePutContentsVar7.dir"; $subDir = "filePutContentsVar7Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); // Note invalid dirs in p8 result in (The system cannot find the path specified.) diff --git a/ext/standard/tests/file/file_put_contents_variation9.phpt b/ext/standard/tests/file/file_put_contents_variation9.phpt index 64a5a67e33..554ce344e7 100644 --- a/ext/standard/tests/file/file_put_contents_variation9.phpt +++ b/ext/standard/tests/file/file_put_contents_variation9.phpt @@ -17,10 +17,10 @@ if(substr(PHP_OS, 0, 3) == "WIN") echo "*** Testing file_put_contents() : usage variation ***\n"; -$filename = dirname(__FILE__).'/filePutContentsVar9.tmp'; -$softlink = dirname(__FILE__).'/filePutContentsVar9.SoftLink'; -$hardlink = dirname(__FILE__).'/filePutContentsVar9.HardLink'; -$chainlink = dirname(__FILE__).'/filePutContentsVar9.ChainLink'; +$filename = __DIR__.'/filePutContentsVar9.tmp'; +$softlink = __DIR__.'/filePutContentsVar9.SoftLink'; +$hardlink = __DIR__.'/filePutContentsVar9.HardLink'; +$chainlink = __DIR__.'/filePutContentsVar9.ChainLink'; // link files even though it original file doesn't exist yet diff --git a/ext/standard/tests/file/file_variation.phpt b/ext/standard/tests/file/file_variation.phpt index bd4366b945..c430845335 100644 --- a/ext/standard/tests/file/file_variation.phpt +++ b/ext/standard/tests/file/file_variation.phpt @@ -7,12 +7,12 @@ Test file() function : usage variations * Description: Reads entire file into an array Returns the file in an array */ -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); $data_array = array( "Garbage data", "Gar\nba\nge d\nata", "Gar\n\nbage \n\n data" ); echo "*** Using various flags values with different data in a file\n"; $count=1; -$file_path = dirname(__FILE__); +$file_path = __DIR__; foreach( $data_array as $data ) { echo "--Iteration $count --\n"; $fh = fopen($file_path."/file_variation.tmp", "w"); @@ -24,7 +24,7 @@ foreach( $data_array as $data ) { } echo "*** Testing with variation in use_include_path argument ***\n"; -$file_path1 = dirname(__FILE__)."/file_variation"; +$file_path1 = __DIR__."/file_variation"; mkdir($file_path1); ini_set( 'include_path',$file_path.'/file_variation' ); @@ -55,7 +55,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/file_variation.tmp"); unlink($file_path."/file_variation/file1_variation.tmp"); unlink($file_path."/file2_variation.tmp"); diff --git a/ext/standard/tests/file/file_variation5-win32-mb.phpt b/ext/standard/tests/file/file_variation5-win32-mb.phpt index 783efd6624..ff7c5648db 100644 --- a/ext/standard/tests/file/file_variation5-win32-mb.phpt +++ b/ext/standard/tests/file/file_variation5-win32-mb.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --FILE-- <?php -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "私はガラスを食べられますtestdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/file_variation5-win32.phpt b/ext/standard/tests/file/file_variation5-win32.phpt index d6390db6dd..f31f3c769a 100644 --- a/ext/standard/tests/file/file_variation5-win32.phpt +++ b/ext/standard/tests/file/file_variation5-win32.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { --FILE-- <?php -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/file_variation5.phpt b/ext/standard/tests/file/file_variation5.phpt index b8badd0e42..7f012b7d43 100644 --- a/ext/standard/tests/file/file_variation5.phpt +++ b/ext/standard/tests/file/file_variation5.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$script_directory = dirname(__FILE__); +$script_directory = __DIR__; chdir($script_directory); $test_dirname = basename(__FILE__, ".php") . "testdir"; mkdir($test_dirname); diff --git a/ext/standard/tests/file/file_variation8-win32.phpt b/ext/standard/tests/file/file_variation8-win32.phpt index f80ae0eeac..b5a2004473 100644 --- a/ext/standard/tests/file/file_variation8-win32.phpt +++ b/ext/standard/tests/file/file_variation8-win32.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing file() : variation ***\n"; $mainDir = "fileVar8.dir"; $subDir = "fileVar8Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/file_variation8.phpt b/ext/standard/tests/file/file_variation8.phpt index 49ab92a41c..f56ca9af7d 100644 --- a/ext/standard/tests/file/file_variation8.phpt +++ b/ext/standard/tests/file/file_variation8.phpt @@ -13,13 +13,13 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing file() : variation ***\n"; $mainDir = "fileVar8.dir"; $subDir = "fileVar8Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/file_variation9.phpt b/ext/standard/tests/file/file_variation9.phpt index dca79ff7b2..13860878d9 100644 --- a/ext/standard/tests/file/file_variation9.phpt +++ b/ext/standard/tests/file/file_variation9.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> */ echo "*** Testing file() : variation ***\n"; -$testfile = dirname(__FILE__)."/fileVar9.txt"; +$testfile = __DIR__."/fileVar9.txt"; $contents = array( "File ends on a single character\na", diff --git a/ext/standard/tests/file/filegroup_basic.phpt b/ext/standard/tests/file/filegroup_basic.phpt index 5defbbb2e9..ff546501ed 100644 --- a/ext/standard/tests/file/filegroup_basic.phpt +++ b/ext/standard/tests/file/filegroup_basic.phpt @@ -16,7 +16,7 @@ echo "*** Testing filegroup(): basic functionality ***\n"; echo "-- Testing with the file or directory created by owner --\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( filegroup(__FILE__) ); var_dump( filegroup(".") ); var_dump( filegroup("./..") ); @@ -44,7 +44,7 @@ echo "\n*** Done ***\n"; --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/filegroup_basic.tmp"; $dir_name = $file_path."/filegroup_basic"; unlink($file_name); diff --git a/ext/standard/tests/file/filegroup_variation1.phpt b/ext/standard/tests/file/filegroup_variation1.phpt index a41f5b2382..06c39cfbda 100644 --- a/ext/standard/tests/file/filegroup_variation1.phpt +++ b/ext/standard/tests/file/filegroup_variation1.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying filegroup() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/filegroup_variation1.tmp", "w") ); echo "*** Testing filegroup() with links ***\n"; @@ -33,7 +33,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filegroup_variation1_symlink.tmp"); unlink($file_path."/filegroup_variation1_link.tmp"); unlink($file_path."/filegroup_variation1.tmp"); diff --git a/ext/standard/tests/file/filegroup_variation2.phpt b/ext/standard/tests/file/filegroup_variation2.phpt index 809d61ba73..71def66e29 100644 --- a/ext/standard/tests/file/filegroup_variation2.phpt +++ b/ext/standard/tests/file/filegroup_variation2.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Testing filegroup() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/filegroup_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -40,7 +40,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filegroup_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/filegroup_variation3.phpt b/ext/standard/tests/file/filegroup_variation3.phpt index ebefeb7e3f..a43a54da0d 100644 --- a/ext/standard/tests/file/filegroup_variation3.phpt +++ b/ext/standard/tests/file/filegroup_variation3.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filegroup() with different notations of file names ***\n"; $dir_name = $file_path."/filegroup_variation3"; @@ -48,7 +48,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/filegroup_variation3"; unlink($dir_name."/filegroup_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/fileinode_basic.phpt b/ext/standard/tests/file/fileinode_basic.phpt index c7fc77e7d5..dfcabe16bb 100644 --- a/ext/standard/tests/file/fileinode_basic.phpt +++ b/ext/standard/tests/file/fileinode_basic.phpt @@ -10,7 +10,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. echo "*** Testing fileinode() with file, directory ***\n"; /* Getting inode of created file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fopen("$file_path/inode.tmp", "w"); print( fileinode("$file_path/inode.tmp") )."\n"; @@ -24,7 +24,7 @@ print( fileinode("./..") )."\n"; echo "\n*** Done ***"; --CLEAN-- <?php -unlink (dirname(__FILE__)."/inode.tmp"); +unlink (__DIR__."/inode.tmp"); ?> --EXPECTF-- *** Testing fileinode() with file, directory *** diff --git a/ext/standard/tests/file/fileinode_variation.phpt b/ext/standard/tests/file/fileinode_variation.phpt index 5f5cec47ed..881aa2ce59 100644 --- a/ext/standard/tests/file/fileinode_variation.phpt +++ b/ext/standard/tests/file/fileinode_variation.phpt @@ -14,7 +14,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. */ echo "*** Testing fileinode() with files, links and directories ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file1 = $file_path."/fileinode1_variation.tmp"; $file2 = $file_path."/fileinode2_variation.tmp"; $link1 = $file_path."/fileinode1_variation_link.tmp"; diff --git a/ext/standard/tests/file/fileinode_variation1.phpt b/ext/standard/tests/file/fileinode_variation1.phpt index c45bf3a5b2..49cc6a937d 100644 --- a/ext/standard/tests/file/fileinode_variation1.phpt +++ b/ext/standard/tests/file/fileinode_variation1.phpt @@ -16,7 +16,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. /* Creating soft and hard links to a file and applying fileinode() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/fileinode_variation1.tmp", "w") ); echo "*** Testing fileinode() with links ***\n"; @@ -34,7 +34,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileinode_variation1_symlink.tmp"); unlink($file_path."/fileinode_variation1_link.tmp"); unlink($file_path."/fileinode_variation1.tmp"); diff --git a/ext/standard/tests/file/fileinode_variation2.phpt b/ext/standard/tests/file/fileinode_variation2.phpt index 90c7eb19e3..3ccfc76476 100644 --- a/ext/standard/tests/file/fileinode_variation2.phpt +++ b/ext/standard/tests/file/fileinode_variation2.phpt @@ -11,7 +11,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. /* Testing fileinode() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/fileinode_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -41,7 +41,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileinode_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fileinode_variation3.phpt b/ext/standard/tests/file/fileinode_variation3.phpt index 2f51e8f595..72dfcbdc55 100644 --- a/ext/standard/tests/file/fileinode_variation3.phpt +++ b/ext/standard/tests/file/fileinode_variation3.phpt @@ -11,7 +11,7 @@ Description: Returns the inode number of the file, or FALSE in case of an error. /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fileinode() with different notations of file names ***\n"; $dir_name = $file_path."/fileinode_variation3"; @@ -49,7 +49,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/fileinode_variation3"; unlink($dir_name."/fileinode_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/fileowner_basic.phpt b/ext/standard/tests/file/fileowner_basic.phpt index 63ac59680e..9bb0827ec8 100644 --- a/ext/standard/tests/file/fileowner_basic.phpt +++ b/ext/standard/tests/file/fileowner_basic.phpt @@ -15,7 +15,7 @@ var_dump( fileowner(".") ); var_dump( fileowner("./..") ); /* Newly created files and dirs */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/fileowner_basic.tmp"; $file_handle = fopen($file_name, "w"); $string = "Hello, world\n1234\n123Hello"; @@ -31,7 +31,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/fileowner_basic.tmp"; $dir_name = $file_path."/fileowner_basic"; unlink($file_name); diff --git a/ext/standard/tests/file/fileowner_variation1.phpt b/ext/standard/tests/file/fileowner_variation1.phpt index 75873679ca..03602092e3 100644 --- a/ext/standard/tests/file/fileowner_variation1.phpt +++ b/ext/standard/tests/file/fileowner_variation1.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying fileowner() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/fileowner_variation1.tmp", "w") ); echo "*** Testing fileowner() with links ***\n"; @@ -34,7 +34,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileowner_variation1_symlink.tmp"); unlink($file_path."/fileowner_variation1_link.tmp"); unlink($file_path."/fileowner_variation1.tmp"); diff --git a/ext/standard/tests/file/fileowner_variation2.phpt b/ext/standard/tests/file/fileowner_variation2.phpt index 131d43bfaa..8a943e549e 100644 --- a/ext/standard/tests/file/fileowner_variation2.phpt +++ b/ext/standard/tests/file/fileowner_variation2.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Testing fileowner() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/fileowner_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -41,7 +41,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileowner_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fileowner_variation3.phpt b/ext/standard/tests/file/fileowner_variation3.phpt index 5768f528f1..e5d8852776 100644 --- a/ext/standard/tests/file/fileowner_variation3.phpt +++ b/ext/standard/tests/file/fileowner_variation3.phpt @@ -11,7 +11,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fileowner() with different notations of file names ***\n"; $dir_name = $file_path."/fileowner_variation3"; @@ -49,7 +49,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/fileowner_variation3"; unlink($dir_name."/fileowner_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/fileperms_variation1.phpt b/ext/standard/tests/file/fileperms_variation1.phpt index 1fd5203e50..b3ea2d5cf6 100644 --- a/ext/standard/tests/file/fileperms_variation1.phpt +++ b/ext/standard/tests/file/fileperms_variation1.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying fileperms() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/fileperms_variation1.tmp", "w") ); echo "*** Testing fileperms() with links ***\n"; @@ -33,7 +33,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileperms_variation1_symlink.tmp"); unlink($file_path."/fileperms_variation1_link.tmp"); unlink($file_path."/fileperms_variation1.tmp"); diff --git a/ext/standard/tests/file/fileperms_variation2.phpt b/ext/standard/tests/file/fileperms_variation2.phpt index 6b1778e74e..c8d62fd5bd 100644 --- a/ext/standard/tests/file/fileperms_variation2.phpt +++ b/ext/standard/tests/file/fileperms_variation2.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Testing fileperms() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/fileperms_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -40,7 +40,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/fileperms_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fileperms_variation3.phpt b/ext/standard/tests/file/fileperms_variation3.phpt index 6ae97d1601..6a4aacdc6d 100644 --- a/ext/standard/tests/file/fileperms_variation3.phpt +++ b/ext/standard/tests/file/fileperms_variation3.phpt @@ -10,7 +10,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fileperms() with different notations of file names ***\n"; $dir_name = $file_path."/fileperms_variation3"; @@ -48,7 +48,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/fileperms_variation3"; unlink($dir_name."/fileperms_variation3.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/filesize_basic.phpt b/ext/standard/tests/file/filesize_basic.phpt index 9cf0995035..09c3352f62 100644 --- a/ext/standard/tests/file/filesize_basic.phpt +++ b/ext/standard/tests/file/filesize_basic.phpt @@ -11,7 +11,7 @@ Test filesize() function: basic functionaity echo "*** Testing size of files and directories with filesize() ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( filesize(__FILE__) ); var_dump( filesize(".") ); @@ -26,7 +26,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/filesize_basic.tmp"; unlink($file_name); ?> diff --git a/ext/standard/tests/file/filesize_variation1-win32-mb.phpt b/ext/standard/tests/file/filesize_variation1-win32-mb.phpt index 888fca546b..73d37c9ec3 100644 --- a/ext/standard/tests/file/filesize_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/filesize_variation1-win32-mb.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; diff --git a/ext/standard/tests/file/filesize_variation1-win32.phpt b/ext/standard/tests/file/filesize_variation1-win32.phpt index 30d7475fd8..b312d09fc1 100644 --- a/ext/standard/tests/file/filesize_variation1-win32.phpt +++ b/ext/standard/tests/file/filesize_variation1-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; diff --git a/ext/standard/tests/file/filesize_variation1.phpt b/ext/standard/tests/file/filesize_variation1.phpt index 6ee44159ce..e9a5af86ba 100644 --- a/ext/standard/tests/file/filesize_variation1.phpt +++ b/ext/standard/tests/file/filesize_variation1.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; diff --git a/ext/standard/tests/file/filesize_variation2-win32.phpt b/ext/standard/tests/file/filesize_variation2-win32.phpt index 132ecd7e9f..06cef27bc6 100644 --- a/ext/standard/tests/file/filesize_variation2-win32.phpt +++ b/ext/standard/tests/file/filesize_variation2-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; @@ -59,7 +59,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation2/filesize_variation2_sub/filesize_variation2.tmp"); rmdir($file_path."/filesize_variation2/filesize_variation2_sub"); rmdir($file_path."/filesize_variation2"); diff --git a/ext/standard/tests/file/filesize_variation2.phpt b/ext/standard/tests/file/filesize_variation2.phpt index 0379451660..851d2d526a 100644 --- a/ext/standard/tests/file/filesize_variation2.phpt +++ b/ext/standard/tests/file/filesize_variation2.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; @@ -59,7 +59,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation2/filesize_variation2_sub/filesize_variation2.tmp"); rmdir($file_path."/filesize_variation2/filesize_variation2_sub"); rmdir($file_path."/filesize_variation2"); diff --git a/ext/standard/tests/file/filesize_variation3-win32.phpt b/ext/standard/tests/file/filesize_variation3-win32.phpt index 215c767616..67b97a8009 100644 --- a/ext/standard/tests/file/filesize_variation3-win32.phpt +++ b/ext/standard/tests/file/filesize_variation3-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filesize(): usage variations ***\n"; $filename = $file_path."/filesize_variation3.tmp"; @@ -37,7 +37,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation3.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/filesize_variation3.phpt b/ext/standard/tests/file/filesize_variation3.phpt index 604887d116..09b9c341ca 100644 --- a/ext/standard/tests/file/filesize_variation3.phpt +++ b/ext/standard/tests/file/filesize_variation3.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filesize(): usage variations ***\n"; $filename = $file_path."/filesize_variation3.tmp"; @@ -37,7 +37,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation3.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/filesize_variation4-win32.phpt b/ext/standard/tests/file/filesize_variation4-win32.phpt index f954401891..89bb869e31 100644 --- a/ext/standard/tests/file/filesize_variation4-win32.phpt +++ b/ext/standard/tests/file/filesize_variation4-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { (and generates an error of level E_WARNING) in case of an error. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing filesize(): usage variations ***\n"; @@ -71,7 +71,7 @@ var_dump( filesize($filename) ); //0 bytes clearstatcache(); echo "-- with empty file --\n"; -$filename = dirname(__FILE__)."/filesize_variation4_empty.tmp"; +$filename = __DIR__."/filesize_variation4_empty.tmp"; fclose( fopen($filename, "w") ); var_dump( filesize($filename) ); //0 bytes @@ -79,7 +79,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation4.tmp"); unlink($file_path."/filesize_variation4_empty.tmp"); ?> diff --git a/ext/standard/tests/file/filesize_variation4.phpt b/ext/standard/tests/file/filesize_variation4.phpt index f0baedb378..4abb64dca6 100644 --- a/ext/standard/tests/file/filesize_variation4.phpt +++ b/ext/standard/tests/file/filesize_variation4.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Testing filesize() with data written using different file modes and by creating holes in file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing filesize(): usage variations ***\n"; echo "\n*** Testing filesize() with data written using different file modes and by creating holes in file ***\n"; @@ -73,7 +73,7 @@ var_dump( filesize($filename) ); //0 bytes clearstatcache(); echo "-- with empty file --\n"; -$filename = dirname(__FILE__)."/filesize_variation4_empty.tmp"; +$filename = __DIR__."/filesize_variation4_empty.tmp"; fclose( fopen($filename, "w") ); var_dump( filesize($filename) ); //0 bytes @@ -81,7 +81,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/filesize_variation4.tmp"); unlink($file_path."/filesize_variation4_empty.tmp"); ?> diff --git a/ext/standard/tests/file/filetype_variation.phpt b/ext/standard/tests/file/filetype_variation.phpt index b6b306a37a..019f73a3c8 100644 --- a/ext/standard/tests/file/filetype_variation.phpt +++ b/ext/standard/tests/file/filetype_variation.phpt @@ -18,7 +18,7 @@ Description: Returns the type of the file. Possible values are fifo, char, */ echo "*** Testing filetype() with various types ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file1 = $file_path."/filetype1_variation.tmp"; $file2 = $file_path."/filetype2_variation.tmp"; $file3 = $file_path."/filetype3_variation.tmp"; diff --git a/ext/standard/tests/file/flock.phpt b/ext/standard/tests/file/flock.phpt index 2330270113..43f9112887 100644 --- a/ext/standard/tests/file/flock.phpt +++ b/ext/standard/tests/file/flock.phpt @@ -3,7 +3,7 @@ flock() tests --FILE-- <?php -$file = dirname(__FILE__)."/flock.dat"; +$file = __DIR__."/flock.dat"; var_dump(flock()); var_dump(flock("", "", $var)); @@ -37,7 +37,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file = dirname(__FILE__)."/flock.dat"; +$file = __DIR__."/flock.dat"; unlink($file); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/flock_basic.phpt b/ext/standard/tests/file/flock_basic.phpt index ddfb136f64..97dd98a36c 100644 --- a/ext/standard/tests/file/flock_basic.phpt +++ b/ext/standard/tests/file/flock_basic.phpt @@ -9,7 +9,7 @@ Description: PHP supports a portable way of locking complete files */ echo "*** Testing flock() fun with file and dir ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen("$file_path/lock.tmp", "w"); var_dump(flock($file_handle, LOCK_SH|LOCK_NB)); diff --git a/ext/standard/tests/file/flock_error.phpt b/ext/standard/tests/file/flock_error.phpt index ccb6274756..9f64dd0531 100644 --- a/ext/standard/tests/file/flock_error.phpt +++ b/ext/standard/tests/file/flock_error.phpt @@ -10,7 +10,7 @@ Description: PHP supports a portable way of locking complete files echo "*** Testing error conditions ***\n"; -$file = dirname(__FILE__)."/flock.tmp"; +$file = __DIR__."/flock.tmp"; $fp = fopen($file, "w"); /* array of operatons */ @@ -52,7 +52,7 @@ echo "\n*** Done ***\n"; ?> --CLEAN-- <?php -$file = dirname(__FILE__)."/flock.tmp"; +$file = __DIR__."/flock.tmp"; unlink($file); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/flock_variation.phpt b/ext/standard/tests/file/flock_variation.phpt index 0fd2be4606..1f7880ec0c 100644 --- a/ext/standard/tests/file/flock_variation.phpt +++ b/ext/standard/tests/file/flock_variation.phpt @@ -10,7 +10,7 @@ Description: PHP supports a portable way of locking complete files echo "*** Testing flock() fun with the various operation and wouldblock values ***\n"; -$file = dirname(__FILE__)."/flock.tmp"; +$file = __DIR__."/flock.tmp"; $fp = fopen($file, "w"); /* array of operatons */ diff --git a/ext/standard/tests/file/fnmatch_variation.phpt b/ext/standard/tests/file/fnmatch_variation.phpt index b3607be58b..919e80eec0 100644 --- a/ext/standard/tests/file/fnmatch_variation.phpt +++ b/ext/standard/tests/file/fnmatch_variation.phpt @@ -13,7 +13,7 @@ if (!function_exists('fnmatch')) */ echo "*** Testing fnmatch() with file and various patterns ***\n"; -$file_name = dirname(__FILE__)."/match.tmp"; +$file_name = __DIR__."/match.tmp"; /* avoid using \, it breaks the pattern */ if (substr(PHP_OS, 0, 3) == 'WIN') { diff --git a/ext/standard/tests/file/fopen_unlink.phpt b/ext/standard/tests/file/fopen_unlink.phpt index c069ea1b94..117863b63d 100644 --- a/ext/standard/tests/file/fopen_unlink.phpt +++ b/ext/standard/tests/file/fopen_unlink.phpt @@ -4,7 +4,7 @@ Test fopen() function : check fopen()ed descriptor is usable after the fs object <?php var_dump( - $p = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tututu', + $p = __DIR__ . DIRECTORY_SEPARATOR . 'tututu', $f = fopen($p, 'w+'), unlink($p), file_exists($p), diff --git a/ext/standard/tests/file/fopen_variation10-win32.phpt b/ext/standard/tests/file/fopen_variation10-win32.phpt index 19b2e6507e..300cf52864 100644 --- a/ext/standard/tests/file/fopen_variation10-win32.phpt +++ b/ext/standard/tests/file/fopen_variation10-win32.phpt @@ -23,7 +23,7 @@ if (!is_writable('c:\\fopen_variation10.tmp')) { echo "*** Testing fopen() : variation ***\n"; // fopen with interesting windows paths. -$testdir = dirname(__FILE__).'/fopen10.tmpDir'; +$testdir = __DIR__.'/fopen10.tmpDir'; $rootdir = 'fopen10.tmpdirTwo'; mkdir($testdir); mkdir('c:\\'.$rootdir); diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt index 8d8d36fe92..ed6508b69a 100644 --- a/ext/standard/tests/file/fopen_variation11-win32.phpt +++ b/ext/standard/tests/file/fopen_variation11-win32.phpt @@ -22,7 +22,7 @@ if (!is_writable('c:\\fopen_variation10.tmp')) { echo "*** Testing fopen() : variation ***\n"; // fopen with interesting windows paths. -$testdir = dirname(__FILE__).'/fopen11.tmpDir'; +$testdir = __DIR__.'/fopen11.tmpDir'; $rootdir = 'fopen11.tmpdirTwo'; mkdir($testdir); mkdir('c:\\'.$rootdir); diff --git a/ext/standard/tests/file/fopen_variation12.phpt b/ext/standard/tests/file/fopen_variation12.phpt index e39ecedf87..91d482276a 100644 --- a/ext/standard/tests/file/fopen_variation12.phpt +++ b/ext/standard/tests/file/fopen_variation12.phpt @@ -33,7 +33,7 @@ function testme() { } - $scriptDirFile = dirname(__FILE__).'/'.$tmpfile; + $scriptDirFile = __DIR__.'/'.$tmpfile; $h = @fopen($scriptDirFile, "r"); if ($h === false) { echo "Not created in script dir\n"; diff --git a/ext/standard/tests/file/fopen_variation5.phpt b/ext/standard/tests/file/fopen_variation5.phpt index b7e4e0a4cb..b5c7edbfbb 100644 --- a/ext/standard/tests/file/fopen_variation5.phpt +++ b/ext/standard/tests/file/fopen_variation5.phpt @@ -19,7 +19,7 @@ chdir($thisTestDir); $workingDir = "workdir"; $filename = basename(__FILE__, ".php") . ".tmp"; -$scriptDir = dirname(__FILE__); +$scriptDir = __DIR__; $baseDir = getcwd(); $secondFile = $baseDir."/dir2/".$filename; $firstFile = "../dir1/".$filename; diff --git a/ext/standard/tests/file/fopen_variation8.phpt b/ext/standard/tests/file/fopen_variation8.phpt index 221b6e62ef..7e02aa8efe 100644 --- a/ext/standard/tests/file/fopen_variation8.phpt +++ b/ext/standard/tests/file/fopen_variation8.phpt @@ -19,7 +19,7 @@ chdir($thisTestDir); //create the include directory structure $workingDir = "workdir"; $filename = basename(__FILE__, ".php") . ".tmp"; -$scriptDir = dirname(__FILE__); +$scriptDir = __DIR__; $baseDir = getcwd(); $secondFile = $baseDir."/dir2/".$filename; $firstFile = "../dir1/".$filename; diff --git a/ext/standard/tests/file/fpassthru_basic.phpt b/ext/standard/tests/file/fpassthru_basic.phpt index 162c6f77ec..9376714368 100644 --- a/ext/standard/tests/file/fpassthru_basic.phpt +++ b/ext/standard/tests/file/fpassthru_basic.phpt @@ -8,7 +8,7 @@ Description: Reads to EOF on the given file pointer from the current position and writes the results to the output buffer. */ -$file_name = dirname(__FILE__)."/passthru.tmp"; +$file_name = __DIR__."/passthru.tmp"; $write_handle = fopen($file_name, "w"); $string = "Hello, world\n, abcdefg\tadsdsfdf\n8u2394723947\t$%$%#$%#$%#^#%^ @@ -60,7 +60,7 @@ echo "*** Done ***\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/passthru.tmp"); +unlink(__DIR__."/passthru.tmp"); ?> --EXPECT-- *** Test basic functionality of fpassthru() function *** diff --git a/ext/standard/tests/file/fpassthru_variation.phpt b/ext/standard/tests/file/fpassthru_variation.phpt index 080549f03b..fb8c56f585 100644 --- a/ext/standard/tests/file/fpassthru_variation.phpt +++ b/ext/standard/tests/file/fpassthru_variation.phpt @@ -12,7 +12,7 @@ echo "*** Testing fpassthru() function with files ***\n\n"; echo "--- Testing with different offsets ---\n"; -$file_name = dirname(__FILE__)."/passthru_variation.tmp"; +$file_name = __DIR__."/passthru_variation.tmp"; $file_write = fopen($file_name, "w"); fwrite($file_write, "1234567890abcdefghijklmnopqrstuvwxyz"); fclose($file_write); diff --git a/ext/standard/tests/file/fputcsv.phpt b/ext/standard/tests/file/fputcsv.phpt index 63c41509bd..2c93096bf9 100644 --- a/ext/standard/tests/file/fputcsv.phpt +++ b/ext/standard/tests/file/fputcsv.phpt @@ -26,7 +26,7 @@ $list = array ( 19 => '"\\""",aaa', ); -$file = dirname(__FILE__) . 'fgetcsv.csv'; +$file = __DIR__ . 'fgetcsv.csv'; @unlink($file); $fp = fopen($file, "w"); diff --git a/ext/standard/tests/file/fputcsv_002.phpt b/ext/standard/tests/file/fputcsv_002.phpt index 24105718d2..db565d5223 100644 --- a/ext/standard/tests/file/fputcsv_002.phpt +++ b/ext/standard/tests/file/fputcsv_002.phpt @@ -3,7 +3,7 @@ fputcsv(): Checking data after calling the function --FILE-- <?php -$file = dirname(__FILE__) .'/fgetcsv-test.csv'; +$file = __DIR__ .'/fgetcsv-test.csv'; $data = array(1, 2, 'foo', 'haha', array(4, 5, 6), 1.3, null); @@ -16,7 +16,7 @@ var_dump($data); ?> --CLEAN-- <?php -$file = dirname(__FILE__) .'/fgetcsv-test.csv'; +$file = __DIR__ .'/fgetcsv-test.csv'; unlink($file); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fputcsv_variation1.phpt b/ext/standard/tests/file/fputcsv_variation1.phpt index 41e6f02998..b66fdcb269 100644 --- a/ext/standard/tests/file/fputcsv_variation1.phpt +++ b/ext/standard/tests/file/fputcsv_variation1.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation1.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation10.phpt b/ext/standard/tests/file/fputcsv_variation10.phpt index 085d72d0a0..23503ee1fa 100644 --- a/ext/standard/tests/file/fputcsv_variation10.phpt +++ b/ext/standard/tests/file/fputcsv_variation10.phpt @@ -22,7 +22,7 @@ $fields = array( array('water_fruit\n'), array("") ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation10.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation11.phpt b/ext/standard/tests/file/fputcsv_variation11.phpt index 07ae930fbd..9c394b54e6 100644 --- a/ext/standard/tests/file/fputcsv_variation11.phpt +++ b/ext/standard/tests/file/fputcsv_variation11.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation11.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation12.phpt b/ext/standard/tests/file/fputcsv_variation12.phpt index dbf4fe9625..cf1ba8126f 100644 --- a/ext/standard/tests/file/fputcsv_variation12.phpt +++ b/ext/standard/tests/file/fputcsv_variation12.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation12.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation13.phpt b/ext/standard/tests/file/fputcsv_variation13.phpt index 04b321020c..119398e788 100644 --- a/ext/standard/tests/file/fputcsv_variation13.phpt +++ b/ext/standard/tests/file/fputcsv_variation13.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation13.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation14.phpt b/ext/standard/tests/file/fputcsv_variation14.phpt index f7c885dd31..b4454906f5 100644 --- a/ext/standard/tests/file/fputcsv_variation14.phpt +++ b/ext/standard/tests/file/fputcsv_variation14.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation14.tmp"; $file_modes = array ("r", "rb", "rt"); diff --git a/ext/standard/tests/file/fputcsv_variation15.phpt b/ext/standard/tests/file/fputcsv_variation15.phpt index dc4a9e2dbd..e7f4c3df5d 100644 --- a/ext/standard/tests/file/fputcsv_variation15.phpt +++ b/ext/standard/tests/file/fputcsv_variation15.phpt @@ -28,7 +28,7 @@ $list = array ( 19 => '"/""",aaa', ); -$file = dirname(__FILE__) . 'fgetcsv.csv'; +$file = __DIR__ . 'fgetcsv.csv'; @unlink($file); $fp = fopen($file, "w"); diff --git a/ext/standard/tests/file/fputcsv_variation2.phpt b/ext/standard/tests/file/fputcsv_variation2.phpt index a486f57367..deb2e82565 100644 --- a/ext/standard/tests/file/fputcsv_variation2.phpt +++ b/ext/standard/tests/file/fputcsv_variation2.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation2.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation3.phpt b/ext/standard/tests/file/fputcsv_variation3.phpt index 0169f715ef..05f29bfc4c 100644 --- a/ext/standard/tests/file/fputcsv_variation3.phpt +++ b/ext/standard/tests/file/fputcsv_variation3.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation3.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation4.phpt b/ext/standard/tests/file/fputcsv_variation4.phpt index 3d24d8502b..0a1a1cb5d7 100644 --- a/ext/standard/tests/file/fputcsv_variation4.phpt +++ b/ext/standard/tests/file/fputcsv_variation4.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation4.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation5.phpt b/ext/standard/tests/file/fputcsv_variation5.phpt index d97cd12582..1a3a37679e 100644 --- a/ext/standard/tests/file/fputcsv_variation5.phpt +++ b/ext/standard/tests/file/fputcsv_variation5.phpt @@ -27,7 +27,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation5.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation6.phpt b/ext/standard/tests/file/fputcsv_variation6.phpt index ac1d0ce19a..2812f53a0a 100644 --- a/ext/standard/tests/file/fputcsv_variation6.phpt +++ b/ext/standard/tests/file/fputcsv_variation6.phpt @@ -30,7 +30,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation6.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation7.phpt b/ext/standard/tests/file/fputcsv_variation7.phpt index ecd8a6bd54..51100b4e5d 100644 --- a/ext/standard/tests/file/fputcsv_variation7.phpt +++ b/ext/standard/tests/file/fputcsv_variation7.phpt @@ -30,7 +30,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation7.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation8.phpt b/ext/standard/tests/file/fputcsv_variation8.phpt index e234f736f6..15f5de8e84 100644 --- a/ext/standard/tests/file/fputcsv_variation8.phpt +++ b/ext/standard/tests/file/fputcsv_variation8.phpt @@ -30,7 +30,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation8.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fputcsv_variation9.phpt b/ext/standard/tests/file/fputcsv_variation9.phpt index ba14c54ba1..db5694b1bf 100644 --- a/ext/standard/tests/file/fputcsv_variation9.phpt +++ b/ext/standard/tests/file/fputcsv_variation9.phpt @@ -28,7 +28,7 @@ $csv_lists = array ( array(':', '&', array('&""""&:&"&:,:":&,&:,,,,')) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fputcsv_variation9.tmp"; $file_modes = array ("r+", "r+b", "r+t", diff --git a/ext/standard/tests/file/fread_basic.phpt b/ext/standard/tests/file/fread_basic.phpt index 5f009f5514..80175ef37f 100644 --- a/ext/standard/tests/file/fread_basic.phpt +++ b/ext/standard/tests/file/fread_basic.phpt @@ -39,8 +39,8 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fread) with file having data of type ". $file_content_type ." --\n"; /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_basic"); - $filename = dirname(__FILE__)."/fread_basic1.tmp"; // this is name of the file created by create_files() + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_basic"); + $filename = __DIR__."/fread_basic1.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fread() on it */ for($inner_loop_counter = 0; diff --git a/ext/standard/tests/file/fread_variation1.phpt b/ext/standard/tests/file/fread_variation1.phpt index 143f3bd123..df9c6da8f5 100644 --- a/ext/standard/tests/file/fread_variation1.phpt +++ b/ext/standard/tests/file/fread_variation1.phpt @@ -63,10 +63,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation"); } - $filename = dirname(__FILE__)."/fread_variation1.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation1.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation2.phpt b/ext/standard/tests/file/fread_variation2.phpt index a0c9320854..a3c8efb0b0 100644 --- a/ext/standard/tests/file/fread_variation2.phpt +++ b/ext/standard/tests/file/fread_variation2.phpt @@ -62,10 +62,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 2); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 2); } - $filename = dirname(__FILE__)."/fread_variation2.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation2.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation3-win32-mb.phpt b/ext/standard/tests/file/fread_variation3-win32-mb.phpt index a25feef5e7..cbc1b6d60b 100644 --- a/ext/standard/tests/file/fread_variation3-win32-mb.phpt +++ b/ext/standard/tests/file/fread_variation3-win32-mb.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "私はガラスを食べられますfread_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "私はガラスを食べられますfread_variation", 3); } - $filename = dirname(__FILE__)."/私はガラスを食べられますfread_variation3.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/私はガラスを食べられますfread_variation3.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation3-win32.phpt b/ext/standard/tests/file/fread_variation3-win32.phpt index 44d6ebd697..d09917207e 100644 --- a/ext/standard/tests/file/fread_variation3-win32.phpt +++ b/ext/standard/tests/file/fread_variation3-win32.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); } - $filename = dirname(__FILE__)."/fread_variation3.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation3.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation3.phpt b/ext/standard/tests/file/fread_variation3.phpt index cd03ec2197..b0b374a4c6 100644 --- a/ext/standard/tests/file/fread_variation3.phpt +++ b/ext/standard/tests/file/fread_variation3.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 3); } - $filename = dirname(__FILE__)."/fread_variation3.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation3.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation4-win32.phpt b/ext/standard/tests/file/fread_variation4-win32.phpt index 6de3bc571f..94328ac542 100644 --- a/ext/standard/tests/file/fread_variation4-win32.phpt +++ b/ext/standard/tests/file/fread_variation4-win32.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); } - $filename = dirname(__FILE__)."/fread_variation4.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation4.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fread_variation4.phpt b/ext/standard/tests/file/fread_variation4.phpt index a77fc56517..538c441f1f 100644 --- a/ext/standard/tests/file/fread_variation4.phpt +++ b/ext/standard/tests/file/fread_variation4.phpt @@ -65,10 +65,10 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { if(!strstr($file_mode,"x")){ /* create files with $file_content_type */ - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); } - $filename = dirname(__FILE__)."/fread_variation4.tmp"; // this is name of the file created by create_files() + $filename = __DIR__."/fread_variation4.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fscanf.phpt b/ext/standard/tests/file/fscanf.phpt index 6d3d0a5b96..7a5a70070e 100644 --- a/ext/standard/tests/file/fscanf.phpt +++ b/ext/standard/tests/file/fscanf.phpt @@ -3,7 +3,7 @@ fscanf() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fscanf.dat"; +$filename = __DIR__."/fscanf.dat"; var_dump(fscanf()); var_dump(fscanf(array())); @@ -60,7 +60,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/fscanf.dat"; +$filename = __DIR__."/fscanf.dat"; unlink($filename); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fscanf_error.phpt b/ext/standard/tests/file/fscanf_error.phpt index db2a881d6c..ea6a91e33d 100644 --- a/ext/standard/tests/file/fscanf_error.phpt +++ b/ext/standard/tests/file/fscanf_error.phpt @@ -8,7 +8,7 @@ Test fscanf() function: error conditions */ echo "*** Testing fscanf() for error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_error.tmp"; $file_handle = fopen($filename, 'w'); @@ -56,7 +56,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_error.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation1.phpt b/ext/standard/tests/file/fscanf_variation1.phpt index d9ccf22192..6463a2700e 100644 --- a/ext/standard/tests/file/fscanf_variation1.phpt +++ b/ext/standard/tests/file/fscanf_variation1.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - return type without third argument /* test fscanf() for its return type */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing fscanf(): for its return type without third argument ***\n"; @@ -34,7 +34,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation1.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation10.phpt b/ext/standard/tests/file/fscanf_variation10.phpt index da3afc3e12..158c6579d9 100644 --- a/ext/standard/tests/file/fscanf_variation10.phpt +++ b/ext/standard/tests/file/fscanf_variation10.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with resource /* Test fscanf() to scan resource type using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation10.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation11.phpt b/ext/standard/tests/file/fscanf_variation11.phpt index c6f16ca7fb..97dfa810a2 100644 --- a/ext/standard/tests/file/fscanf_variation11.phpt +++ b/ext/standard/tests/file/fscanf_variation11.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with arrays /* Test fscanf() to scan arrays using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with arrays ***\n"; @@ -75,7 +75,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation11.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation12.phpt b/ext/standard/tests/file/fscanf_variation12.phpt index 4848a7e030..a76e5b92a4 100644 --- a/ext/standard/tests/file/fscanf_variation12.phpt +++ b/ext/standard/tests/file/fscanf_variation12.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with strings /* Test fscanf() to scan strings using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation12.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation13.phpt b/ext/standard/tests/file/fscanf_variation13.phpt index b0d79bc3a8..8f14e97e32 100644 --- a/ext/standard/tests/file/fscanf_variation13.phpt +++ b/ext/standard/tests/file/fscanf_variation13.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with boolean /* Test fscanf() to scan boolean data using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation13.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation14.phpt b/ext/standard/tests/file/fscanf_variation14.phpt index 7d28d509d1..47caaa3568 100644 --- a/ext/standard/tests/file/fscanf_variation14.phpt +++ b/ext/standard/tests/file/fscanf_variation14.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with strings /* Test fscanf() to scan different strings using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with different string ***\n"; @@ -104,7 +104,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation14.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation15.phpt b/ext/standard/tests/file/fscanf_variation15.phpt index 4ca91ac1fc..f16b697896 100644 --- a/ext/standard/tests/file/fscanf_variation15.phpt +++ b/ext/standard/tests/file/fscanf_variation15.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with float values /* Test fscanf() to scan float values using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with float values ***\n"; @@ -78,7 +78,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation15.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation16.phpt b/ext/standard/tests/file/fscanf_variation16.phpt index a6a7ba7557..a9fd0cf84d 100644 --- a/ext/standard/tests/file/fscanf_variation16.phpt +++ b/ext/standard/tests/file/fscanf_variation16.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with resource /* Test fscanf() to scan resource type using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -73,7 +73,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation16.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation17.phpt b/ext/standard/tests/file/fscanf_variation17.phpt index 3b6051c4e6..4e976c7cb4 100644 --- a/ext/standard/tests/file/fscanf_variation17.phpt +++ b/ext/standard/tests/file/fscanf_variation17.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with arrays /* Test fscanf() to scan arrays using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with arrays ***\n"; @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation17.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation18.phpt b/ext/standard/tests/file/fscanf_variation18.phpt index 6f9fa8099c..3887170b96 100644 --- a/ext/standard/tests/file/fscanf_variation18.phpt +++ b/ext/standard/tests/file/fscanf_variation18.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with integer values /* Test fscanf() to scan integer values using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with integer values ***\n"; @@ -82,7 +82,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation18.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation19.phpt b/ext/standard/tests/file/fscanf_variation19.phpt index db4573961a..5558c7786a 100644 --- a/ext/standard/tests/file/fscanf_variation19.phpt +++ b/ext/standard/tests/file/fscanf_variation19.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - string formats with boolean /* Test fscanf() to scan boolean data using different string format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different string format types with boolean data ***\n"; @@ -66,7 +66,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation19.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation2.phpt b/ext/standard/tests/file/fscanf_variation2.phpt index 19b60ab8e2..7ef77a6754 100644 --- a/ext/standard/tests/file/fscanf_variation2.phpt +++ b/ext/standard/tests/file/fscanf_variation2.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with integer values /* Test fscanf() to scan different integer values using different interger format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with different integer values ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation2.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation20.phpt b/ext/standard/tests/file/fscanf_variation20.phpt index 928cb34d8b..2db263b79f 100644 --- a/ext/standard/tests/file/fscanf_variation20.phpt +++ b/ext/standard/tests/file/fscanf_variation20.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with integer values /* Test fscanf() to scan different integer values using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with different integer values ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation20.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation21.phpt b/ext/standard/tests/file/fscanf_variation21.phpt index 0e714a2e7a..1275064d6a 100644 --- a/ext/standard/tests/file/fscanf_variation21.phpt +++ b/ext/standard/tests/file/fscanf_variation21.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with float values /* Test fscanf() to scan float values using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with float values ***\n"; @@ -78,7 +78,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation21.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation22.phpt b/ext/standard/tests/file/fscanf_variation22.phpt index 2aecf79bca..adb848a908 100644 --- a/ext/standard/tests/file/fscanf_variation22.phpt +++ b/ext/standard/tests/file/fscanf_variation22.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with resource /* Test fscanf() to scan resource type using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -73,7 +73,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation22.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation23.phpt b/ext/standard/tests/file/fscanf_variation23.phpt index b5702106b6..c1b9ca6580 100644 --- a/ext/standard/tests/file/fscanf_variation23.phpt +++ b/ext/standard/tests/file/fscanf_variation23.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with arrays /* Test fscanf() to scan arrays using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with arrays ***\n"; @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation23.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation24.phpt b/ext/standard/tests/file/fscanf_variation24.phpt index decbd03306..eb7053587c 100644 --- a/ext/standard/tests/file/fscanf_variation24.phpt +++ b/ext/standard/tests/file/fscanf_variation24.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with strings /* Test fscanf() to scan strings using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with strings ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation24.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation25.phpt b/ext/standard/tests/file/fscanf_variation25.phpt index 03fb953fe8..41d9bdc009 100644 --- a/ext/standard/tests/file/fscanf_variation25.phpt +++ b/ext/standard/tests/file/fscanf_variation25.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with boolean /* Test fscanf() to scan boolean data using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with boolean data ***\n"; @@ -66,7 +66,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation25.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation26.phpt b/ext/standard/tests/file/fscanf_variation26.phpt index faaed9b2ea..d777e2ce8d 100644 --- a/ext/standard/tests/file/fscanf_variation26.phpt +++ b/ext/standard/tests/file/fscanf_variation26.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - char formats with chars /* Test fscanf() to scan different chars using different char format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different char format types with chars ***\n"; @@ -61,7 +61,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation26.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation27.phpt b/ext/standard/tests/file/fscanf_variation27.phpt index e4db0b7105..1d81190e9b 100644 --- a/ext/standard/tests/file/fscanf_variation27.phpt +++ b/ext/standard/tests/file/fscanf_variation27.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with integer values /* Test fscanf() to scan different integer values using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with different integer values ***\n"; @@ -81,7 +81,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation27.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation28.phpt b/ext/standard/tests/file/fscanf_variation28.phpt index c96377b027..4a791259bc 100644 --- a/ext/standard/tests/file/fscanf_variation28.phpt +++ b/ext/standard/tests/file/fscanf_variation28.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with float values /* Test fscanf() to scan float values using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with float values ***\n"; @@ -79,7 +79,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation28.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation29.phpt b/ext/standard/tests/file/fscanf_variation29.phpt index def96aca51..1db4973290 100644 --- a/ext/standard/tests/file/fscanf_variation29.phpt +++ b/ext/standard/tests/file/fscanf_variation29.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with resource /* Test fscanf() to scan resource type using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation29.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation3.phpt b/ext/standard/tests/file/fscanf_variation3.phpt index 68d50e97a4..225fb6a0de 100644 --- a/ext/standard/tests/file/fscanf_variation3.phpt +++ b/ext/standard/tests/file/fscanf_variation3.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan float values using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with float values ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation3.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation30.phpt b/ext/standard/tests/file/fscanf_variation30.phpt index 0d0639344f..c01f5aa2e6 100644 --- a/ext/standard/tests/file/fscanf_variation30.phpt +++ b/ext/standard/tests/file/fscanf_variation30.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with arrays /* Test fscanf() to scan arrays using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with arrays ***\n"; @@ -75,7 +75,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation30.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation31.phpt b/ext/standard/tests/file/fscanf_variation31.phpt index 335bbcac52..2702fbc535 100644 --- a/ext/standard/tests/file/fscanf_variation31.phpt +++ b/ext/standard/tests/file/fscanf_variation31.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with strings /* Test fscanf() to scan strings using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation31.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation32.phpt b/ext/standard/tests/file/fscanf_variation32.phpt index b9fb3a286f..36f3f56881 100644 --- a/ext/standard/tests/file/fscanf_variation32.phpt +++ b/ext/standard/tests/file/fscanf_variation32.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - octal formats with boolean /* Test fscanf() to scan boolean data using different octal format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different octal format types with boolean data ***\n"; @@ -67,7 +67,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation32.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation33.phpt b/ext/standard/tests/file/fscanf_variation33.phpt index 75379361e6..a444462a09 100644 --- a/ext/standard/tests/file/fscanf_variation33.phpt +++ b/ext/standard/tests/file/fscanf_variation33.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan different integer values using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with different integer values ***\n"; @@ -87,7 +87,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation33.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation34.phpt b/ext/standard/tests/file/fscanf_variation34.phpt index 1d5ae68202..a2d1ffdf01 100644 --- a/ext/standard/tests/file/fscanf_variation34.phpt +++ b/ext/standard/tests/file/fscanf_variation34.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan float values using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with float values ***\n"; @@ -84,7 +84,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation34.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation35.phpt b/ext/standard/tests/file/fscanf_variation35.phpt index 2910e030ff..445280c2fd 100644 --- a/ext/standard/tests/file/fscanf_variation35.phpt +++ b/ext/standard/tests/file/fscanf_variation35.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with resource /* Test fscanf() to scan resource type using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation35.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation36.phpt b/ext/standard/tests/file/fscanf_variation36.phpt index 7f52bf5acd..9eb617077d 100644 --- a/ext/standard/tests/file/fscanf_variation36.phpt +++ b/ext/standard/tests/file/fscanf_variation36.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with arrays /* Test fscanf() to scan arrays using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation36.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation37.phpt b/ext/standard/tests/file/fscanf_variation37.phpt index 47481b6dd1..9acdfa489c 100644 --- a/ext/standard/tests/file/fscanf_variation37.phpt +++ b/ext/standard/tests/file/fscanf_variation37.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with strings /* Test fscanf() to scan strings using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation37.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation38.phpt b/ext/standard/tests/file/fscanf_variation38.phpt index 410fe768c2..eabe5a05b4 100644 --- a/ext/standard/tests/file/fscanf_variation38.phpt +++ b/ext/standard/tests/file/fscanf_variation38.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - hexa formats with boolean /* Test fscanf() to scan boolean data using different hexa format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different hexa format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation38.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation39.phpt b/ext/standard/tests/file/fscanf_variation39.phpt index b2eda4ab73..011a714e1c 100644 --- a/ext/standard/tests/file/fscanf_variation39.phpt +++ b/ext/standard/tests/file/fscanf_variation39.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan different integer values using different unsigned int format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned int format types with different integer values ***\n"; @@ -82,7 +82,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation39.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation4.phpt b/ext/standard/tests/file/fscanf_variation4.phpt index 20656d9f56..b802a90da3 100644 --- a/ext/standard/tests/file/fscanf_variation4.phpt +++ b/ext/standard/tests/file/fscanf_variation4.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with resource /* Test fscanf() to scan resource type using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with resource ***\n"; @@ -24,7 +24,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation4.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation40.phpt b/ext/standard/tests/file/fscanf_variation40.phpt index 53245e6519..c65aaac9c7 100644 --- a/ext/standard/tests/file/fscanf_variation40.phpt +++ b/ext/standard/tests/file/fscanf_variation40.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan float values using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with float values ***\n"; @@ -80,7 +80,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation40.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation41.phpt b/ext/standard/tests/file/fscanf_variation41.phpt index 62e8de46d7..487954097f 100644 --- a/ext/standard/tests/file/fscanf_variation41.phpt +++ b/ext/standard/tests/file/fscanf_variation41.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with resource /* Test fscanf() to scan resource type using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation41.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation42.phpt b/ext/standard/tests/file/fscanf_variation42.phpt index 6f993ae56a..45cf3696b5 100644 --- a/ext/standard/tests/file/fscanf_variation42.phpt +++ b/ext/standard/tests/file/fscanf_variation42.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with arrays /* Test fscanf() to scan arrays using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation42.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation43.phpt b/ext/standard/tests/file/fscanf_variation43.phpt index 4d4197d70f..bc19326e62 100644 --- a/ext/standard/tests/file/fscanf_variation43.phpt +++ b/ext/standard/tests/file/fscanf_variation43.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with strings /* Test fscanf() to scan strings using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation43.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation44.phpt b/ext/standard/tests/file/fscanf_variation44.phpt index 37ee0274d4..6c61ba9507 100644 --- a/ext/standard/tests/file/fscanf_variation44.phpt +++ b/ext/standard/tests/file/fscanf_variation44.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - unsigned formats with boolean /* Test fscanf() to scan boolean data using different unsigned format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different unsigned format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation44.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation45.phpt b/ext/standard/tests/file/fscanf_variation45.phpt index faf4820160..87192cbb7c 100644 --- a/ext/standard/tests/file/fscanf_variation45.phpt +++ b/ext/standard/tests/file/fscanf_variation45.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with integer value /* Test fscanf() to scan different integer values using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with different integer values ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation45.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation46.phpt b/ext/standard/tests/file/fscanf_variation46.phpt index 4206e37730..690918bdf1 100644 --- a/ext/standard/tests/file/fscanf_variation46.phpt +++ b/ext/standard/tests/file/fscanf_variation46.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with float values /* Test fscanf() to scan float values using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with float values ***\n"; @@ -74,7 +74,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation46.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation47.phpt b/ext/standard/tests/file/fscanf_variation47.phpt index 362f7cbe73..6217b32b61 100644 --- a/ext/standard/tests/file/fscanf_variation47.phpt +++ b/ext/standard/tests/file/fscanf_variation47.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with resource /* Test fscanf() to scan resource type using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with resource ***\n"; @@ -23,7 +23,7 @@ if($file_handle == false) // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_types = array ( @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation47.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation48.phpt b/ext/standard/tests/file/fscanf_variation48.phpt index b2412fa9b8..355d5cf187 100644 --- a/ext/standard/tests/file/fscanf_variation48.phpt +++ b/ext/standard/tests/file/fscanf_variation48.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with arrays /* Test fscanf() to scan arrays using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation48.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation49.phpt b/ext/standard/tests/file/fscanf_variation49.phpt index ba5b77a7b4..5355db9a5a 100644 --- a/ext/standard/tests/file/fscanf_variation49.phpt +++ b/ext/standard/tests/file/fscanf_variation49.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with strings /* Test fscanf() to scan strings using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation49.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation5.phpt b/ext/standard/tests/file/fscanf_variation5.phpt index 44f59a0a23..714a54b912 100644 --- a/ext/standard/tests/file/fscanf_variation5.phpt +++ b/ext/standard/tests/file/fscanf_variation5.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with arrays /* Test fscanf() to scan arrays using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with arrays ***\n"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation5.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation50.phpt b/ext/standard/tests/file/fscanf_variation50.phpt index 9c659d8a2d..4853ba10ca 100644 --- a/ext/standard/tests/file/fscanf_variation50.phpt +++ b/ext/standard/tests/file/fscanf_variation50.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - scientific formats with boolean /* Test fscanf() to scan boolean data using different scientific format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different scientific format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation50.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation51.phpt b/ext/standard/tests/file/fscanf_variation51.phpt index 93fd4d545c..d03ba68896 100644 --- a/ext/standard/tests/file/fscanf_variation51.phpt +++ b/ext/standard/tests/file/fscanf_variation51.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - file opened in write only mode /* Test fscanf() to scan a file for read when file is opened inwrite only mode */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read from a file opened in write only mode ***\n"; @@ -59,7 +59,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation51.tmp"; if(file_exists($filename)) { unlink($filename); diff --git a/ext/standard/tests/file/fscanf_variation52.phpt b/ext/standard/tests/file/fscanf_variation52.phpt index 92e9cf27d5..522eef0493 100644 --- a/ext/standard/tests/file/fscanf_variation52.phpt +++ b/ext/standard/tests/file/fscanf_variation52.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - empty file /* Test fscanf() to scan an empty file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read an empty file ***\n"; @@ -57,7 +57,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation52.tmp"; if(file_exists($filename)) { unlink($filename); diff --git a/ext/standard/tests/file/fscanf_variation53.phpt b/ext/standard/tests/file/fscanf_variation53.phpt index 874385f6b3..5935a8a3cf 100644 --- a/ext/standard/tests/file/fscanf_variation53.phpt +++ b/ext/standard/tests/file/fscanf_variation53.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - file pointer pointing to EOF /* Test fscanf() to read a file when file pointer is pointing to EOF */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read a file when file pointer is pointing to EOF ***\n"; @@ -72,7 +72,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation53.tmp"; if(file_exists($filename)) { unlink($filename); diff --git a/ext/standard/tests/file/fscanf_variation54.phpt b/ext/standard/tests/file/fscanf_variation54.phpt index 2d50f32cf0..9833fa2872 100644 --- a/ext/standard/tests/file/fscanf_variation54.phpt +++ b/ext/standard/tests/file/fscanf_variation54.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - objects /* Test fscanf() to scan a file to read objects */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): to read objects from a file ***\n"; @@ -60,7 +60,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation54.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation55.phpt b/ext/standard/tests/file/fscanf_variation55.phpt index 829eba46fa..359359d07f 100644 --- a/ext/standard/tests/file/fscanf_variation55.phpt +++ b/ext/standard/tests/file/fscanf_variation55.phpt @@ -19,7 +19,7 @@ if (PHP_INT_SIZE != 4) { tracking the file pointer movement along with reading */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): tracking file pointer along with reading data from file ***\n"; @@ -90,7 +90,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation55.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation6.phpt b/ext/standard/tests/file/fscanf_variation6.phpt index 71992c327c..f2038cd1c8 100644 --- a/ext/standard/tests/file/fscanf_variation6.phpt +++ b/ext/standard/tests/file/fscanf_variation6.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with strings /* Test fscanf() to scan strings using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with strings ***\n"; @@ -76,7 +76,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation6.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation7.phpt b/ext/standard/tests/file/fscanf_variation7.phpt index 8f0c5aff97..5be2436607 100644 --- a/ext/standard/tests/file/fscanf_variation7.phpt +++ b/ext/standard/tests/file/fscanf_variation7.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - integer formats with boolean /* Test fscanf() to scan boolean data using different integer format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different integer format types with boolean data ***\n"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation7.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation8.phpt b/ext/standard/tests/file/fscanf_variation8.phpt index adce2e2482..cd7dd35fd9 100644 --- a/ext/standard/tests/file/fscanf_variation8.phpt +++ b/ext/standard/tests/file/fscanf_variation8.phpt @@ -10,7 +10,7 @@ Test fscanf() function: usage variations - float formats with float values /* Test fscanf() to scan different float values using different format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with different float values ***\n"; @@ -94,7 +94,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation8.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fscanf_variation9.phpt b/ext/standard/tests/file/fscanf_variation9.phpt index d1218c8a55..40470db064 100644 --- a/ext/standard/tests/file/fscanf_variation9.phpt +++ b/ext/standard/tests/file/fscanf_variation9.phpt @@ -16,7 +16,7 @@ if (PHP_INT_SIZE != 4) { /* Test fscanf() to scan integer values using different float format types */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test fscanf(): different float format types with integer values ***\n"; @@ -83,7 +83,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/fscanf_variation9.tmp"; unlink($filename); ?> diff --git a/ext/standard/tests/file/fseek_dir_basic.phpt b/ext/standard/tests/file/fseek_dir_basic.phpt index cde0bf2579..e2f9f5b84c 100644 --- a/ext/standard/tests/file/fseek_dir_basic.phpt +++ b/ext/standard/tests/file/fseek_dir_basic.phpt @@ -4,9 +4,9 @@ Testing fseek() on a directory stream <?php // include the file.inc for Function: function create_files() -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); -$path = dirname(__FILE__) . '/fseek_dir_basic'; +$path = __DIR__ . '/fseek_dir_basic'; mkdir($path); create_files($path, 3); diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt index 41ce37ccf7..9b2fa584f6 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic1.phpt @@ -24,7 +24,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic1.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic1.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; @@ -32,7 +32,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_basic" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_basic" ,1,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt index 4b88ee0720..2df98b4a8a 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32-mb.phpt @@ -31,7 +31,7 @@ $file_content_types = array("text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic2私はガラスを食べられます.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic2私はガラスを食べられます.tmp"; // this is name of the file created by create_files() foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt index 278f640a6c..2674fb7697 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2-win32.phpt @@ -31,7 +31,7 @@ $file_content_types = array("text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt index 79bbe5b50f..5b1ca5fea5 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_basic2.phpt @@ -31,7 +31,7 @@ $file_content_types = array("text_with_new_line","alphanumeric"); $whence_set = array(SEEK_SET,SEEK_CUR,SEEK_END); $whence_string = array("SEEK_SET", "SEEK_CUR", "SEEK_END"); -$filename = dirname(__FILE__)."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_basic2.tmp"; // this is name of the file created by create_files() foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt index 80228bbbec..4eee279fd1 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation1.phpt @@ -26,7 +26,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 513); // different offsets, including negative and beyond size -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation1.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation1.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ @@ -35,7 +35,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" ,1,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt index 54df01e743..cf962e4676 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2-win32.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 513); // different offsets, including negative and beyond size -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt index bb3f40c220..5d8caf173f 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation2.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 513); // different offsets, including negative and beyond size -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation2.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt index d6c5951e83..e46f7bc085 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation3.phpt @@ -28,7 +28,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation3.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation3.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ echo "*** Testing fseek() with whence = SEEK_SET ***\n"; @@ -37,7 +37,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation", + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation", 3, "bytes", ".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt index dbf579f516..bba1f9bb0c 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4-win32.phpt @@ -31,7 +31,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt index 946b23e65e..a56d50fab8 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation4.phpt @@ -31,7 +31,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation4.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt index 864e7eda49..24a8ba6a46 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation5.phpt @@ -27,7 +27,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1, 0, 1, 512, 600);// different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation5.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation5.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ @@ -35,7 +35,7 @@ foreach($file_content_types as $file_content_type){ foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" ,5,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt index 83c6e4dcd6..a4365f0621 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6-win32.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt index 16aeb39dba..7187738db8 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation6.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation6.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt index 3869e35166..449fe44b0d 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation7.phpt @@ -28,14 +28,14 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600);// different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation7.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation7.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ echo "\n-- File having data of type ". $file_content_type ." --\n"; foreach($file_modes as $file_mode) { echo "-- File opened in mode ".$file_mode." --\n"; - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" + create_files ( __DIR__, 1, $file_content_type, 0755, 512, "w", "fseek_ftell_rewind_variation" ,7,"bytes",".tmp"); //create a file with 512 bytes size $file_handle = fopen($filename, $file_mode); if (!$file_handle) { diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt index d54c46f32a..a0a90a4d89 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8-win32.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt index 28b52da206..82d4359bd3 100644 --- a/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt +++ b/ext/standard/tests/file/fseek_ftell_rewind_variation8.phpt @@ -32,7 +32,7 @@ $file_content_types = array( "text_with_new_line","alphanumeric"); $offset = array(-1,0,1,512,600); // different offsets -$filename = dirname(__FILE__)."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() +$filename = __DIR__."/fseek_ftell_rewind_variation8.tmp"; // this is name of the file created by create_files() /* open the file using $files_modes and perform fseek(),ftell() and rewind() on it */ foreach($file_content_types as $file_content_type){ diff --git a/ext/standard/tests/file/fstat.phpt b/ext/standard/tests/file/fstat.phpt index 94ba9c5abf..415124046e 100644 --- a/ext/standard/tests/file/fstat.phpt +++ b/ext/standard/tests/file/fstat.phpt @@ -3,7 +3,7 @@ fstat() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fstat.dat"; +$filename = __DIR__."/fstat.dat"; $fp = fopen($filename, "w"); var_dump(fstat($fp)); diff --git a/ext/standard/tests/file/ftruncate.phpt b/ext/standard/tests/file/ftruncate.phpt Binary files differindex 67b070c836..3779cf3378 100644 --- a/ext/standard/tests/file/ftruncate.phpt +++ b/ext/standard/tests/file/ftruncate.phpt diff --git a/ext/standard/tests/file/ftruncate_bug76422.phpt b/ext/standard/tests/file/ftruncate_bug76422.phpt index b149f02c64..4f434d324a 100644 --- a/ext/standard/tests/file/ftruncate_bug76422.phpt +++ b/ext/standard/tests/file/ftruncate_bug76422.phpt @@ -9,7 +9,7 @@ if (PHP_INT_SIZE < 8) { --FILE-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test76422"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test76422"; $file_handle = fopen($fn,'cb'); @@ -29,7 +29,7 @@ var_dump(filesize($fn) >= $truncate_offset); ?> --CLEAN-- <?php -$fn = dirname(__FILE__) . "/test76422"; +$fn = __DIR__ . "/test76422"; unlink($fn); ?> --EXPECT-- diff --git a/ext/standard/tests/file/ftruncate_bug76803.phpt b/ext/standard/tests/file/ftruncate_bug76803.phpt index fe261e8861..df7136f1ca 100644 --- a/ext/standard/tests/file/ftruncate_bug76803.phpt +++ b/ext/standard/tests/file/ftruncate_bug76803.phpt @@ -3,7 +3,7 @@ Bug #76803 ftruncate changes file pointer --FILE-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test76803"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test76803"; $f = fopen($fn, "w"); fwrite($f, "Hello"); @@ -29,7 +29,7 @@ fclose($f); ?> --CLEAN-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test76803"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test76803"; unlink($fn); ?> --EXPECT-- diff --git a/ext/standard/tests/file/ftruncate_bug77081.phpt b/ext/standard/tests/file/ftruncate_bug77081.phpt index 7a9aa691fb..b834080227 100644 --- a/ext/standard/tests/file/ftruncate_bug77081.phpt +++ b/ext/standard/tests/file/ftruncate_bug77081.phpt @@ -3,7 +3,7 @@ Bug #77081 ftruncate() changes seek pointer in c mode --FILE-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test77081"; +$filename = __DIR__ . DIRECTORY_SEPARATOR . "test77081"; file_put_contents($filename, 'foo'); $stream = fopen($filename, 'c'); @@ -16,7 +16,7 @@ var_dump(file_get_contents($filename)); ?> --CLEAN-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test77081"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "test77081"; unlink($fn); ?> --EXPECT-- diff --git a/ext/standard/tests/file/ftruncate_error.phpt b/ext/standard/tests/file/ftruncate_error.phpt index 3cb6db27f8..61ba1fc509 100644 --- a/ext/standard/tests/file/ftruncate_error.phpt +++ b/ext/standard/tests/file/ftruncate_error.phpt @@ -9,7 +9,7 @@ Test ftruncate() function : error conditions echo "*** Testing ftruncate() : error conditions ***\n"; -$filename = dirname(__FILE__)."/ftruncate_error.tmp"; +$filename = __DIR__."/ftruncate_error.tmp"; $file_handle = fopen($filename, "w" ); fwrite($file_handle, "Testing ftruncate error conditions \n"); fflush($file_handle); @@ -67,7 +67,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/ftruncate_error.tmp"; +$filename = __DIR__."/ftruncate_error.tmp"; unlink( $filename ); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt b/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt index abfb8e6888..0cd33d6512 100644 --- a/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/ftruncate_variation1-win32-mb.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation1私はガラスを食べられます1.tmp"; + $filename = __DIR__."/ftruncate_variation1私はガラスを食べられます1.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation1私はガラスを食べられます"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation1私はガラスを食べられます"); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation1-win32.phpt b/ext/standard/tests/file/ftruncate_variation1-win32.phpt index bc512aa5c8..2ce57bff86 100644 --- a/ext/standard/tests/file/ftruncate_variation1-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation1-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation1.tmp"; + $filename = __DIR__."/ftruncate_variation1.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation1.phpt b/ext/standard/tests/file/ftruncate_variation1.phpt index 426746de8b..b92d2be7e0 100644 --- a/ext/standard/tests/file/ftruncate_variation1.phpt +++ b/ext/standard/tests/file/ftruncate_variation1.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation1.tmp"; + $filename = __DIR__."/ftruncate_variation1.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation"); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation2-win32.phpt b/ext/standard/tests/file/ftruncate_variation2-win32.phpt index de7b088320..ac485497fb 100644 --- a/ext/standard/tests/file/ftruncate_variation2-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation2-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation2.tmp"; + $filename = __DIR__."/ftruncate_variation2.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation2.phpt b/ext/standard/tests/file/ftruncate_variation2.phpt index ac5a2316cd..f08614d182 100644 --- a/ext/standard/tests/file/ftruncate_variation2.phpt +++ b/ext/standard/tests/file/ftruncate_variation2.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation2.tmp"; + $filename = __DIR__."/ftruncate_variation2.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 2); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation3-win32.phpt b/ext/standard/tests/file/ftruncate_variation3-win32.phpt index b275d5f462..e89372bb1f 100644 --- a/ext/standard/tests/file/ftruncate_variation3-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation3-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation3.tmp"; + $filename = __DIR__."/ftruncate_variation3.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation3.phpt b/ext/standard/tests/file/ftruncate_variation3.phpt index 70ea90d18a..91511fd10a 100644 --- a/ext/standard/tests/file/ftruncate_variation3.phpt +++ b/ext/standard/tests/file/ftruncate_variation3.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation3.tmp"; + $filename = __DIR__."/ftruncate_variation3.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 3); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation4-win32.phpt b/ext/standard/tests/file/ftruncate_variation4-win32.phpt index 18d5138baf..e2e92269e7 100644 --- a/ext/standard/tests/file/ftruncate_variation4-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation4-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation4.tmp"; + $filename = __DIR__."/ftruncate_variation4.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation4.phpt b/ext/standard/tests/file/ftruncate_variation4.phpt index 077b46fd05..3d06d1eb8e 100644 --- a/ext/standard/tests/file/ftruncate_variation4.phpt +++ b/ext/standard/tests/file/ftruncate_variation4.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation4.tmp"; + $filename = __DIR__."/ftruncate_variation4.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 4); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation5-win32.phpt b/ext/standard/tests/file/ftruncate_variation5-win32.phpt index 9bec15dca3..e796129658 100644 --- a/ext/standard/tests/file/ftruncate_variation5-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation5-win32.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation5.tmp"; + $filename = __DIR__."/ftruncate_variation5.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation5.phpt b/ext/standard/tests/file/ftruncate_variation5.phpt index 7df84c9b17..a072d1a7e3 100644 --- a/ext/standard/tests/file/ftruncate_variation5.phpt +++ b/ext/standard/tests/file/ftruncate_variation5.phpt @@ -33,13 +33,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation5.tmp"; + $filename = __DIR__."/ftruncate_variation5.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 5); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation6-win32.phpt b/ext/standard/tests/file/ftruncate_variation6-win32.phpt index 6686c80944..710a6ed731 100644 --- a/ext/standard/tests/file/ftruncate_variation6-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation6-win32.phpt @@ -35,13 +35,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation6.tmp"; + $filename = __DIR__."/ftruncate_variation6.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation6.phpt b/ext/standard/tests/file/ftruncate_variation6.phpt index a8bce476e0..5e492763ab 100644 --- a/ext/standard/tests/file/ftruncate_variation6.phpt +++ b/ext/standard/tests/file/ftruncate_variation6.phpt @@ -35,13 +35,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation6.tmp"; + $filename = __DIR__."/ftruncate_variation6.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 6); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation7-win32.phpt b/ext/standard/tests/file/ftruncate_variation7-win32.phpt index cdb77673b7..1d367669cd 100644 --- a/ext/standard/tests/file/ftruncate_variation7-win32.phpt +++ b/ext/standard/tests/file/ftruncate_variation7-win32.phpt @@ -34,13 +34,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation7.tmp"; + $filename = __DIR__."/ftruncate_variation7.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/ftruncate_variation7.phpt b/ext/standard/tests/file/ftruncate_variation7.phpt index 38f70cb227..5e8b431bfa 100644 --- a/ext/standard/tests/file/ftruncate_variation7.phpt +++ b/ext/standard/tests/file/ftruncate_variation7.phpt @@ -34,13 +34,13 @@ foreach($file_content_types as $file_content_type) { echo "-- Testing ftruncate() with file opening using $file_modes[$mode_counter] mode --\n"; // create 1 file with some contents - $filename = dirname(__FILE__)."/ftruncate_variation7.tmp"; + $filename = __DIR__."/ftruncate_variation7.tmp"; if( strstr($file_modes[$mode_counter], "x") || strstr($file_modes[$mode_counter], "w") ) { // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); fill_file($file_handle, $file_content_type, 1024); } else { - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "ftruncate_variation", 7); // fopen the file using the $file_modes $file_handle = fopen($filename, $file_modes[$mode_counter]); } diff --git a/ext/standard/tests/file/fwrite.phpt b/ext/standard/tests/file/fwrite.phpt index 443710b99d..0ea130da1e 100644 --- a/ext/standard/tests/file/fwrite.phpt +++ b/ext/standard/tests/file/fwrite.phpt @@ -3,7 +3,7 @@ fwrite() tests --FILE-- <?php -$filename = dirname(__FILE__)."/fwrite.dat"; +$filename = __DIR__."/fwrite.dat"; $fp = fopen($filename, "w"); var_dump(fwrite($fp)); diff --git a/ext/standard/tests/file/fwrite_basic-win32-mb.phpt b/ext/standard/tests/file/fwrite_basic-win32-mb.phpt index fa20f3c870..8dde247c43 100644 --- a/ext/standard/tests/file/fwrite_basic-win32-mb.phpt +++ b/ext/standard/tests/file/fwrite_basic-win32-mb.phpt @@ -29,7 +29,7 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fwrite() with file having data of type ". $file_content_type ." --\n"; - $filename = dirname(__FILE__)."/fwrite_basic-win32私はガラスを食べられます.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_basic-win32私はガラスを食べられます.tmp"; // this is name of the file for($inner_loop_counter = 0; $inner_loop_counter < count($file_modes); diff --git a/ext/standard/tests/file/fwrite_basic-win32.phpt b/ext/standard/tests/file/fwrite_basic-win32.phpt index c922159327..de7754ddad 100644 --- a/ext/standard/tests/file/fwrite_basic-win32.phpt +++ b/ext/standard/tests/file/fwrite_basic-win32.phpt @@ -29,7 +29,7 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fwrite() with file having data of type ". $file_content_type ." --\n"; - $filename = dirname(__FILE__)."/fwrite_basic-win32.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_basic-win32.tmp"; // this is name of the file for($inner_loop_counter = 0; $inner_loop_counter < count($file_modes); diff --git a/ext/standard/tests/file/fwrite_basic.phpt b/ext/standard/tests/file/fwrite_basic.phpt index e41d08c424..07af967a58 100644 --- a/ext/standard/tests/file/fwrite_basic.phpt +++ b/ext/standard/tests/file/fwrite_basic.phpt @@ -29,7 +29,7 @@ $file_content_types = array("numeric","text","text_with_new_line","alphanumeric" foreach($file_content_types as $file_content_type) { echo "\n-- Testing fwrite() with file having data of type ". $file_content_type ." --\n"; - $filename = dirname(__FILE__)."/fwrite_basic.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_basic.tmp"; // this is name of the file for($inner_loop_counter = 0; $inner_loop_counter < count($file_modes); diff --git a/ext/standard/tests/file/fwrite_error.phpt b/ext/standard/tests/file/fwrite_error.phpt index f4f691be35..a54550a6c8 100644 --- a/ext/standard/tests/file/fwrite_error.phpt +++ b/ext/standard/tests/file/fwrite_error.phpt @@ -15,7 +15,7 @@ include ("file.inc"); echo "*** Testing fwrite() : error conditions ***\n"; -$filename = dirname(__FILE__)."/fwrite_error.tmp"; +$filename = __DIR__."/fwrite_error.tmp"; echo "-- Testing fwrite() with less than expected number of arguments --\n"; // zero argument @@ -66,7 +66,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$filename = dirname(__FILE__)."/fwrite_error.tmp"; +$filename = __DIR__."/fwrite_error.tmp"; unlink( $filename ); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt b/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt index f368513d10..a472dfb2a8 100644 --- a/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/fwrite_variation1-win32-mb.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create the temp file with content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation1私はガラスを食べられます1.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation1私はガラスを食べられます"); + $filename = __DIR__."/fwrite_variation1私はガラスを食べられます1.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation1私はガラスを食べられます"); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation1-win32.phpt b/ext/standard/tests/file/fwrite_variation1-win32.phpt index 28559af0c9..ec79b4bd6f 100644 --- a/ext/standard/tests/file/fwrite_variation1-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation1-win32.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create the temp file with content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation1.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); + $filename = __DIR__."/fwrite_variation1.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation1.phpt b/ext/standard/tests/file/fwrite_variation1.phpt index 5e2c0472c7..52f41b5509 100644 --- a/ext/standard/tests/file/fwrite_variation1.phpt +++ b/ext/standard/tests/file/fwrite_variation1.phpt @@ -38,8 +38,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create the temp file with content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation1.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); + $filename = __DIR__."/fwrite_variation1.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation"); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation2-win32.phpt b/ext/standard/tests/file/fwrite_variation2-win32.phpt index f2d67c19fc..aa04e777dc 100644 --- a/ext/standard/tests/file/fwrite_variation2-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation2-win32.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill the data of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation2.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); + $filename = __DIR__."/fwrite_variation2.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation2.phpt b/ext/standard/tests/file/fwrite_variation2.phpt index 82061a019c..639231e0f6 100644 --- a/ext/standard/tests/file/fwrite_variation2.phpt +++ b/ext/standard/tests/file/fwrite_variation2.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill the data of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation2.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); + $filename = __DIR__."/fwrite_variation2.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 2); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation3-win32.phpt b/ext/standard/tests/file/fwrite_variation3-win32.phpt index 3edd3d6a5a..89fb44088d 100644 --- a/ext/standard/tests/file/fwrite_variation3-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation3-win32.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill it content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation3.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); + $filename = __DIR__."/fwrite_variation3.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation3.phpt b/ext/standard/tests/file/fwrite_variation3.phpt index 9d1c16af2b..509b21eb03 100644 --- a/ext/standard/tests/file/fwrite_variation3.phpt +++ b/ext/standard/tests/file/fwrite_variation3.phpt @@ -39,8 +39,8 @@ foreach($file_content_types as $file_content_type) { echo "-- Opening file in $file_mode --\n"; // create temp file and fill it content of type $file_content_type - $filename = dirname(__FILE__)."/fwrite_variation3.tmp"; // this is name of the file - create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); + $filename = __DIR__."/fwrite_variation3.tmp"; // this is name of the file + create_files ( __DIR__, 1, $file_content_type, 0755, 1, "w", "fwrite_variation", 3); $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation4-win32.phpt b/ext/standard/tests/file/fwrite_variation4-win32.phpt index bf50c4f9c7..094b11776b 100644 --- a/ext/standard/tests/file/fwrite_variation4-win32.phpt +++ b/ext/standard/tests/file/fwrite_variation4-win32.phpt @@ -38,7 +38,7 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { echo "-- Opening file in $file_mode --\n"; - $filename = dirname(__FILE__)."/fwrite_variation4.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_variation4.tmp"; // this is name of the file $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/fwrite_variation4.phpt b/ext/standard/tests/file/fwrite_variation4.phpt index 65268afdd4..bbf5602a20 100644 --- a/ext/standard/tests/file/fwrite_variation4.phpt +++ b/ext/standard/tests/file/fwrite_variation4.phpt @@ -38,7 +38,7 @@ foreach($file_content_types as $file_content_type) { foreach($file_modes as $file_mode) { echo "-- Opening file in $file_mode --\n"; - $filename = dirname(__FILE__)."/fwrite_variation4.tmp"; // this is name of the file + $filename = __DIR__."/fwrite_variation4.tmp"; // this is name of the file $file_handle = fopen($filename, $file_mode); if(!$file_handle) { diff --git a/ext/standard/tests/file/glob_basic.phpt b/ext/standard/tests/file/glob_basic.phpt index fc269c442f..b130afc95f 100644 --- a/ext/standard/tests/file/glob_basic.phpt +++ b/ext/standard/tests/file/glob_basic.phpt @@ -8,7 +8,7 @@ Test glob() function: basic functions echo "*** Testing glob() : basic functions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dirname used here $dirname = "$file_path/glob_basic"; @@ -41,7 +41,7 @@ function sort_var_dump($results) { ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/glob_basic/wonder12345"); unlink("$file_path/glob_basic/wonder.txt"); unlink("$file_path/glob_basic/file.text"); diff --git a/ext/standard/tests/file/glob_variation-win32-mb.phpt b/ext/standard/tests/file/glob_variation-win32-mb.phpt index cba2e2b343..fd068b01ad 100644 --- a/ext/standard/tests/file/glob_variation-win32-mb.phpt +++ b/ext/standard/tests/file/glob_variation-win32-mb.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing glob() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created //mkdir("$file_path/glob_variation"); @@ -81,7 +81,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/glob_variation私はガラスを食べられます/wonder1/wonder2"); rmdir("$file_path/glob_variation私はガラスを食べられます/wonder1/"); rmdir("$file_path/glob_variation私はガラスを食べられます/"); diff --git a/ext/standard/tests/file/glob_variation-win32.phpt b/ext/standard/tests/file/glob_variation-win32.phpt index 5027ac03e6..9a1528bb1f 100644 --- a/ext/standard/tests/file/glob_variation-win32.phpt +++ b/ext/standard/tests/file/glob_variation-win32.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing glob() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created mkdir("$file_path/glob_variation"); @@ -80,7 +80,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/glob_variation/wonder1/wonder2"); rmdir("$file_path/glob_variation/wonder1/"); rmdir("$file_path/glob_variation/"); diff --git a/ext/standard/tests/file/glob_variation.phpt b/ext/standard/tests/file/glob_variation.phpt index 9d3b879379..056cf62bec 100644 --- a/ext/standard/tests/file/glob_variation.phpt +++ b/ext/standard/tests/file/glob_variation.phpt @@ -17,7 +17,7 @@ if (!defined('GLOB_BRACE')) { echo "*** Testing glob() : usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created mkdir("$file_path/glob_variation"); @@ -83,7 +83,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/glob_variation/wonder1/wonder2"); rmdir("$file_path/glob_variation/wonder1/"); rmdir("$file_path/glob_variation/"); diff --git a/ext/standard/tests/file/glob_variation2.phpt b/ext/standard/tests/file/glob_variation2.phpt index f95fd17e7a..297db00dba 100644 --- a/ext/standard/tests/file/glob_variation2.phpt +++ b/ext/standard/tests/file/glob_variation2.phpt @@ -6,7 +6,7 @@ Test glob() function with relative path Description: Find pathnames matching a pattern */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dirname used here $dir_name = 'glob_test'; @@ -32,7 +32,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/glob_test/file.text"); rmdir("$file_path/glob_test/"); ?> diff --git a/ext/standard/tests/file/glob_variation3.phpt b/ext/standard/tests/file/glob_variation3.phpt index c50f8a81b8..5db242825e 100644 --- a/ext/standard/tests/file/glob_variation3.phpt +++ b/ext/standard/tests/file/glob_variation3.phpt @@ -2,7 +2,7 @@ Test glob() function: ensure no platform difference --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', NULL); diff --git a/ext/standard/tests/file/glob_variation4.phpt b/ext/standard/tests/file/glob_variation4.phpt index 00d8f648aa..6544c96944 100644 --- a/ext/standard/tests/file/glob_variation4.phpt +++ b/ext/standard/tests/file/glob_variation4.phpt @@ -2,7 +2,7 @@ Test glob() function: ensure no platform difference, variation 2 --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', $path); diff --git a/ext/standard/tests/file/glob_variation5.phpt b/ext/standard/tests/file/glob_variation5.phpt index 10db40099b..800305aabd 100644 --- a/ext/standard/tests/file/glob_variation5.phpt +++ b/ext/standard/tests/file/glob_variation5.phpt @@ -4,7 +4,7 @@ Test glob() function: ensure no platform difference, variation 3 <?php if( substr(PHP_OS, 0, 3) == "WIN" ) {die('skip not valid on Windows');} ?> --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', '/tmp'); diff --git a/ext/standard/tests/file/glob_variation6.phpt b/ext/standard/tests/file/glob_variation6.phpt index 9cd9c2b353..e0eaeb8c6e 100644 --- a/ext/standard/tests/file/glob_variation6.phpt +++ b/ext/standard/tests/file/glob_variation6.phpt @@ -4,7 +4,7 @@ Test glob() function: ensure no platform difference, variation 4 <?php if( substr(PHP_OS, 0, 3) != "WIN" ) {die('skip only valid on Windows');} ?> --FILE-- <?php -$path = dirname(__FILE__); +$path = __DIR__; ini_set('open_basedir', 'c:\\windows'); diff --git a/ext/standard/tests/file/is_dir_basic.phpt b/ext/standard/tests/file/is_dir_basic.phpt index 7582a502a7..ceaa34df9b 100644 --- a/ext/standard/tests/file/is_dir_basic.phpt +++ b/ext/standard/tests/file/is_dir_basic.phpt @@ -8,7 +8,7 @@ Test is_dir() function: basic functionality */ echo "*** Testing is_dir(): basic functionality ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( is_dir($file_path) ); clearstatcache(); var_dump( is_dir(".") ); @@ -26,7 +26,7 @@ echo "*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_dir_basic"; rmdir($dir_name); ?> diff --git a/ext/standard/tests/file/is_dir_variation1.phpt b/ext/standard/tests/file/is_dir_variation1.phpt index 96bafacfda..90084f32e9 100644 --- a/ext/standard/tests/file/is_dir_variation1.phpt +++ b/ext/standard/tests/file/is_dir_variation1.phpt @@ -9,7 +9,7 @@ Test is_dir() function: usage variations - dir/subdir /* Testing is_dir() with base and sub dirs */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "-- Testing is_dir() with an empty dir --\n"; $dirname = $file_path."/is_dir_variation1"; @@ -27,7 +27,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_dir_variation1"; rmdir($dir_name."/is_dir_variation1_sub"); rmdir($dir_name); diff --git a/ext/standard/tests/file/is_dir_variation2.phpt b/ext/standard/tests/file/is_dir_variation2.phpt index 76b8e8bc0c..2a2f14d753 100644 --- a/ext/standard/tests/file/is_dir_variation2.phpt +++ b/ext/standard/tests/file/is_dir_variation2.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Testing is_dir() with dir, soft & hard link to dir, and with file, soft & hard link to file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing is_dir() with dir and links to dir ***\n"; echo "-- With dir --\n"; @@ -55,7 +55,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; if(file_exists($file_path."/is_dir_variation2_symlink")) { unlink($file_path."/is_dir_variation2_symlink"); } diff --git a/ext/standard/tests/file/is_dir_variation3.phpt b/ext/standard/tests/file/is_dir_variation3.phpt index c1664165eb..86c40da0eb 100644 --- a/ext/standard/tests/file/is_dir_variation3.phpt +++ b/ext/standard/tests/file/is_dir_variation3.phpt @@ -9,7 +9,7 @@ Test is_dir() function: usage variations - invalid arguments /* Passing invalid arguments to is_dir() */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); echo "*** Testing is_dir() with Invalid arguments: expected bool(false) ***\n"; $dirnames = array( diff --git a/ext/standard/tests/file/is_dir_variation4.phpt b/ext/standard/tests/file/is_dir_variation4.phpt index 5c0be485c5..543533f8ed 100644 --- a/ext/standard/tests/file/is_dir_variation4.phpt +++ b/ext/standard/tests/file/is_dir_variation4.phpt @@ -9,7 +9,7 @@ Test is_dir() function: usage variations - diff. path notations /* Passing dir names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing is_dir() with different notations of dir names ***"; $dir_name = "/is_dir_variation4"; @@ -46,7 +46,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_dir_variation4"; rmdir($dir_name); ?> diff --git a/ext/standard/tests/file/is_executable_basic-win32-mb.phpt b/ext/standard/tests/file/is_executable_basic-win32-mb.phpt index e681ad6324..69f5f2dc7d 100644 --- a/ext/standard/tests/file/is_executable_basic-win32-mb.phpt +++ b/ext/standard/tests/file/is_executable_basic-win32-mb.phpt @@ -11,12 +11,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* Prototype: bool is_executable ( string $filename ); Description: Tells whether the filename is executable */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/私はガラスを食べられますis_executable.tmp"; +$filename = __DIR__."/私はガラスを食べられますis_executable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_executable_basic-win32.phpt b/ext/standard/tests/file/is_executable_basic-win32.phpt index 7096285ef1..80059d8218 100644 --- a/ext/standard/tests/file/is_executable_basic-win32.phpt +++ b/ext/standard/tests/file/is_executable_basic-win32.phpt @@ -11,12 +11,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* Prototype: bool is_executable ( string $filename ); Description: Tells whether the filename is executable */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_executable.tmp"; +$filename = __DIR__."/is_executable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_executable_basic.phpt b/ext/standard/tests/file/is_executable_basic.phpt index 2e6d60593e..a86b9e4761 100644 --- a/ext/standard/tests/file/is_executable_basic.phpt +++ b/ext/standard/tests/file/is_executable_basic.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,12 +23,12 @@ unlink($filename); */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_executable.tmp"; +$filename = __DIR__."/is_executable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_executable_error.phpt b/ext/standard/tests/file/is_executable_error.phpt index 4fb3dbaf5f..99c218b514 100644 --- a/ext/standard/tests/file/is_executable_error.phpt +++ b/ext/standard/tests/file/is_executable_error.phpt @@ -12,7 +12,7 @@ var_dump( is_executable() ); // args < expected no of arguments var_dump( is_executable(1, 2) ); // args > expected no. of arguments echo "\n*** Testing is_exceutable() on non-existent directory ***\n"; -var_dump( is_executable(dirname(__FILE__)."/is_executable") ); +var_dump( is_executable(__DIR__."/is_executable") ); echo "Done\n"; --EXPECTF-- diff --git a/ext/standard/tests/file/is_executable_variation1.phpt b/ext/standard/tests/file/is_executable_variation1.phpt index 1cd0a8d209..1e8d8f5faf 100644 --- a/ext/standard/tests/file/is_executable_variation1.phpt +++ b/ext/standard/tests/file/is_executable_variation1.phpt @@ -14,10 +14,10 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test is_executable() with file having different filepath notation */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_executable_variation1"); // create a new temporary file @@ -60,8 +60,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/is_executable_variation1/bar.tmp"); -rmdir(dirname(__FILE__)."/is_executable_variation1/"); +unlink(__DIR__."/is_executable_variation1/bar.tmp"); +rmdir(__DIR__."/is_executable_variation1/"); ?> --EXPECTF-- *** Testing is_executable(): usage variations *** diff --git a/ext/standard/tests/file/is_executable_variation2.phpt b/ext/standard/tests/file/is_executable_variation2.phpt index 36399e189e..72957d147a 100644 --- a/ext/standard/tests/file/is_executable_variation2.phpt +++ b/ext/standard/tests/file/is_executable_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,10 +24,10 @@ unlink($filename); /* test is_executable() with file/dir having different permissions */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_executable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_executable_variation2"); echo "\n*** Testing is_executable() on directory without execute permission ***\n"; @@ -37,16 +37,16 @@ chmod("$file_path/is_executable_variation2", 0777); // chmod to enable deletion echo "\n*** Testing miscelleneous input for is_executable() function ***\n"; $name_prefix = "is_executable_variation2"; -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1); -create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2); -create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3); -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 4); -create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5); -create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6); -create_files(dirname(__FILE__), 1, "text", 0714, 1, "w", $name_prefix, 7); -create_files(dirname(__FILE__), 1, "numeric", 0744, 1, "w", $name_prefix, 8); -create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9); -create_files(dirname(__FILE__), 1, "text", 0712, 1, "w", $name_prefix, 10); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1); +create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2); +create_files(__DIR__, 1, "empty", 0755, 1, "w", $name_prefix, 3); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 4); +create_files(__DIR__, 1, "text", 0222, 1, "w", $name_prefix, 5); +create_files(__DIR__, 1, "numeric", 0711, 1, "w", $name_prefix, 6); +create_files(__DIR__, 1, "text", 0714, 1, "w", $name_prefix, 7); +create_files(__DIR__, 1, "numeric", 0744, 1, "w", $name_prefix, 8); +create_files(__DIR__, 1, "text", 0421, 1, "w", $name_prefix, 9); +create_files(__DIR__, 1, "text", 0712, 1, "w", $name_prefix, 10); $files = array ( "$file_path/is_executable_variation21.tmp", @@ -78,7 +78,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/is_executable_variation2/"); +rmdir(__DIR__."/is_executable_variation2/"); ?> --EXPECT-- *** Testing is_executable(): usage variations *** diff --git a/ext/standard/tests/file/is_executable_variation3.phpt b/ext/standard/tests/file/is_executable_variation3.phpt index a804f66eb2..5051504be9 100644 --- a/ext/standard/tests/file/is_executable_variation3.phpt +++ b/ext/standard/tests/file/is_executable_variation3.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_executable_root_check.tmp"; +$filename = __DIR__."/is_executable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { diff --git a/ext/standard/tests/file/is_file_basic.phpt b/ext/standard/tests/file/is_file_basic.phpt index 7b8e778a7f..d5d46b5fda 100644 --- a/ext/standard/tests/file/is_file_basic.phpt +++ b/ext/standard/tests/file/is_file_basic.phpt @@ -13,9 +13,9 @@ echo "*** Testing is_file(): basic functionality ***\n"; var_dump( is_file(__FILE__) ); /* Checking with (current) dir */ -var_dump( is_file(dirname(__FILE__)) ); +var_dump( is_file(__DIR__) ); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/is_file_basic.tmp"; /* With non-existing file */ var_dump( is_file($file_name) ); @@ -31,7 +31,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_name = $file_path."/is_file_basic.tmp"; unlink($file_name); ?> diff --git a/ext/standard/tests/file/is_file_variation1.phpt b/ext/standard/tests/file/is_file_variation1.phpt index 148b89a674..c8a26ea7c7 100644 --- a/ext/standard/tests/file/is_file_variation1.phpt +++ b/ext/standard/tests/file/is_file_variation1.phpt @@ -10,7 +10,7 @@ Test is_file() function: usage variations - diff. files /* Testing is_file() with file containing data, truncating its size and the file created by touch() */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "-- Testing is_file() with file containing data --\n"; $filename = $file_path."/is_file_variation1.tmp"; diff --git a/ext/standard/tests/file/is_file_variation2.phpt b/ext/standard/tests/file/is_file_variation2.phpt index de5c52b05c..7803410ac2 100644 --- a/ext/standard/tests/file/is_file_variation2.phpt +++ b/ext/standard/tests/file/is_file_variation2.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Creating soft and hard links to a file and applying is_file() on links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; fclose( fopen($file_path."/is_file_variation2.tmp", "w") ); echo "*** Testing is_file() with links ***\n"; @@ -32,7 +32,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/is_file_variation2_symlink.tmp"); unlink($file_path."/is_file_variation2_link.tmp"); unlink($file_path."/is_file_variation2.tmp"); diff --git a/ext/standard/tests/file/is_file_variation3.phpt b/ext/standard/tests/file/is_file_variation3.phpt index ec70371417..bee1a6d6cf 100644 --- a/ext/standard/tests/file/is_file_variation3.phpt +++ b/ext/standard/tests/file/is_file_variation3.phpt @@ -9,7 +9,7 @@ Test is_file() function: usage variations - invalid filenames /* Testing is_file() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/is_file_variation3.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -39,7 +39,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/is_file_variation3.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/is_file_variation4.phpt b/ext/standard/tests/file/is_file_variation4.phpt index 505331d2c9..39a640e7eb 100644 --- a/ext/standard/tests/file/is_file_variation4.phpt +++ b/ext/standard/tests/file/is_file_variation4.phpt @@ -9,7 +9,7 @@ Test is_file() function: usage variations - diff. path notations (Bug #42027) /* Passing file names with different notations, using slashes, wild-card chars */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing is_file() with different notations of file names ***\n"; $dir_name = $file_path."/is_file_variation4"; @@ -47,7 +47,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/is_file_variation4"; unlink($dir_name."/is_file_variation4.tmp"); rmdir($dir_name); diff --git a/ext/standard/tests/file/is_readable_basic-win32-mb.phpt b/ext/standard/tests/file/is_readable_basic-win32-mb.phpt index d10342b5e3..150510b884 100644 --- a/ext/standard/tests/file/is_readable_basic-win32-mb.phpt +++ b/ext/standard/tests/file/is_readable_basic-win32-mb.phpt @@ -13,12 +13,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/私はガラスを食べられますis_readable.tmp"; +$filename = __DIR__."/私はガラスを食べられますis_readable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_readable_basic-win32.phpt b/ext/standard/tests/file/is_readable_basic-win32.phpt index d4e0538d79..1432141c91 100644 --- a/ext/standard/tests/file/is_readable_basic-win32.phpt +++ b/ext/standard/tests/file/is_readable_basic-win32.phpt @@ -13,12 +13,12 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_readable.tmp"; +$filename = __DIR__."/is_readable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_readable_basic.phpt b/ext/standard/tests/file/is_readable_basic.phpt index 2bca150744..ce5312862f 100644 --- a/ext/standard/tests/file/is_readable_basic.phpt +++ b/ext/standard/tests/file/is_readable_basic.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,12 +23,12 @@ unlink($filename); */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_readable.tmp"; +$filename = __DIR__."/is_readable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_readable_error.phpt b/ext/standard/tests/file/is_readable_error.phpt index 9a734cd14d..ad6c2b8c62 100644 --- a/ext/standard/tests/file/is_readable_error.phpt +++ b/ext/standard/tests/file/is_readable_error.phpt @@ -11,7 +11,7 @@ var_dump( is_readable() ); // args < expected var_dump( is_readable(1, 2) ); // args > expected echo "\n*** Testing is_readable() on non-existent file ***\n"; -var_dump( is_readable(dirname(__FILE__)."/is_readable.tmp") ); +var_dump( is_readable(__DIR__."/is_readable.tmp") ); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/is_readable_variation1.phpt b/ext/standard/tests/file/is_readable_variation1.phpt index 0ba2324f9a..66dc2b81f5 100644 --- a/ext/standard/tests/file/is_readable_variation1.phpt +++ b/ext/standard/tests/file/is_readable_variation1.phpt @@ -4,7 +4,7 @@ Test is_readable() function: usage variations - diff. file notations <?php if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_readable_root_check.tmp"; + $filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -22,10 +22,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test is_readable() with file having different filepath notation */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_readable_variation1"); // create a new temporary file @@ -69,8 +69,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/is_readable_variation1/bar.tmp"); -rmdir(dirname(__FILE__)."/is_readable_variation1/"); +unlink(__DIR__."/is_readable_variation1/bar.tmp"); +rmdir(__DIR__."/is_readable_variation1/"); ?> --EXPECTF-- *** Testing is_readable(): usage variations *** diff --git a/ext/standard/tests/file/is_readable_variation2.phpt b/ext/standard/tests/file/is_readable_variation2.phpt index ac54735b19..896ef2e618 100644 --- a/ext/standard/tests/file/is_readable_variation2.phpt +++ b/ext/standard/tests/file/is_readable_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -23,10 +23,10 @@ unlink($filename); /* test is_executable() with file/dir having different permissions */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_readable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_readable_variation2"); echo "\n*** Testing is_readable() on directory without read permission ***\n"; @@ -36,16 +36,16 @@ chmod("$file_path/is_readable_variation2", 0777); // chmod to enable deletion o echo "\n*** Testing miscelleneous input for is_readable() function ***\n"; $name_prefix = "is_readable_variation2"; -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1); -create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2); -create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3); -create_files(dirname(__FILE__), 1, "numeric", 0555, 1, "w", $name_prefix, 4); -create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5); -create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6); -create_files(dirname(__FILE__), 1, "text", 0411, 1, "w", $name_prefix, 7); -create_files(dirname(__FILE__), 1, "numeric", 0444, 1, "w", $name_prefix, 8); -create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9); -create_files(dirname(__FILE__), 1, "text", 0422, 1, "w", $name_prefix, 10); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1); +create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2); +create_files(__DIR__, 1, "empty", 0755, 1, "w", $name_prefix, 3); +create_files(__DIR__, 1, "numeric", 0555, 1, "w", $name_prefix, 4); +create_files(__DIR__, 1, "text", 0222, 1, "w", $name_prefix, 5); +create_files(__DIR__, 1, "numeric", 0711, 1, "w", $name_prefix, 6); +create_files(__DIR__, 1, "text", 0411, 1, "w", $name_prefix, 7); +create_files(__DIR__, 1, "numeric", 0444, 1, "w", $name_prefix, 8); +create_files(__DIR__, 1, "text", 0421, 1, "w", $name_prefix, 9); +create_files(__DIR__, 1, "text", 0422, 1, "w", $name_prefix, 10); $files = array ( "$file_path/is_readable_variation21.tmp", @@ -77,7 +77,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/is_readable_variation2/"); +rmdir(__DIR__."/is_readable_variation2/"); ?> --EXPECT-- *** Testing is_readable(): usage variations *** diff --git a/ext/standard/tests/file/is_readable_variation3.phpt b/ext/standard/tests/file/is_readable_variation3.phpt index 74fc7af574..5aec51b780 100644 --- a/ext/standard/tests/file/is_readable_variation3.phpt +++ b/ext/standard/tests/file/is_readable_variation3.phpt @@ -5,7 +5,7 @@ Test is_readable() function: usage variations - invalid file names if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_readable_root_check.tmp"; + $filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { diff --git a/ext/standard/tests/file/is_writable_basic.phpt b/ext/standard/tests/file/is_writable_basic.phpt index 6c447f4256..da2b2eb925 100644 --- a/ext/standard/tests/file/is_writable_basic.phpt +++ b/ext/standard/tests/file/is_writable_basic.phpt @@ -3,7 +3,7 @@ Test is_writable() and its alias is_writeable() function: basic functionality --SKIPIF-- <?php // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -22,12 +22,12 @@ unlink($filename); */ // include common file test functions -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_writable(): basic functionality ***\n"; // create a file -$filename = dirname(__FILE__)."/is_writable.tmp"; +$filename = __DIR__."/is_writable.tmp"; create_file($filename); $counter = 1; diff --git a/ext/standard/tests/file/is_writable_error.phpt b/ext/standard/tests/file/is_writable_error.phpt index e3755bc748..a9633f2284 100644 --- a/ext/standard/tests/file/is_writable_error.phpt +++ b/ext/standard/tests/file/is_writable_error.phpt @@ -17,8 +17,8 @@ var_dump( is_writable(1, 2) ); // args > expected var_dump( is_writeable(1, 2) ); echo "\n*** Testing is_writable() on non-existent file ***\n"; -var_dump( is_writable(dirname(__FILE__)."/is_writable") ); -var_dump( is_writeable(dirname(__FILE__)."/is_writable") ); +var_dump( is_writable(__DIR__."/is_writable") ); +var_dump( is_writeable(__DIR__."/is_writable") ); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/is_writable_variation1.phpt b/ext/standard/tests/file/is_writable_variation1.phpt index f5cdf6a8a0..31187b66d0 100644 --- a/ext/standard/tests/file/is_writable_variation1.phpt +++ b/ext/standard/tests/file/is_writable_variation1.phpt @@ -5,7 +5,7 @@ Test is_writable() and its alias is_writeable() function: usage variations - dif if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_writable_root_check.tmp"; + $filename = __DIR__."/is_writable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,10 +24,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { is_writeable() is an alias of is_writable() */ /* test is_writable() & is_writeable() with file having different filepath notation */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_writable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_writable_variation1"); // create a new temporary file @@ -72,8 +72,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/is_writable_variation1/bar.tmp"); -rmdir(dirname(__FILE__)."/is_writable_variation1/"); +unlink(__DIR__."/is_writable_variation1/bar.tmp"); +rmdir(__DIR__."/is_writable_variation1/"); ?> --EXPECTF-- *** Testing is_writable(): usage variations *** diff --git a/ext/standard/tests/file/is_writable_variation2.phpt b/ext/standard/tests/file/is_writable_variation2.phpt index efe35a0335..a8cafb25bd 100644 --- a/ext/standard/tests/file/is_writable_variation2.phpt +++ b/ext/standard/tests/file/is_writable_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only on LINUX'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -26,10 +26,10 @@ unlink ($filename); /* test is_executable() with file/dir having different permissions */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing is_writable(): usage variations ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/is_writable_variation2"); echo "\n*** Testing is_writable() on directory without write permission ***\n"; @@ -40,16 +40,16 @@ chmod("$file_path/is_writable_variation2", 0777); // chmod to enable deletion o echo "\n*** Testing miscelleneous input for is_writable() function ***\n"; $name_prefix = "is_writable_variation2"; -create_files(dirname(__FILE__), 1, "numeric", 0755, 1, "w", $name_prefix, 1); -create_files(dirname(__FILE__), 1, "text", 0755, 1, "w", $name_prefix, 2); -create_files(dirname(__FILE__), 1, "empty", 0755, 1, "w", $name_prefix, 3); -create_files(dirname(__FILE__), 1, "numeric", 0555, 1, "w", $name_prefix, 4); -create_files(dirname(__FILE__), 1, "text", 0222, 1, "w", $name_prefix, 5); -create_files(dirname(__FILE__), 1, "numeric", 0711, 1, "w", $name_prefix, 6); -create_files(dirname(__FILE__), 1, "text", 0114, 1, "w", $name_prefix, 7); -create_files(dirname(__FILE__), 1, "numeric", 0244, 1, "w", $name_prefix, 8); -create_files(dirname(__FILE__), 1, "text", 0421, 1, "w", $name_prefix, 9); -create_files(dirname(__FILE__), 1, "text", 0422, 1, "w", $name_prefix, 10); +create_files(__DIR__, 1, "numeric", 0755, 1, "w", $name_prefix, 1); +create_files(__DIR__, 1, "text", 0755, 1, "w", $name_prefix, 2); +create_files(__DIR__, 1, "empty", 0755, 1, "w", $name_prefix, 3); +create_files(__DIR__, 1, "numeric", 0555, 1, "w", $name_prefix, 4); +create_files(__DIR__, 1, "text", 0222, 1, "w", $name_prefix, 5); +create_files(__DIR__, 1, "numeric", 0711, 1, "w", $name_prefix, 6); +create_files(__DIR__, 1, "text", 0114, 1, "w", $name_prefix, 7); +create_files(__DIR__, 1, "numeric", 0244, 1, "w", $name_prefix, 8); +create_files(__DIR__, 1, "text", 0421, 1, "w", $name_prefix, 9); +create_files(__DIR__, 1, "text", 0422, 1, "w", $name_prefix, 10); $misc_files = array ( "$file_path/is_writable_variation21.tmp", @@ -83,7 +83,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/is_writable_variation2/"); +rmdir(__DIR__."/is_writable_variation2/"); ?> --EXPECT-- *** Testing is_writable(): usage variations *** diff --git a/ext/standard/tests/file/is_writable_variation3.phpt b/ext/standard/tests/file/is_writable_variation3.phpt index 3cc7a4da9d..f682bd3292 100644 --- a/ext/standard/tests/file/is_writable_variation3.phpt +++ b/ext/standard/tests/file/is_writable_variation3.phpt @@ -4,7 +4,7 @@ Test is_writable() and its alias is_writeable() function: usage variations - inv <?php if (substr(PHP_OS, 0, 3) != 'WIN') { // Skip if being run by root (files are always readable, writeable and executable) - $filename = dirname(__FILE__)."/is_writable_root_check.tmp"; + $filename = __DIR__."/is_writable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { diff --git a/ext/standard/tests/file/lchgrp_basic.phpt b/ext/standard/tests/file/lchgrp_basic.phpt index c844471240..fa97ce86ef 100644 --- a/ext/standard/tests/file/lchgrp_basic.phpt +++ b/ext/standard/tests/file/lchgrp_basic.phpt @@ -7,8 +7,8 @@ if (!function_exists("posix_getgid")) die("skip no posix_getgid()"); ?> --FILE-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchgrp.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchgrp.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'symlink.txt'; $gid = posix_getgid(); @@ -22,8 +22,8 @@ var_dump( filegroup( $symlink ) === $gid ); --CLEAN-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchgrp.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchgrp.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'symlink.txt'; unlink($filename); unlink($symlink); diff --git a/ext/standard/tests/file/lchown_basic.phpt b/ext/standard/tests/file/lchown_basic.phpt index 329f4b94df..e38bbda1be 100644 --- a/ext/standard/tests/file/lchown_basic.phpt +++ b/ext/standard/tests/file/lchown_basic.phpt @@ -14,8 +14,8 @@ if (!function_exists("posix_getuid")) die("skip no posix_getuid()"); */ echo "*** Testing lchown() : basic functionality ***\n"; -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; $uid = posix_getuid(); @@ -29,8 +29,8 @@ var_dump( fileowner( $symlink ) === $uid ); --CLEAN-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; -$symlink = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic.txt'; +$symlink = __DIR__ . DIRECTORY_SEPARATOR . 'lchown_basic_symlink.txt'; unlink($filename); unlink($symlink); diff --git a/ext/standard/tests/file/lchown_error.phpt b/ext/standard/tests/file/lchown_error.phpt index f4b4f5089e..dc574bf421 100644 --- a/ext/standard/tests/file/lchown_error.phpt +++ b/ext/standard/tests/file/lchown_error.phpt @@ -5,7 +5,7 @@ Test lchown() function : error functionality if (substr(PHP_OS, 0, 3) == 'WIN') die('skip no windows support'); if (!function_exists("posix_getuid")) die("skip no posix_getuid()"); // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -25,7 +25,7 @@ unlink($filename); echo "*** Testing lchown() : error functionality ***\n"; // Set up -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown.txt'; touch( $filename ); $uid = posix_getuid(); @@ -51,7 +51,7 @@ var_dump( lchown( $filename, -5 ) ); --CLEAN-- <?php -$filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'lchown.txt'; +$filename = __DIR__ . DIRECTORY_SEPARATOR . 'lchown.txt'; unlink($filename); ?> diff --git a/ext/standard/tests/file/lstat_stat_basic.phpt b/ext/standard/tests/file/lstat_stat_basic.phpt index ec11e2f839..24788e3a8a 100644 --- a/ext/standard/tests/file/lstat_stat_basic.phpt +++ b/ext/standard/tests/file/lstat_stat_basic.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("$file_path/file.inc"); echo "*** Testing lstat() & stat() : basic functionality ***\n"; @@ -80,7 +80,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_basic_link.tmp"); unlink("$file_path/lstat_stat_basic/lstat_stat_basic.tmp"); rmdir("$file_path/lstat_stat_basic"); diff --git a/ext/standard/tests/file/lstat_stat_error.phpt b/ext/standard/tests/file/lstat_stat_error.phpt index 8f290a32e3..543e296ec2 100644 --- a/ext/standard/tests/file/lstat_stat_error.phpt +++ b/ext/standard/tests/file/lstat_stat_error.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ echo "*** Testing lstat() for error conditions ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; var_dump( lstat() ); // args < expected var_dump( lstat(__FILE__, 2) ); // args > expected var_dump( lstat("$file_path/temp.tmp") ); // non existing file @@ -27,7 +27,7 @@ var_dump( lstat($arr) ); // array argument echo "\n*** Testing stat() for error conditions ***\n"; var_dump( stat() ); // args < expected var_dump( stat(__FILE__, 2) ); // file, args > expected -var_dump( stat(dirname(__FILE__), 2) ); //dir, args > expected +var_dump( stat(__DIR__, 2) ); //dir, args > expected var_dump( stat("$file_path/temp.tmp") ); // non existing file var_dump( stat("$file_path/temp/") ); // non existing dir diff --git a/ext/standard/tests/file/lstat_stat_variation1.phpt b/ext/standard/tests/file/lstat_stat_variation1.phpt index 68f526b5d0..e7aa778ade 100644 --- a/ext/standard/tests/file/lstat_stat_variation1.phpt +++ b/ext/standard/tests/file/lstat_stat_variation1.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of rename() on stats of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* create temp file */ @@ -26,7 +26,7 @@ fclose($fp); // renaming a file and check stat echo "*** Testing stat() for files after being renamed ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $old_filename = "$file_path/lstat_stat_variation1.tmp"; $new_filename = "$file_path/lstat_stat_variation1a.tmp"; $old_stat = stat($old_filename); @@ -47,7 +47,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation1a.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation10.phpt b/ext/standard/tests/file/lstat_stat_variation10.phpt index 3a7c692881..16ff75c26d 100644 --- a/ext/standard/tests/file/lstat_stat_variation10.phpt +++ b/ext/standard/tests/file/lstat_stat_variation10.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of is_dir() on stats of a dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -45,7 +45,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation10"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation11.phpt b/ext/standard/tests/file/lstat_stat_variation11.phpt index 975b1be55c..9a394ae7e9 100644 --- a/ext/standard/tests/file/lstat_stat_variation11.phpt +++ b/ext/standard/tests/file/lstat_stat_variation11.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects of is_file() on stats of a file */ @@ -46,7 +46,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation11.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation12.phpt b/ext/standard/tests/file/lstat_stat_variation12.phpt index 8ad7893286..eada799cdf 100644 --- a/ext/standard/tests/file/lstat_stat_variation12.phpt +++ b/ext/standard/tests/file/lstat_stat_variation12.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of is_link() on stats of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation12_link.tmp"); unlink("$file_path/lstat_stat_variation12.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation13.phpt b/ext/standard/tests/file/lstat_stat_variation13.phpt index 476c091ca1..22694240f5 100644 --- a/ext/standard/tests/file/lstat_stat_variation13.phpt +++ b/ext/standard/tests/file/lstat_stat_variation13.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* use stat on file created using "w" and "r" mode of fopen */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -45,7 +45,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation13.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation14.phpt b/ext/standard/tests/file/lstat_stat_variation14.phpt index 6ddd7497e4..f340d57f37 100644 --- a/ext/standard/tests/file/lstat_stat_variation14.phpt +++ b/ext/standard/tests/file/lstat_stat_variation14.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of is_link() on stats of hard link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -47,7 +47,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation14_hard.tmp"); unlink("$file_path/lstat_stat_variation14.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation15.phpt b/ext/standard/tests/file/lstat_stat_variation15.phpt index 903531db08..8278b8dba9 100644 --- a/ext/standard/tests/file/lstat_stat_variation15.phpt +++ b/ext/standard/tests/file/lstat_stat_variation15.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects on stats by changing permissions of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -49,7 +49,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation15_link.tmp"); unlink("$file_path/lstat_stat_variation15.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation16.phpt b/ext/standard/tests/file/lstat_stat_variation16.phpt index 056cec1c7d..652f5c29c7 100644 --- a/ext/standard/tests/file/lstat_stat_variation16.phpt +++ b/ext/standard/tests/file/lstat_stat_variation16.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects on stats with changing permissions of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; $filename = "$file_path/lstat_stat_variation16.tmp"; @@ -44,7 +44,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation16.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation17.phpt b/ext/standard/tests/file/lstat_stat_variation17.phpt index 51349f6a93..208cc0b388 100644 --- a/ext/standard/tests/file/lstat_stat_variation17.phpt +++ b/ext/standard/tests/file/lstat_stat_variation17.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects on stats by changing permissions of a dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; // checking stat() on directory @@ -43,7 +43,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation17"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation18.phpt b/ext/standard/tests/file/lstat_stat_variation18.phpt index 91a3ddcb6b..7b83d15547 100644 --- a/ext/standard/tests/file/lstat_stat_variation18.phpt +++ b/ext/standard/tests/file/lstat_stat_variation18.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test for stats of dir/file when their names are stored in objects */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -53,7 +53,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation18.tmp"); rmdir("$file_path/lstat_stat_variation18"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation19.phpt b/ext/standard/tests/file/lstat_stat_variation19.phpt index f3d1c303e6..8a2126737f 100644 --- a/ext/standard/tests/file/lstat_stat_variation19.phpt +++ b/ext/standard/tests/file/lstat_stat_variation19.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test for stats of dir/file when their names are stored in an array */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -54,7 +54,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation19.tmp"); rmdir("$file_path/lstat_stat_variation19"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation2.phpt b/ext/standard/tests/file/lstat_stat_variation2.phpt index 52b817e5d0..61a9e196cc 100644 --- a/ext/standard/tests/file/lstat_stat_variation2.phpt +++ b/ext/standard/tests/file/lstat_stat_variation2.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of rename() on stats of dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("file.inc"); /* create temp directory */ @@ -48,7 +48,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation1a"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation20.phpt b/ext/standard/tests/file/lstat_stat_variation20.phpt index 26382fda53..8567c4e7c2 100644 --- a/ext/standard/tests/file/lstat_stat_variation20.phpt +++ b/ext/standard/tests/file/lstat_stat_variation20.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test for stats of link when their names are stored in object and array */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; $fp = fopen("$file_path/lstat_stat_variation20.tmp", "w"); // temp file @@ -56,7 +56,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation20_link.tmp"); unlink("$file_path/lstat_stat_variation20.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation21.phpt b/ext/standard/tests/file/lstat_stat_variation21.phpt index d339a988a8..23ed53e566 100644 --- a/ext/standard/tests/file/lstat_stat_variation21.phpt +++ b/ext/standard/tests/file/lstat_stat_variation21.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of truncate() on stats of a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation21.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation3.phpt b/ext/standard/tests/file/lstat_stat_variation3.phpt index 43f8bf6187..962f1df5b2 100644 --- a/ext/standard/tests/file/lstat_stat_variation3.phpt +++ b/ext/standard/tests/file/lstat_stat_variation3.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of rename() on stats of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* create temp file & link */ @@ -49,7 +49,7 @@ var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); ===Done=== --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation3.tmp"); unlink("$file_path/lstat_stat_variation_link3a.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation4.phpt b/ext/standard/tests/file/lstat_stat_variation4.phpt index 5046f70086..fe8b61e5ca 100644 --- a/ext/standard/tests/file/lstat_stat_variation4.phpt +++ b/ext/standard/tests/file/lstat_stat_variation4.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of touch() on stats of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation4.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation5.phpt b/ext/standard/tests/file/lstat_stat_variation5.phpt index 33aee9f31a..34401dc55d 100644 --- a/ext/standard/tests/file/lstat_stat_variation5.phpt +++ b/ext/standard/tests/file/lstat_stat_variation5.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test the effects of touch() on stats of dir */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -52,7 +52,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/lstat_stat_variation5"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation6.phpt b/ext/standard/tests/file/lstat_stat_variation6.phpt index 239a82927f..b4dc684eb1 100644 --- a/ext/standard/tests/file/lstat_stat_variation6.phpt +++ b/ext/standard/tests/file/lstat_stat_variation6.phpt @@ -26,7 +26,7 @@ foreach( $mount_output as $out ) { /* test the effects of touch() on stats of link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -64,7 +64,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation6.tmp"); unlink("$file_path/lstat_stat_variation_link6.tmp"); ?> diff --git a/ext/standard/tests/file/lstat_stat_variation7.phpt b/ext/standard/tests/file/lstat_stat_variation7.phpt index f849e8254a..b74dff63f7 100644 --- a/ext/standard/tests/file/lstat_stat_variation7.phpt +++ b/ext/standard/tests/file/lstat_stat_variation7.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects on stats with writing data into a file */ @@ -44,7 +44,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation7.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/lstat_stat_variation8.phpt b/ext/standard/tests/file/lstat_stat_variation8.phpt index cbd5c1a45d..db7f87f7f7 100644 --- a/ext/standard/tests/file/lstat_stat_variation8.phpt +++ b/ext/standard/tests/file/lstat_stat_variation8.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects on stats with creating file/subdir in a dir @@ -48,7 +48,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/lstat_stat_variation8/lstat_stat_variation8a.tmp"); rmdir("$file_path/lstat_stat_variation8/lstat_stat_variation8_subdir/"); rmdir("$file_path/lstat_stat_variation8"); diff --git a/ext/standard/tests/file/lstat_stat_variation9.phpt b/ext/standard/tests/file/lstat_stat_variation9.phpt index 84b051304d..a73b126174 100644 --- a/ext/standard/tests/file/lstat_stat_variation9.phpt +++ b/ext/standard/tests/file/lstat_stat_variation9.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; /* test the effects on stats by deleting file/subdir from a dir @@ -54,7 +54,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/lstat_stat_variation9"; rmdir($dirname); ?> diff --git a/ext/standard/tests/file/mkdir-001.phpt b/ext/standard/tests/file/mkdir-001.phpt index bad32c37ab..947b6679cd 100644 --- a/ext/standard/tests/file/mkdir-001.phpt +++ b/ext/standard/tests/file/mkdir-001.phpt @@ -13,10 +13,10 @@ var_dump(mkdir("./mkdir-001/subdir")); var_dump(rmdir("./mkdir-001/subdir")); var_dump(rmdir("./mkdir-001")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-001")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-001/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-001/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-001")); +var_dump(mkdir(__DIR__."/mkdir-001")); +var_dump(mkdir(__DIR__."/mkdir-001/subdir")); +var_dump(rmdir(__DIR__."/mkdir-001/subdir")); +var_dump(rmdir(__DIR__."/mkdir-001")); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/mkdir-002.phpt b/ext/standard/tests/file/mkdir-002.phpt index 92c05e941d..2cc849f462 100644 --- a/ext/standard/tests/file/mkdir-002.phpt +++ b/ext/standard/tests/file/mkdir-002.phpt @@ -21,12 +21,12 @@ var_dump(`ls -l ./mkdir-002`); var_dump(rmdir("./mkdir-002/subdir")); var_dump(rmdir("./mkdir-002")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-002", 0777)); -var_dump(mkdir(dirname(__FILE__)."/mkdir-002/subdir", 0777)); -$dirname = dirname(__FILE__)."/mkdir-002"; +var_dump(mkdir(__DIR__."/mkdir-002", 0777)); +var_dump(mkdir(__DIR__."/mkdir-002/subdir", 0777)); +$dirname = __DIR__."/mkdir-002"; var_dump(`ls -l $dirname`); -var_dump(rmdir(dirname(__FILE__)."/mkdir-002/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-002")); +var_dump(rmdir(__DIR__."/mkdir-002/subdir")); +var_dump(rmdir(__DIR__."/mkdir-002")); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/mkdir-003.phpt b/ext/standard/tests/file/mkdir-003.phpt index b3141c5970..4d10169259 100644 --- a/ext/standard/tests/file/mkdir-003.phpt +++ b/ext/standard/tests/file/mkdir-003.phpt @@ -11,9 +11,9 @@ var_dump(mkdir("./mkdir-003/subdir", 0777, true)); var_dump(rmdir("./mkdir-003/subdir")); var_dump(rmdir("./mkdir-003")); -var_dump(mkdir(dirname(__FILE__)."/mkdir-003/subdir", 0777, true)); -var_dump(rmdir(dirname(__FILE__)."/mkdir-003/subdir")); -var_dump(rmdir(dirname(__FILE__)."/mkdir-003")); +var_dump(mkdir(__DIR__."/mkdir-003/subdir", 0777, true)); +var_dump(rmdir(__DIR__."/mkdir-003/subdir")); +var_dump(rmdir(__DIR__."/mkdir-003")); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/mkdir-006.phpt b/ext/standard/tests/file/mkdir-006.phpt index 9fcb92802e..1974faa0b6 100644 --- a/ext/standard/tests/file/mkdir-006.phpt +++ b/ext/standard/tests/file/mkdir-006.phpt @@ -2,7 +2,7 @@ recursive mkdir() with unclean paths --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $dirpath = "./tmp/foo//bar/logs"; mkdir($dirpath, 0777, true); diff --git a/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt b/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt index 785644d8b0..20535a0536 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation-win32-mb.phpt @@ -16,7 +16,7 @@ echo "*** Testing mkdir() and rmdir() for different permissions ***\n"; $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $counter = 1; for($mode = 0000; $mode <= 0777; $mode++) { @@ -49,9 +49,9 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/mkdir私はガラスを食べられます/test/"); -rmdir(dirname(__FILE__)."/mkdir私はガラスを食べられます/test1/"); -rmdir(dirname(__FILE__)."/mkdir私はガラスを食べられます/"); +rmdir(__DIR__."/mkdir私はガラスを食べられます/test/"); +rmdir(__DIR__."/mkdir私はガラスを食べられます/test1/"); +rmdir(__DIR__."/mkdir私はガラスを食べられます/"); ?> --EXPECTF-- *** Testing mkdir() and rmdir() for different permissions *** diff --git a/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt b/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt index f9d41d5a1b..3391472f99 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation-win32.phpt @@ -16,7 +16,7 @@ echo "*** Testing mkdir() and rmdir() for different permissions ***\n"; $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $counter = 1; for($mode = 0000; $mode <= 0777; $mode++) { @@ -49,9 +49,9 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/mkdir/test/"); -rmdir(dirname(__FILE__)."/mkdir/test1/"); -rmdir(dirname(__FILE__)."/mkdir/"); +rmdir(__DIR__."/mkdir/test/"); +rmdir(__DIR__."/mkdir/test1/"); +rmdir(__DIR__."/mkdir/"); ?> --EXPECTF-- *** Testing mkdir() and rmdir() for different permissions *** diff --git a/ext/standard/tests/file/mkdir_rmdir_variation1.phpt b/ext/standard/tests/file/mkdir_rmdir_variation1.phpt index 7a1a5c7583..21ad5619e1 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation1.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only on LINUX'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -26,7 +26,7 @@ echo "*** Testing mkdir() and rmdir() for different permissions ***\n"; $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $counter = 1; for($mode = 0000; $mode <= 0777; $mode++) { diff --git a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt index 24dfc96ac9..b6a7395337 100644 --- a/ext/standard/tests/file/mkdir_rmdir_variation2.phpt +++ b/ext/standard/tests/file/mkdir_rmdir_variation2.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only on LINUX'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -24,7 +24,7 @@ unlink($filename); $context = stream_context_create(); -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Testing mkdir() and rmdir() by giving stream context as fourth argument ***\n"; var_dump( mkdir("$file_path/mkdir_variation2/test/", 0777, true, $context) ); @@ -49,8 +49,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/mkdir_variation2/test/"); -rmdir(dirname(__FILE__)."/mkdir_variation2/"); +rmdir(__DIR__."/mkdir_variation2/test/"); +rmdir(__DIR__."/mkdir_variation2/"); ?> --EXPECTF-- *** Testing mkdir() and rmdir() by giving stream context as fourth argument *** diff --git a/ext/standard/tests/file/parse_ini_file.phpt b/ext/standard/tests/file/parse_ini_file.phpt index d66f179acc..eed17c0093 100644 --- a/ext/standard/tests/file/parse_ini_file.phpt +++ b/ext/standard/tests/file/parse_ini_file.phpt @@ -7,7 +7,7 @@ Test parse_ini_file() function and returns the settings in it in an associative array. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $parse_string = <<<EOD ; Comment starts with semi-colon(;) @@ -215,7 +215,7 @@ echo "*** Done **\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/parse.ini"); +unlink(__DIR__."/parse.ini"); ?> --EXPECT-- *** Test parse_ini_file() function: with various keys and values given in parse.ini file *** diff --git a/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt b/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt index edfc0e82bb..df98a632b4 100644 --- a/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation6-win32-mb.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing parse_ini_file() : variation ***\n"; $mainDir = "parseIniFileVar私はガラスを食べられます.dir"; $subDir = "parseIniFileVar私はガラスを食べられますSub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt b/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt index 77cb693cad..2ef1d88fcc 100644 --- a/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation6-win32.phpt @@ -18,13 +18,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing parse_ini_file() : variation ***\n"; $mainDir = "parseIniFileVar6.dir"; $subDir = "parseIniFileVar6Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/parse_ini_file_variation6.phpt b/ext/standard/tests/file/parse_ini_file_variation6.phpt index d6f97b9008..7c6d8ab4cb 100644 --- a/ext/standard/tests/file/parse_ini_file_variation6.phpt +++ b/ext/standard/tests/file/parse_ini_file_variation6.phpt @@ -13,13 +13,13 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing parse_ini_file() : variation ***\n"; $mainDir = "parseIniFileVar6.dir"; $subDir = "parseIniFileVar6Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/pathinfo_basic.phpt b/ext/standard/tests/file/pathinfo_basic.phpt index 48d01dd66c..f44379847e 100644 --- a/ext/standard/tests/file/pathinfo_basic.phpt +++ b/ext/standard/tests/file/pathinfo_basic.phpt @@ -8,7 +8,7 @@ Test pathinfo() function: basic functionality echo "*** Testing basic functions of pathinfo() ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $paths = array ( /* Testing basic file notation */ diff --git a/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt b/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt index de5510bb81..2d9b2b92dc 100644 --- a/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt +++ b/ext/standard/tests/file/popen_pclose_basic-win32-mb.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) echo "*** Testing popen(): reading from the pipe ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "Sample String 私はガラスを食べられます"; $file_handle = popen(" echo $string", "r"); diff --git a/ext/standard/tests/file/popen_pclose_basic-win32.phpt b/ext/standard/tests/file/popen_pclose_basic-win32.phpt index 829a095ab1..dfb00fbeb2 100644 --- a/ext/standard/tests/file/popen_pclose_basic-win32.phpt +++ b/ext/standard/tests/file/popen_pclose_basic-win32.phpt @@ -17,7 +17,7 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) echo "*** Testing popen(): reading from the pipe ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $string = "Sample String"; $file_handle = popen(" echo $string", "r"); diff --git a/ext/standard/tests/file/popen_pclose_basic.phpt b/ext/standard/tests/file/popen_pclose_basic.phpt index c53db26db0..4e17c29cde 100644 --- a/ext/standard/tests/file/popen_pclose_basic.phpt +++ b/ext/standard/tests/file/popen_pclose_basic.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) == 'WIN' ) * Description: Closes process file pointer. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/file.inc"); echo "*** Testing popen() and pclose() with different processes ***\n"; @@ -64,7 +64,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirpath = $file_path."/popen_basic"; unlink($dirpath."/popen_basic.tmp"); unlink($dirpath."/popen_basic1.tmp"); diff --git a/ext/standard/tests/file/popen_pclose_error-sunos.phpt b/ext/standard/tests/file/popen_pclose_error-sunos.phpt index 8f87540395..ee015750b4 100644 --- a/ext/standard/tests/file/popen_pclose_error-sunos.phpt +++ b/ext/standard/tests/file/popen_pclose_error-sunos.phpt @@ -14,7 +14,7 @@ if( substr(PHP_OS, 0, 3) != 'Sun') * Prototype: int pclose ( resource handle ); * Description: Closes process file pointer. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing for error conditions ***\n"; var_dump( popen() ); // Zero Arguments var_dump( popen("abc.txt") ); // Single Argument @@ -28,7 +28,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/popen.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/popen_pclose_error.phpt b/ext/standard/tests/file/popen_pclose_error.phpt index 93ed5d946e..b0e86be65c 100644 --- a/ext/standard/tests/file/popen_pclose_error.phpt +++ b/ext/standard/tests/file/popen_pclose_error.phpt @@ -14,7 +14,7 @@ if (strtoupper( substr(PHP_OS, 0, 3) ) == 'SUN') * Prototype: int pclose ( resource handle ); * Description: Closes process file pointer. */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing for error conditions ***\n"; var_dump( popen() ); // Zero Arguments var_dump( popen("abc.txt") ); // Single Argument @@ -28,7 +28,7 @@ echo "\n--- Done ---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/popen.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/readfile_basic-win32.phpt b/ext/standard/tests/file/readfile_basic-win32.phpt index 05e18a2099..06e0813d57 100644 --- a/ext/standard/tests/file/readfile_basic-win32.phpt +++ b/ext/standard/tests/file/readfile_basic-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Outputs a file */ // common file used -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); echo "*** Testing readfile() : basic functionality ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_prefix = "readfile_basic"; // temp files created with this prefix // the content that is filled into the temp files as created diff --git a/ext/standard/tests/file/readfile_basic.phpt b/ext/standard/tests/file/readfile_basic.phpt index e67fd58545..1c05f494a6 100644 --- a/ext/standard/tests/file/readfile_basic.phpt +++ b/ext/standard/tests/file/readfile_basic.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Outputs a file */ // common file used -require(dirname(__FILE__) . '/file.inc'); +require(__DIR__ . '/file.inc'); echo "*** Testing readfile() : basic functionality ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_prefix = "readfile_basic"; // temp files created with this prefix // the content that is filled into the temp files as created diff --git a/ext/standard/tests/file/readfile_error.phpt b/ext/standard/tests/file/readfile_error.phpt index fcaa7f3946..0dc1f7b82f 100644 --- a/ext/standard/tests/file/readfile_error.phpt +++ b/ext/standard/tests/file/readfile_error.phpt @@ -22,7 +22,7 @@ var_dump( readfile(__FILE__, false, '') ); // empty string as $context var_dump( readfile(__FILE__, true, false) ); // boolean false as $context echo "\n-- Testing readfile() with non-existent file --\n"; -$non_existent_file = dirname(__FILE__)."/non_existent_file.tmp"; +$non_existent_file = __DIR__."/non_existent_file.tmp"; var_dump( readfile($non_existent_file) ); echo "Done\n"; diff --git a/ext/standard/tests/file/readfile_variation1.phpt b/ext/standard/tests/file/readfile_variation1.phpt index 6bfe7ddd83..6348bb3dfe 100644 --- a/ext/standard/tests/file/readfile_variation1.phpt +++ b/ext/standard/tests/file/readfile_variation1.phpt @@ -10,7 +10,7 @@ Test readfile() function: usage variation - stream_context // include file.inc require("file.inc"); -$file_path = dirname(__FILE__); +$file_path = __DIR__; /* Variation 1 : Check working of third argument of readfile() */ @@ -32,7 +32,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/readfile_variation1.tmp"); +unlink(__DIR__."/readfile_variation1.tmp"); ?> --EXPECT-- *** Testing readfile(): checking third argument *** diff --git a/ext/standard/tests/file/readfile_variation2.phpt b/ext/standard/tests/file/readfile_variation2.phpt index 2fe1475501..029890404e 100644 --- a/ext/standard/tests/file/readfile_variation2.phpt +++ b/ext/standard/tests/file/readfile_variation2.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { // include file.inc require("file.inc"); -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used here $filename = "$file_path/readfile_variation2.tmp"; @@ -61,7 +61,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/readfile_variation2.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/readfile_variation3.phpt b/ext/standard/tests/file/readfile_variation3.phpt index a22b2b4044..b2571d3ac5 100644 --- a/ext/standard/tests/file/readfile_variation3.phpt +++ b/ext/standard/tests/file/readfile_variation3.phpt @@ -10,7 +10,7 @@ Test readfile() function: usage variation - include path // include file.inc require("file.inc"); -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/readfile_variation3"; echo "*** Testing readfile(): checking second argument, include path ***\n"; @@ -40,8 +40,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/readfile_variation3/readfile_variation3.tmp"); -rmdir(dirname(__FILE__)."/readfile_variation3"); +unlink(__DIR__."/readfile_variation3/readfile_variation3.tmp"); +rmdir(__DIR__."/readfile_variation3"); ?> --EXPECT-- *** Testing readfile(): checking second argument, include path *** diff --git a/ext/standard/tests/file/readfile_variation7.phpt b/ext/standard/tests/file/readfile_variation7.phpt index b41721ae4f..601453573e 100644 --- a/ext/standard/tests/file/readfile_variation7.phpt +++ b/ext/standard/tests/file/readfile_variation7.phpt @@ -21,7 +21,7 @@ mkdir($thisTestDir); chdir($thisTestDir); $filename = "readFileVar7.tmp"; -$scriptLocFile = dirname(__FILE__)."/".$filename; +$scriptLocFile = __DIR__."/".$filename; $newpath = create_include_path(); set_include_path($newpath); diff --git a/ext/standard/tests/file/readfile_variation8-win32-mb.phpt b/ext/standard/tests/file/readfile_variation8-win32-mb.phpt index 76774b8260..4ca719266f 100644 --- a/ext/standard/tests/file/readfile_variation8-win32-mb.phpt +++ b/ext/standard/tests/file/readfile_variation8-win32-mb.phpt @@ -18,7 +18,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing readfile() : variation ***\n"; $mainDir = "readfileVar私はガラスを食べられます8"; $subDir = "readfileVar私はガラスを食べられます8Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); @@ -33,7 +33,7 @@ fclose($h); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/readfile_variation8-win32.phpt b/ext/standard/tests/file/readfile_variation8-win32.phpt index 0750c910a1..c914786407 100644 --- a/ext/standard/tests/file/readfile_variation8-win32.phpt +++ b/ext/standard/tests/file/readfile_variation8-win32.phpt @@ -18,7 +18,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing readfile() : variation ***\n"; $mainDir = "readfileVar8"; $subDir = "readfileVar8Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); @@ -33,7 +33,7 @@ fclose($h); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); $allDirs = array( diff --git a/ext/standard/tests/file/readfile_variation9.phpt b/ext/standard/tests/file/readfile_variation9.phpt index 5f5804a81d..1d536e61f1 100644 --- a/ext/standard/tests/file/readfile_variation9.phpt +++ b/ext/standard/tests/file/readfile_variation9.phpt @@ -13,7 +13,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> echo "*** Testing readfile() : variation ***\n"; $mainDir = "readfileVar8"; $subDir = "readfileVar8Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); @@ -28,7 +28,7 @@ fclose($h); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/readlink_realpath_basic1.phpt b/ext/standard/tests/file/readlink_realpath_basic1.phpt index 6efe7f2d49..fa2056d076 100644 --- a/ext/standard/tests/file/readlink_realpath_basic1.phpt +++ b/ext/standard/tests/file/readlink_realpath_basic1.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ /* creating directories, symbolic links and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/readlink_realpath_basic1/home/test/", 0777, true); $file_handle1 = fopen("$file_path/readlink_realpath_basic1/home/test/readlink_realpath_basic1.tmp", "w"); @@ -60,7 +60,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_basic1"; +$name_prefix = __DIR__."/readlink_realpath_basic1"; unlink("$name_prefix/home/test/readlink_realpath_basic1.tmp"); unlink("$name_prefix/home/readlink_realpath_basic1.tmp"); unlink("$name_prefix/readlink_realpath_basic1.tmp"); diff --git a/ext/standard/tests/file/readlink_realpath_basic2.phpt b/ext/standard/tests/file/readlink_realpath_basic2.phpt index 91955cd4f5..104fba859d 100644 --- a/ext/standard/tests/file/readlink_realpath_basic2.phpt +++ b/ext/standard/tests/file/readlink_realpath_basic2.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ /* creating directories, symbolic links and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/readlink_realpath_basic2/home/test/", 0777, true); $file_handle1 = fopen("$file_path/readlink_realpath_basic2/home/test/readlink_realpath_basic2.tmp", "w"); @@ -52,7 +52,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_basic2"; +$name_prefix = __DIR__."/readlink_realpath_basic2"; unlink("$name_prefix/home/test/readlink_realpath_basic2.tmp"); unlink("$name_prefix/home/readlink_realpath_basic2.tmp"); unlink("$name_prefix/readlink_realpath_basic2.tmp"); diff --git a/ext/standard/tests/file/readlink_realpath_error.phpt b/ext/standard/tests/file/readlink_realpath_error.phpt index dc042bfff5..e2afb8bb36 100644 --- a/ext/standard/tests/file/readlink_realpath_error.phpt +++ b/ext/standard/tests/file/readlink_realpath_error.phpt @@ -20,20 +20,20 @@ var_dump( readlink() ); // args < expected var_dump( readlink(__FILE__, 2) ); // args > expected echo "\n*** Testing readlink() on a non-existent link ***\n"; -var_dump( readlink(dirname(__FILE__)."/readlink_error.tmp") ); +var_dump( readlink(__DIR__."/readlink_error.tmp") ); echo "\n*** Testing readlink() on existing file ***\n"; var_dump( readlink(__FILE__) ); echo "\n*** Testing readlink() on existing directory ***\n"; -var_dump( readlink(dirname(__FILE__)) ); +var_dump( readlink(__DIR__) ); echo "*** Testing realpath(): error conditions ***\n"; var_dump( realpath() ); // args < expected var_dump( realpath(1, 2) ); // args > expected echo "\n*** Testing realpath() on a non-existent file ***\n"; -var_dump( realpath(dirname(__FILE__)."/realpath_error.tmp") ); +var_dump( realpath(__DIR__."/realpath_error.tmp") ); echo "Done\n"; ?> diff --git a/ext/standard/tests/file/readlink_realpath_variation1.phpt b/ext/standard/tests/file/readlink_realpath_variation1.phpt index ab1d955778..797badd914 100644 --- a/ext/standard/tests/file/readlink_realpath_variation1.phpt +++ b/ext/standard/tests/file/readlink_realpath_variation1.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ echo "*** Testing readlink() and realpath() : usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; $filename = "$name_prefix/readlink_realpath_variation1/home/tests/link/readlink_realpath_variation1.tmp"; mkdir("$name_prefix/readlink_realpath_variation1/home/tests/link/", 0777, true); @@ -65,7 +65,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_variation1"; +$name_prefix = __DIR__."/readlink_realpath_variation1"; unlink("$name_prefix/home/tests/link/readlink_realpath_variation1.tmp"); rmdir("$name_prefix/home/tests/link/"); rmdir("$name_prefix/home/tests/"); diff --git a/ext/standard/tests/file/readlink_realpath_variation2.phpt b/ext/standard/tests/file/readlink_realpath_variation2.phpt index c7add6b037..82deabecb6 100644 --- a/ext/standard/tests/file/readlink_realpath_variation2.phpt +++ b/ext/standard/tests/file/readlink_realpath_variation2.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ echo "*** Testing readlink() and realpath() : usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; // create temp dir mkdir("$name_prefix/readlink_realpath_variation2/home/tests/link/", 0777, true); // create the file @@ -60,7 +60,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/readlink_realpath_variation2"; +$name_prefix = __DIR__."/readlink_realpath_variation2"; unlink("$name_prefix/home/tests/link/readlink_realpath_variation2.tmp"); rmdir("$name_prefix/home/tests/link/"); rmdir("$name_prefix/home/tests/"); diff --git a/ext/standard/tests/file/readlink_variation1.phpt b/ext/standard/tests/file/readlink_variation1.phpt index c350a94c77..5ca25e8b2e 100644 --- a/ext/standard/tests/file/readlink_variation1.phpt +++ b/ext/standard/tests/file/readlink_variation1.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Testing readlink() with invalid arguments -int, float, bool, NULL, resource */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $file_handle = fopen($file_path."/readlink_variation2.tmp", "w"); echo "*** Testing Invalid file types ***\n"; @@ -44,7 +44,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/readlink_variation2.tmp"); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/realpath_basic-win32-mb.phpt b/ext/standard/tests/file/realpath_basic-win32-mb.phpt index dbfdfc41d6..e56d213631 100644 --- a/ext/standard/tests/file/realpath_basic-win32-mb.phpt +++ b/ext/standard/tests/file/realpath_basic-win32-mb.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "\n*** Testing basic functions of realpath() with files ***\n"; /* creating directories and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/realpath_私はガラスを食べられますbasic/home/test/", 0777, true); $file_handle1 = fopen("$file_path/realpath_私はガラスを食べられますbasic/home/test/realpath_私はガラスを食べられますbasic.tmp", "w"); @@ -53,7 +53,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_私はガラスを食べられますbasic"; +$name_prefix = __DIR__."/realpath_私はガラスを食べられますbasic"; unlink("$name_prefix/home/test/realpath_私はガラスを食べられますbasic.tmp"); unlink("$name_prefix/home/realpath_私はガラスを食べられますbasic.tmp"); unlink("$name_prefix/realpath_私はガラスを食べられますbasic.tmp"); diff --git a/ext/standard/tests/file/realpath_basic-win32.phpt b/ext/standard/tests/file/realpath_basic-win32.phpt index a768ca9540..e8020d199e 100644 --- a/ext/standard/tests/file/realpath_basic-win32.phpt +++ b/ext/standard/tests/file/realpath_basic-win32.phpt @@ -15,7 +15,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "\n*** Testing basic functions of realpath() with files ***\n"; /* creating directories and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/realpath_basic/home/test/", 0777, true); $file_handle1 = fopen("$file_path/realpath_basic/home/test/realpath_basic.tmp", "w"); @@ -53,7 +53,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_basic"; +$name_prefix = __DIR__."/realpath_basic"; unlink("$name_prefix/home/test/realpath_basic.tmp"); unlink("$name_prefix/home/realpath_basic.tmp"); unlink("$name_prefix/realpath_basic.tmp"); diff --git a/ext/standard/tests/file/realpath_basic3.phpt b/ext/standard/tests/file/realpath_basic3.phpt index ce9385591d..0feccfc150 100644 --- a/ext/standard/tests/file/realpath_basic3.phpt +++ b/ext/standard/tests/file/realpath_basic3.phpt @@ -9,7 +9,7 @@ Test realpath() with relative paths echo "\n*** Testing basic functions of realpath() with files ***\n"; /* creating directories and files */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/realpath_basic/home/test/", 0777, true); $file_handle1 = fopen("$file_path/realpath_basic/home/test/realpath_basic.tmp", "w"); @@ -50,7 +50,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_basic"; +$name_prefix = __DIR__."/realpath_basic"; unlink("$name_prefix/home/test/realpath_basic.tmp"); unlink("$name_prefix/home/realpath_basic.tmp"); unlink("$name_prefix/realpath_basic.tmp"); diff --git a/ext/standard/tests/file/realpath_basic4.phpt b/ext/standard/tests/file/realpath_basic4.phpt index d782b6d618..9001e23553 100644 --- a/ext/standard/tests/file/realpath_basic4.phpt +++ b/ext/standard/tests/file/realpath_basic4.phpt @@ -8,7 +8,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { ?> --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; @mkdir("$file_path/realpath_basic/home/test", 0777, true); @symlink("$file_path/realpath_basic/home", "$file_path/realpath_basic/link1"); @symlink("$file_path/realpath_basic/link1", "$file_path/realpath_basic/link2"); @@ -17,7 +17,7 @@ echo "2. " . realpath("$file_path/realpath_basic/link2/test") . "\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/realpath_basic/link2"); unlink("$file_path/realpath_basic/link1"); rmdir("$file_path/realpath_basic/home/test"); diff --git a/ext/standard/tests/file/realpath_variation-win32-mb.phpt b/ext/standard/tests/file/realpath_variation-win32-mb.phpt index 25ea530894..f0b79a0fd3 100644 --- a/ext/standard/tests/file/realpath_variation-win32-mb.phpt +++ b/ext/standard/tests/file/realpath_variation-win32-mb.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Returns canonicalized absolute pathname */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing realpath(): usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; $filename = "$name_prefix/realpath_variation_私はガラスを食べられます/home/tests/realpath_variation_私はガラスを食べられます.tmp"; mkdir("$name_prefix/realpath_variation_私はガラスを食べられます/home/tests/", 0777, true); @@ -69,7 +69,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_variation_私はガラスを食べられます"; +$name_prefix = __DIR__."/realpath_variation_私はガラスを食べられます"; unlink("$name_prefix/home/tests/realpath_variation_私はガラスを食べられます.tmp"); rmdir("$name_prefix/home/tests/"); rmdir("$name_prefix/home/"); diff --git a/ext/standard/tests/file/realpath_variation-win32.phpt b/ext/standard/tests/file/realpath_variation-win32.phpt index 8049d4c69a..a685beb20b 100644 --- a/ext/standard/tests/file/realpath_variation-win32.phpt +++ b/ext/standard/tests/file/realpath_variation-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Returns canonicalized absolute pathname */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; echo "*** Testing realpath(): usage variations ***\n"; -$name_prefix = dirname(__FILE__); +$name_prefix = __DIR__; $filename = "$name_prefix/realpath_variation/home/tests/realpath_variation.tmp"; mkdir("$name_prefix/realpath_variation/home/tests/", 0777, true); @@ -69,7 +69,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$name_prefix = dirname(__FILE__)."/realpath_variation"; +$name_prefix = __DIR__."/realpath_variation"; unlink("$name_prefix/home/tests/realpath_variation.tmp"); rmdir("$name_prefix/home/tests/"); rmdir("$name_prefix/home/"); diff --git a/ext/standard/tests/file/rename_basic.phpt b/ext/standard/tests/file/rename_basic.phpt index 238333e776..49de9ac042 100644 --- a/ext/standard/tests/file/rename_basic.phpt +++ b/ext/standard/tests/file/rename_basic.phpt @@ -7,7 +7,7 @@ Test rename() function: basic functionality */ echo "*** Testing rename() on non-existing file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; $src_name = "$file_path/rename_basic.tmp"; @@ -34,7 +34,7 @@ var_dump( compare_stats($old_stat, $new_stat, $keys_to_compare) ); ===Done=== --CLEAN-- <?php -unlink(dirname(__FILE__)."/rename_basic_new.tmp"); +unlink(__DIR__."/rename_basic_new.tmp"); ?> --EXPECT-- *** Testing rename() on non-existing file *** diff --git a/ext/standard/tests/file/rename_variation-win32.phpt b/ext/standard/tests/file/rename_variation-win32.phpt index 9aed95a189..9b194c689c 100644 --- a/ext/standard/tests/file/rename_variation-win32.phpt +++ b/ext/standard/tests/file/rename_variation-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* create directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/rename_variation"); /* rename files across directories */ @@ -56,7 +56,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation_link.tmp"); unlink($file_path."/rename_variation.tmp"); rmdir($file_path."/rename_variation_dir"); diff --git a/ext/standard/tests/file/rename_variation.phpt b/ext/standard/tests/file/rename_variation.phpt index 2f25d193f5..c347a223fc 100644 --- a/ext/standard/tests/file/rename_variation.phpt +++ b/ext/standard/tests/file/rename_variation.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { <?php /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/rename_variation"); /* rename files across directories */ diff --git a/ext/standard/tests/file/rename_variation1-win32.phpt b/ext/standard/tests/file/rename_variation1-win32.phpt index 764ba1cac4..c07aa3f6c1 100644 --- a/ext/standard/tests/file/rename_variation1-win32.phpt +++ b/ext/standard/tests/file/rename_variation1-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // rename dirs across directories echo "\n*** Testing rename() : renaming directory across directories ***\n"; @@ -58,7 +58,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation_link.tmp"); unlink($file_path."/rename_variation.tmp"); rmdir($file_path."/rename_variation_dir"); diff --git a/ext/standard/tests/file/rename_variation1.phpt b/ext/standard/tests/file/rename_variation1.phpt index 2998189bf2..46a10b24ea 100644 --- a/ext/standard/tests/file/rename_variation1.phpt +++ b/ext/standard/tests/file/rename_variation1.phpt @@ -10,7 +10,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { <?php /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // rename dirs across directories echo "\n*** Testing rename() : renaming directory across directories ***\n"; @@ -51,7 +51,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/rename_variation1_dir"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/rename_variation11-win32.phpt b/ext/standard/tests/file/rename_variation11-win32.phpt index bf93ecd450..fbf358f79b 100644 --- a/ext/standard/tests/file/rename_variation11-win32.phpt +++ b/ext/standard/tests/file/rename_variation11-win32.phpt @@ -18,7 +18,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") echo "*** Testing rename() with absolute and relative paths ***\n"; $mainDir = "renameVar11"; $subDir = "renameVar11Sub"; -$absMainDir = dirname(__FILE__)."\\".$mainDir; +$absMainDir = __DIR__."\\".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."\\".$subDir; mkdir($absSubDir); @@ -27,7 +27,7 @@ $fromFile = "renameMe.tmp"; $toFile = "IwasRenamed.tmp"; $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $unixifiedDir = '/'.substr(str_replace('\\','/',$absSubDir),3); diff --git a/ext/standard/tests/file/rename_variation12-win32.phpt b/ext/standard/tests/file/rename_variation12-win32.phpt index 0457976ea1..2c5b4a0ea8 100644 --- a/ext/standard/tests/file/rename_variation12-win32.phpt +++ b/ext/standard/tests/file/rename_variation12-win32.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. for Windows'); echo "*** Testing rename() with absolute and relative paths ***\n"; $mainDir = "renameVar11"; $subDir = "renameVar11Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); @@ -28,7 +28,7 @@ $fromFile = "renameMe.tmp"; $toFile = "IwasRenamed.tmp"; $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/rename_variation12.phpt b/ext/standard/tests/file/rename_variation12.phpt index a423496fbc..e2193a4fb9 100644 --- a/ext/standard/tests/file/rename_variation12.phpt +++ b/ext/standard/tests/file/rename_variation12.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip.. not for Windows'); echo "*** Testing rename() with absolute and relative paths ***\n"; $mainDir = "renameVar11"; $subDir = "renameVar11Sub"; -$absMainDir = dirname(__FILE__)."/".$mainDir; +$absMainDir = __DIR__."/".$mainDir; mkdir($absMainDir); $absSubDir = $absMainDir."/".$subDir; mkdir($absSubDir); @@ -28,7 +28,7 @@ $fromFile = "renameMe.tmp"; $toFile = "IwasRenamed.tmp"; $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $allDirs = array( // absolute paths diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt Binary files differindex 6319d4ad61..d8db734e38 100644 --- a/ext/standard/tests/file/rename_variation13-win32.phpt +++ b/ext/standard/tests/file/rename_variation13-win32.phpt diff --git a/ext/standard/tests/file/rename_variation13.phpt b/ext/standard/tests/file/rename_variation13.phpt index 2686150f23..1cadd8a438 100644 --- a/ext/standard/tests/file/rename_variation13.phpt +++ b/ext/standard/tests/file/rename_variation13.phpt @@ -16,7 +16,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") */ echo "*** Testing rename() with obscure files ***\n"; -$file_path = dirname(__FILE__)."/renameVar13"; +$file_path = __DIR__."/renameVar13"; $aFile = $file_path.'/afile.tmp'; mkdir($file_path); diff --git a/ext/standard/tests/file/rename_variation2-win32.phpt b/ext/standard/tests/file/rename_variation2-win32.phpt index cc01b928e5..86b5f71837 100644 --- a/ext/standard/tests/file/rename_variation2-win32.phpt +++ b/ext/standard/tests/file/rename_variation2-win32.phpt @@ -12,9 +12,9 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; -$file_path = dirname(__FILE__); +$file_path = __DIR__; mkdir("$file_path/rename_variation2_dir"); /* Renaming a file and directory to numeric name */ @@ -44,7 +44,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation2_link.tmp"); unlink($file_path."/rename_variation2.tmp"); rmdir($file_path."/rename_variation2_dir"); diff --git a/ext/standard/tests/file/rename_variation2.phpt b/ext/standard/tests/file/rename_variation2.phpt index d80a939b33..9a3ccf4da2 100644 --- a/ext/standard/tests/file/rename_variation2.phpt +++ b/ext/standard/tests/file/rename_variation2.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dest_dir = "$file_path/rename_variation2_dir"; // create the $dest_dir @@ -48,7 +48,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation2.tmp"); rmdir($file_path."/rename_variation2_dir"); ?> diff --git a/ext/standard/tests/file/rename_variation3-win32.phpt b/ext/standard/tests/file/rename_variation3-win32.phpt index 9f282a4661..b14b814295 100644 --- a/ext/standard/tests/file/rename_variation3-win32.phpt +++ b/ext/standard/tests/file/rename_variation3-win32.phpt @@ -12,10 +12,10 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Renames a file or directory */ -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* creating directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/rename_variation3_dir"; mkdir($dirname); @@ -54,7 +54,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation3_link.tmp"); unlink($file_path."/rename_variation3.tmp"); rmdir($file_path."/rename_variation3_dir"); diff --git a/ext/standard/tests/file/rename_variation3.phpt b/ext/standard/tests/file/rename_variation3.phpt index d76cdd09ef..173845e2e7 100644 --- a/ext/standard/tests/file/rename_variation3.phpt +++ b/ext/standard/tests/file/rename_variation3.phpt @@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dest_dir = "$file_path/rename_variation3_dir"; // create the $dest_dir @@ -43,7 +43,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation3_hard_link1.tmp"); rmdir($file_path."/rename_variation3_dir"); ?> diff --git a/ext/standard/tests/file/rename_variation4.phpt b/ext/standard/tests/file/rename_variation4.phpt index b6cab73d60..710539617e 100644 --- a/ext/standard/tests/file/rename_variation4.phpt +++ b/ext/standard/tests/file/rename_variation4.phpt @@ -9,9 +9,9 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; -require dirname(__FILE__).'/file.inc'; +require __DIR__.'/file.inc'; /* Renaming a file, link and directory to numeric name */ echo "\n*** Testing rename() by renaming a file, link and directory to numeric name ***\n"; @@ -37,7 +37,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir($file_path."/12345"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/rename_variation5.phpt b/ext/standard/tests/file/rename_variation5.phpt index 8ea2499eed..04a4e23c7c 100644 --- a/ext/standard/tests/file/rename_variation5.phpt +++ b/ext/standard/tests/file/rename_variation5.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* test rename() by trying to rename an existing file/dir/link to the same name and one another */ // create a dir -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/rename_variation5_dir"; mkdir($dirname); //create a file @@ -53,7 +53,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink($file_path."/rename_variation5_link.tmp"); unlink($file_path."/rename_variation5.tmp"); rmdir($file_path."/rename_variation5_dir"); diff --git a/ext/standard/tests/file/rename_variation7-win32.phpt b/ext/standard/tests/file/rename_variation7-win32.phpt index 845728627b..fb7c805cbf 100644 --- a/ext/standard/tests/file/rename_variation7-win32.phpt +++ b/ext/standard/tests/file/rename_variation7-win32.phpt @@ -11,7 +11,7 @@ if (!function_exists("symlink")) die("skip symlinks are not supported"); $tmp_link = __FILE__.".tmp.link"; $tmp_link2 = __FILE__.".tmp.link2"; -if (symlink(dirname(__FILE__)."/there_is_no_such_file", $tmp_link)) { +if (symlink(__DIR__."/there_is_no_such_file", $tmp_link)) { rename($tmp_link, $tmp_link2); } diff --git a/ext/standard/tests/file/rename_variation7.phpt b/ext/standard/tests/file/rename_variation7.phpt index dc5ce429b6..6ae52bc685 100644 --- a/ext/standard/tests/file/rename_variation7.phpt +++ b/ext/standard/tests/file/rename_variation7.phpt @@ -11,7 +11,7 @@ if (!function_exists("symlink")) die("skip symlinks are not supported"); $tmp_link = __FILE__.".tmp.link"; $tmp_link2 = __FILE__.".tmp.link2"; -symlink(dirname(__FILE__)."/there_is_no_such_file", $tmp_link); +symlink(__DIR__."/there_is_no_such_file", $tmp_link); rename($tmp_link, $tmp_link2); clearstatcache(); diff --git a/ext/standard/tests/file/rename_variation8-win32.phpt b/ext/standard/tests/file/rename_variation8-win32.phpt index 5fbe126305..df0fd55bb7 100644 --- a/ext/standard/tests/file/rename_variation8-win32.phpt +++ b/ext/standard/tests/file/rename_variation8-win32.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. for Windows'); */ echo "\n*** Testing rename() on non-existing file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // try renaming a non existing file $src_name = $file_path."/non_existent_file.tmp"; @@ -45,7 +45,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -rmdir(dirname(__FILE__)."/rename_basic_dir1"); +rmdir(__DIR__."/rename_basic_dir1"); ?> --EXPECTF-- *** Testing rename() on non-existing file *** diff --git a/ext/standard/tests/file/rename_variation8.phpt b/ext/standard/tests/file/rename_variation8.phpt index 58235aa626..660925b61f 100644 --- a/ext/standard/tests/file/rename_variation8.phpt +++ b/ext/standard/tests/file/rename_variation8.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip.. not for Windows'); */ echo "\n*** Testing rename() on non-existing file ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; // try renaming a non existing file $src_name = $file_path."/non_existent_file.tmp"; @@ -45,8 +45,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/rename_basic_new2.tmp"); -rmdir(dirname(__FILE__)."/rename_basic_dir1"); +unlink(__DIR__."/rename_basic_new2.tmp"); +rmdir(__DIR__."/rename_basic_dir1"); ?> --EXPECTF-- *** Testing rename() on non-existing file *** diff --git a/ext/standard/tests/file/rename_variation9.phpt b/ext/standard/tests/file/rename_variation9.phpt index 42897761b2..c90345be4e 100644 --- a/ext/standard/tests/file/rename_variation9.phpt +++ b/ext/standard/tests/file/rename_variation9.phpt @@ -7,7 +7,7 @@ Test rename() function: basic functionality */ echo "\n*** Testing rename() by giving stream context as third argument ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $context = stream_context_create(); @@ -38,8 +38,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/rename_variation9_new.tmp"); -rmdir(dirname(__FILE__)."/rename_variation_dir9_new"); +unlink(__DIR__."/rename_variation9_new.tmp"); +rmdir(__DIR__."/rename_variation_dir9_new"); ?> --EXPECT-- *** Testing rename() by giving stream context as third argument *** diff --git a/ext/standard/tests/file/stat_basic-win32-mb.phpt b/ext/standard/tests/file/stat_basic-win32-mb.phpt index 8ab15518b8..504e0f45ea 100644 --- a/ext/standard/tests/file/stat_basic-win32-mb.phpt +++ b/ext/standard/tests/file/stat_basic-win32-mb.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("$file_path/file.inc"); echo "*** Testing stat() : basic functionality ***\n"; @@ -64,7 +64,7 @@ echo "\n---Done---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_basic_私はガラスを食べられます/stat_basic_私はガラスを食べられます.tmp"); rmdir("$file_path/stat_basic_私はガラスを食べられます"); ?> diff --git a/ext/standard/tests/file/stat_basic-win32.phpt b/ext/standard/tests/file/stat_basic-win32.phpt index 14dbed311a..348ac2d380 100644 --- a/ext/standard/tests/file/stat_basic-win32.phpt +++ b/ext/standard/tests/file/stat_basic-win32.phpt @@ -13,7 +13,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require("$file_path/file.inc"); echo "*** Testing stat() : basic functionality ***\n"; @@ -64,7 +64,7 @@ echo "\n---Done---"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_basic/stat_basic.tmp"); rmdir("$file_path/stat_basic"); ?> diff --git a/ext/standard/tests/file/stat_error-win32.phpt b/ext/standard/tests/file/stat_error-win32.phpt index 20bffc79df..735a17cb26 100644 --- a/ext/standard/tests/file/stat_error-win32.phpt +++ b/ext/standard/tests/file/stat_error-win32.phpt @@ -13,13 +13,13 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description: Gives information about a file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $arr = array(__FILE__); echo "\n*** Testing stat() for error conditions ***\n"; var_dump( stat() ); // args < expected var_dump( stat(__FILE__, 2) ); // file, args > expected -var_dump( stat(dirname(__FILE__), 2) ); //dir, args > expected +var_dump( stat(__DIR__, 2) ); //dir, args > expected var_dump( stat("$file_path/temp.tmp") ); // non existing file var_dump( stat("$file_path/temp/") ); // non existing dir diff --git a/ext/standard/tests/file/stat_variation1-win32-mb.phpt b/ext/standard/tests/file/stat_variation1-win32-mb.phpt index 36ce34dea6..1db467632b 100644 --- a/ext/standard/tests/file/stat_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/stat_variation1-win32-mb.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of rename() on stats of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -72,7 +72,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation1a_私はガラスを食べられます.tmp"); rmdir("$file_path/stat_variation1a_私はガラスを食べられます"); ?> diff --git a/ext/standard/tests/file/stat_variation1-win32.phpt b/ext/standard/tests/file/stat_variation1-win32.phpt index eae08fcb28..26b1549e02 100644 --- a/ext/standard/tests/file/stat_variation1-win32.phpt +++ b/ext/standard/tests/file/stat_variation1-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of rename() on stats of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -72,7 +72,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation1a.tmp"); rmdir("$file_path/stat_variation1a"); ?> diff --git a/ext/standard/tests/file/stat_variation2-win32.phpt b/ext/standard/tests/file/stat_variation2-win32.phpt index 7877188833..2d4f44bf02 100644 --- a/ext/standard/tests/file/stat_variation2-win32.phpt +++ b/ext/standard/tests/file/stat_variation2-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of writing to a file on the stats of the file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -50,7 +50,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation2.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stat_variation3-win32.phpt b/ext/standard/tests/file/stat_variation3-win32.phpt index 46537c6d0f..c59d0b10ec 100644 --- a/ext/standard/tests/file/stat_variation3-win32.phpt +++ b/ext/standard/tests/file/stat_variation3-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of creating & deleting of subdir/file on the stats of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -61,7 +61,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; rmdir("$file_path/stat_variation3"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stat_variation4-win32.phpt b/ext/standard/tests/file/stat_variation4-win32.phpt index 5f52f8b8e5..d95eaaa2a7 100644 --- a/ext/standard/tests/file/stat_variation4-win32.phpt +++ b/ext/standard/tests/file/stat_variation4-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects on the stats of dir/file for using is_dir() & is_file() on dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -70,7 +70,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation4.tmp"); rmdir("$file_path/stat_variation4"); ?> diff --git a/ext/standard/tests/file/stat_variation5-win32.phpt b/ext/standard/tests/file/stat_variation5-win32.phpt index 4edca599d1..9f188bb307 100644 --- a/ext/standard/tests/file/stat_variation5-win32.phpt +++ b/ext/standard/tests/file/stat_variation5-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the stats of file opened in write mode and then same in read mode */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -51,7 +51,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation5.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stat_variation6-win32.phpt b/ext/standard/tests/file/stat_variation6-win32.phpt index 496ccac768..cf38bd3150 100644 --- a/ext/standard/tests/file/stat_variation6-win32.phpt +++ b/ext/standard/tests/file/stat_variation6-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects on the stats of dir/file for changing permissions of dir/file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -69,7 +69,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation6.tmp"); rmdir("$file_path/stat_variation6"); ?> diff --git a/ext/standard/tests/file/stat_variation7-win32.phpt b/ext/standard/tests/file/stat_variation7-win32.phpt index 2c8868b82d..320db156d4 100644 --- a/ext/standard/tests/file/stat_variation7-win32.phpt +++ b/ext/standard/tests/file/stat_variation7-win32.phpt @@ -16,7 +16,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the stats of dir/file when their names are stored in objects */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -63,7 +63,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation7.tmp"); unlink("$file_path/stat_variation7a.tmp"); rmdir("$file_path/stat_variation7"); diff --git a/ext/standard/tests/file/stat_variation8-win32.phpt b/ext/standard/tests/file/stat_variation8-win32.phpt index 0ecd956594..7a0cf65d41 100644 --- a/ext/standard/tests/file/stat_variation8-win32.phpt +++ b/ext/standard/tests/file/stat_variation8-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { /* test the effects of truncate() on stats of file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require "$file_path/file.inc"; @@ -62,7 +62,7 @@ echo "\n*** Done ***"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; unlink("$file_path/stat_variation8.tmp"); ?> --EXPECT-- diff --git a/ext/standard/tests/file/stream_copy_to_stream.phpt b/ext/standard/tests/file/stream_copy_to_stream.phpt index 1cc57b7f6d..b0c2d13846 100644 --- a/ext/standard/tests/file/stream_copy_to_stream.phpt +++ b/ext/standard/tests/file/stream_copy_to_stream.phpt @@ -4,8 +4,8 @@ stream_copy_to_stream() tests <?php define('WIN', substr(PHP_OS, 0, 3) == 'WIN'); -$initial_file = dirname(__FILE__).'/bug38086.txt'; -$new_file = dirname(__FILE__).'/bug38086_1.txt'; +$initial_file = __DIR__.'/bug38086.txt'; +$new_file = __DIR__.'/bug38086_1.txt'; $src = fopen($initial_file, 'r'); stream_filter_append($src, "string.rot13", STREAM_FILTER_READ); diff --git a/ext/standard/tests/file/stream_get_line.phpt b/ext/standard/tests/file/stream_get_line.phpt index 2c11f00eed..9421bd44c1 100644 --- a/ext/standard/tests/file/stream_get_line.phpt +++ b/ext/standard/tests/file/stream_get_line.phpt @@ -2,7 +2,7 @@ Crash inside stream_get_line(), when length=0 --FILE-- <?php -$path = dirname(__FILE__) . '/test.html'; +$path = __DIR__ . '/test.html'; file_put_contents($path, "foo<br>bar<br>foo"); $fp = fopen($path, "r"); diff --git a/ext/standard/tests/file/stream_rfc2397_003.phpt b/ext/standard/tests/file/stream_rfc2397_003.phpt index c92142d22a..291b1301c5 100644 --- a/ext/standard/tests/file/stream_rfc2397_003.phpt +++ b/ext/standard/tests/file/stream_rfc2397_003.phpt @@ -21,7 +21,7 @@ hhx4dbgYKAAA7', foreach($streams as $original => $stream) { if (is_string($original)) { - var_dump(file_get_contents(dirname(__FILE__) . '/' . $original) == file_get_contents($stream)); + var_dump(file_get_contents(__DIR__ . '/' . $original) == file_get_contents($stream)); } else { var_dump(file_get_contents($stream)); } diff --git a/ext/standard/tests/file/symlink.phpt b/ext/standard/tests/file/symlink.phpt index 228e459297..3afbfe6411 100644 --- a/ext/standard/tests/file/symlink.phpt +++ b/ext/standard/tests/file/symlink.phpt @@ -9,8 +9,8 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$filename = dirname(__FILE__)."/symlink.dat"; -$link = dirname(__FILE__)."/symlink.link"; +$filename = __DIR__."/symlink.dat"; +$link = __DIR__."/symlink.link"; var_dump(symlink($filename, $link)); var_dump(readlink($link)); @@ -21,7 +21,7 @@ var_dump(readlink($link)); var_dump(linkinfo($link)); touch($filename); -var_dump(symlink($filename, dirname(__FILE__))); +var_dump(symlink($filename, __DIR__)); @unlink($link); var_dump(symlink($filename, $link)); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt index 09fb35c973..89d6478d73 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic1.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gets information about a link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir created in present working directory $dirname = "symlink_link_linkinfo_is_link_basic1"; @@ -85,7 +85,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$dirname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_basic1"; +$dirname = __DIR__."/symlink_link_linkinfo_is_link_basic1"; unlink("$dirname/symlink_link_linkinfo_is_link_basic1.tmp"); rmdir($dirname); ?> diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt index 4df4872f35..fad0987540 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_basic2.phpt @@ -21,7 +21,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Gets information about a link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing symlink(), linkinfo(), link() and is_link() : basic functionality ***\n"; @@ -66,7 +66,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$dirname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_basic2"; +$dirname = __DIR__."/symlink_link_linkinfo_is_link_basic2"; rmdir($dirname); ?> --EXPECTF-- diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt index 7e8b5b24cf..ddee40ecdd 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error1.phpt @@ -25,12 +25,12 @@ if (substr(PHP_OS, 0, 3) == 'SUN') { */ // create temp $filename and create link $linkname to it -$filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link_error1.tmp"; +$filename = __DIR__."/symlink_link_linkinfo_is_link_error1.tmp"; $fp = fopen($filename, "w"); // create temp file fclose($fp); // linkname used to create soft/hard link -$linkname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error1.tmp"; +$linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error1.tmp"; echo "*** Testing symlink() for error conditions ***\n"; //zero arguments @@ -63,8 +63,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_error1.tmp"); -@unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error1.tmp"); +unlink(__DIR__."/symlink_link_linkinfo_is_link_error1.tmp"); +@unlink(__DIR__."/symlink_link_linkinfo_is_link_link_error1.tmp"); ?> --EXPECTF-- *** Testing symlink() for error conditions *** diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt index fc891fde7b..7e22741aa8 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_error2.phpt @@ -22,12 +22,12 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { */ // create temp $filename and create link $linkname to it -$filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link_error2.tmp"; +$filename = __DIR__."/symlink_link_linkinfo_is_link_error2.tmp"; $fp = fopen($filename, "w"); // create temp file fclose($fp); // linkname used to create soft/hard link -$linkname = dirname(__FILE__)."/symlink_link_linkinfo_is_link_link_error2.tmp"; +$linkname = __DIR__."/symlink_link_linkinfo_is_link_link_error2.tmp"; echo "*** Testing link() for error conditions ***\n"; //zero arguments @@ -63,7 +63,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/symlink_link_linkinfo_is_link_error2.tmp"); +unlink(__DIR__."/symlink_link_linkinfo_is_link_error2.tmp"); ?> --EXPECTF-- *** Testing link() for error conditions *** diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt index 12e5da17e8..4daaba4aa9 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation1.phpt @@ -24,7 +24,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 1 : Creating links across directories where linkname is stored as an object and array member */ // creating temp directory which will contain temp file and links created -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation1/test/home"; mkdir($dirname, 0777, true); @@ -102,7 +102,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation1"; unlink("$dirname/symlink_link_linkinfo_is_link_variation1.tmp"); rmdir("$dirname/test/home"); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt index 6ee6f12429..c88e426e6c 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation2.phpt @@ -23,7 +23,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 2 : Create hard link to non-existent file */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // non-existing filename $non_existent_file = "$file_path/non_existent_file_variation2.tmp"; // non-existing linkname diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt index edb2889d41..8207b698f3 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation3.phpt @@ -27,7 +27,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Check size of file and soft link link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Accessing and updating data of file through soft link ***\n"; // Creating file and inserting data into it $filename = "$file_path/symlink_link_linkinfo_is_link_variation3.tmp"; diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt index c69d2d2b04..5bcf472447 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation4.phpt @@ -26,7 +26,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Update the file through hard link Check size of file and hard link */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Accessing and updating data of file through hard link ***\n"; // Creating file and inserting data into it diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt index f7d27748ee..fe6edcdd90 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation5.phpt @@ -23,7 +23,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 5 : Creating link, deleting it and checking linkinfo(), is_link() on it */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing linkinfo() and is_link() on deleted link ***\n"; // link name used here @@ -58,7 +58,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation5"; $filename = "$dirname/symlink_link_linkinfo_is_link_variation5.tmp"; unlink($filename); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt index ddebad4f8c..3a829580ea 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation6.phpt @@ -7,7 +7,7 @@ if ( substr(PHP_OS, 0, 3) == 'WIN' ) { } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/symlink_link_linkinfo_is_link6_check_root.tmp"; +$filename = __DIR__."/symlink_link_linkinfo_is_link6_check_root.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -33,7 +33,7 @@ unlink($filename); */ /* Variation 6 : Change permission of directory and try creating links inside that directory */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Creating links in a directory without permission to allow the operation ***\n"; // temp file used @@ -67,7 +67,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = "$file_path/symlink_link_linkinfo_is_link_variation6"; $filename = "$dirname/symlink_link_linkinfo_is_link_variation6.tmp"; if(file_exists($filename)) { diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt index df63dcfc5d..ee49aaa5c9 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation7.phpt @@ -24,7 +24,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Variation 7 : Create soft/hard link to itself */ // temp file used -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir = "$file_path/symlink_link_linkinfo_is_link_variation7"; $filename = "$dir/symlink_link_linkinfo_is_link_variation7.tmp"; // link name used @@ -65,7 +65,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir = "$file_path/symlink_link_linkinfo_is_link_variation7"; $filename = "$dir/symlink_link_linkinfo_is_link_variation7.tmp"; unlink($filename); diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt index 27b8f58ef8..883ea59884 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation8.phpt @@ -26,7 +26,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* creating link to a file in different dir with the same name as the file */ echo "\n*** Create hard link in different directory with same filename ***\n"; // temp file used -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/symlink_link_linkinfo_is_link_variation8.tmp"; // temp link name used $dirname = "$file_path/symlink_link_linkinfo_is_link1_variation8"; diff --git a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt index 8a771b27b9..04daa591b0 100644 --- a/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt +++ b/ext/standard/tests/file/symlink_link_linkinfo_is_link_variation9.phpt @@ -25,7 +25,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Check linkinfo() value with lstat['dev'] */ // temp file used -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = $file_path."/symlink_link_linkinfo_is_link_variation9"; mkdir($dirname); $filename = "$dirname/symlink_link_linkinfo_is_link_variation9.tmp"; @@ -91,7 +91,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dirname = $file_path."/symlink_link_linkinfo_is_link_variation9"; $filename = "$dirname/symlink_link_linkinfo_is_link_variation9.tmp"; unlink($filename); diff --git a/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt b/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt index 3e659c092c..99450dce02 100644 --- a/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/tempnam_variation1-win32-mb.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating number of unique files by passing a file name as prefix */ -$file_path = dirname(__FILE__)."/tempnamVar1_私はガラスを食べられます"; +$file_path = __DIR__."/tempnamVar1_私はガラスを食べられます"; mkdir($file_path); echo "*** Testing tempnam() in creation of unique files ***\n"; diff --git a/ext/standard/tests/file/tempnam_variation1-win32.phpt b/ext/standard/tests/file/tempnam_variation1-win32.phpt index a571a7cd5b..5094fa4e88 100644 --- a/ext/standard/tests/file/tempnam_variation1-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation1-win32.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating number of unique files by passing a file name as prefix */ -$file_path = dirname(__FILE__)."/tempnamVar1"; +$file_path = __DIR__."/tempnamVar1"; mkdir($file_path); echo "*** Testing tempnam() in creation of unique files ***\n"; diff --git a/ext/standard/tests/file/tempnam_variation1.phpt b/ext/standard/tests/file/tempnam_variation1.phpt index dbdc396656..762b4eab73 100644 --- a/ext/standard/tests/file/tempnam_variation1.phpt +++ b/ext/standard/tests/file/tempnam_variation1.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Creating number of unique files by passing a file name as prefix */ -$file_path = dirname(__FILE__)."/tempnamVar1"; +$file_path = __DIR__."/tempnamVar1"; mkdir($file_path); echo "*** Testing tempnam() in creation of unique files ***\n"; diff --git a/ext/standard/tests/file/tempnam_variation2-win32.phpt b/ext/standard/tests/file/tempnam_variation2-win32.phpt index 60fe951353..a3a4d2dba9 100644 --- a/ext/standard/tests/file/tempnam_variation2-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation2-win32.phpt @@ -14,13 +14,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating unique files in various dirs by passing relative paths to $dir arg */ echo "*** Testing tempnam() with absolute and relative paths ***\n"; -$dir_name = dirname(__FILE__)."/tempnam_variation2"; +$dir_name = __DIR__."/tempnam_variation2"; mkdir($dir_name); $dir_path = $dir_name."/tempnam_variation2_sub"; mkdir($dir_path); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $dir_paths = array( // absolute paths diff --git a/ext/standard/tests/file/tempnam_variation2.phpt b/ext/standard/tests/file/tempnam_variation2.phpt index dd98b40e8b..17a1e6d645 100644 --- a/ext/standard/tests/file/tempnam_variation2.phpt +++ b/ext/standard/tests/file/tempnam_variation2.phpt @@ -14,13 +14,13 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Creating unique files in various dirs by passing relative paths to $dir arg */ echo "*** Testing tempnam() with absolute and relative paths ***\n"; -$dir_name = dirname(__FILE__)."/tempnam_variation2"; +$dir_name = __DIR__."/tempnam_variation2"; mkdir($dir_name); $dir_path = $dir_name."/tempnam_variation2_sub"; mkdir($dir_path); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $dir_paths = array( // absolute paths diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index 6d5071b5e5..c79aabfb62 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Passing invalid/non-existing args for $prefix */ echo "*** Testing tempnam() with obscure prefixes ***\n"; -$file_path = dirname(__FILE__)."/tempnamVar3"; +$file_path = __DIR__."/tempnamVar3"; if (!mkdir($file_path)) { echo "Failed, cannot create temp dir $filepath\n"; exit(1); diff --git a/ext/standard/tests/file/tempnam_variation3.phpt b/ext/standard/tests/file/tempnam_variation3.phpt index 2d95cb0a43..856667fa49 100644 --- a/ext/standard/tests/file/tempnam_variation3.phpt +++ b/ext/standard/tests/file/tempnam_variation3.phpt @@ -14,7 +14,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Passing invalid/non-existing args for $prefix */ echo "*** Testing tempnam() with obscure prefixes ***\n"; -$file_path = dirname(__FILE__)."/tempnamVar3"; +$file_path = __DIR__."/tempnamVar3"; mkdir($file_path); /* An array of prefixes */ diff --git a/ext/standard/tests/file/tempnam_variation4-0.phpt b/ext/standard/tests/file/tempnam_variation4-0.phpt index 47da53df01..4c3688a348 100644 --- a/ext/standard/tests/file/tempnam_variation4-0.phpt +++ b/ext/standard/tests/file/tempnam_variation4-0.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not valid for Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); */ echo "*** Testing tempnam() with dir of permissions from 0000 to 0350 ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/tempnam_variation4"; $prefix = "tempnamVar4."; diff --git a/ext/standard/tests/file/tempnam_variation4-1.phpt b/ext/standard/tests/file/tempnam_variation4-1.phpt index 39f1fb0053..246608a336 100644 --- a/ext/standard/tests/file/tempnam_variation4-1.phpt +++ b/ext/standard/tests/file/tempnam_variation4-1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip Not valid for Windows'); } // Skip if being run by root -$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$filename = __DIR__."/is_readable_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); */ echo "*** Testing tempnam() with dir of permissions from 0351 to 0777 ***\n"; -$file_path = dirname(__FILE__); +$file_path = __DIR__; $dir_name = $file_path."/tempnam_variation4"; $prefix = "tempnamVar4."; diff --git a/ext/standard/tests/file/tempnam_variation5-win32.phpt b/ext/standard/tests/file/tempnam_variation5-win32.phpt index d2e708bc30..71bfd06619 100644 --- a/ext/standard/tests/file/tempnam_variation5-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation5-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Passing an existing file as $prefix for tempnam() fn */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test tempnam() function: by passing an existing filename as prefix ***\n"; $dir_name = $file_path."/tempnam_variation6"; diff --git a/ext/standard/tests/file/tempnam_variation5.phpt b/ext/standard/tests/file/tempnam_variation5.phpt index fdfcee9bed..62a186c37c 100644 --- a/ext/standard/tests/file/tempnam_variation5.phpt +++ b/ext/standard/tests/file/tempnam_variation5.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Passing an existing file as $prefix for tempnam() fn */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Test tempnam() function: by passing an existing filename as prefix ***\n"; $dir_name = $file_path."/tempnam_variation5"; diff --git a/ext/standard/tests/file/tempnam_variation6-win32.phpt b/ext/standard/tests/file/tempnam_variation6-win32.phpt index acaa1abf50..c7a449c590 100644 --- a/ext/standard/tests/file/tempnam_variation6-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation6-win32.phpt @@ -15,7 +15,7 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Trying to create unique files by passing previously created unique file name as prefix */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Test tempnam(): by passing previously created filenames ***\n"; $file_name = "tempnam_variation6.tmp"; diff --git a/ext/standard/tests/file/tempnam_variation6.phpt b/ext/standard/tests/file/tempnam_variation6.phpt index 08a9fce4de..db40292e25 100644 --- a/ext/standard/tests/file/tempnam_variation6.phpt +++ b/ext/standard/tests/file/tempnam_variation6.phpt @@ -13,7 +13,7 @@ if(substr(PHP_OS, 0, 3) == "WIN") /* Trying to create unique files by passing previously created unique file name as prefix */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "\n*** Test tempnam(): by passing previously created filenames ***\n"; $file_name = "tempnam_variation6.tmp"; diff --git a/ext/standard/tests/file/tempnam_variation8-win32.phpt b/ext/standard/tests/file/tempnam_variation8-win32.phpt index cceda6438f..5751368f7c 100644 --- a/ext/standard/tests/file/tempnam_variation8-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation8-win32.phpt @@ -16,13 +16,13 @@ if(substr(PHP_OS, 0, 3) != "WIN") /* Creating unique files in various dirs by passing relative paths to $dir arg */ echo "*** Testing tempnam() with absolute and relative paths ***\n"; -$dir_name = dirname(__FILE__)."\\tempnam_variation2"; +$dir_name = __DIR__."\\tempnam_variation2"; mkdir($dir_name); $dir_path = $dir_name."/tempnam_variation2_sub"; mkdir($dir_path); $old_dir_path = getcwd(); -chdir(dirname(__FILE__)); +chdir(__DIR__); $dir_paths = array( // absolute paths diff --git a/ext/standard/tests/file/touch.phpt b/ext/standard/tests/file/touch.phpt index 42d1fad1e5..e0b06d3960 100644 --- a/ext/standard/tests/file/touch.phpt +++ b/ext/standard/tests/file/touch.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { // This doesn't work for windows, time, atime usage results in very different // output to linux. This could be a php.net bug on windows or a windows querk. -$filename = dirname(__FILE__)."/touch.dat"; +$filename = __DIR__."/touch.dat"; var_dump(touch()); var_dump(touch($filename)); diff --git a/ext/standard/tests/file/touch_basic-win32-mb.phpt b/ext/standard/tests/file/touch_basic-win32-mb.phpt index 2572688174..e10e1219d8 100644 --- a/ext/standard/tests/file/touch_basic-win32-mb.phpt +++ b/ext/standard/tests/file/touch_basic-win32-mb.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing touch() : basic functionality ***\n"; -$filename = dirname(__FILE__)."/touch_私はガラスを食べられます.dat"; +$filename = __DIR__."/touch_私はガラスを食べられます.dat"; echo "\n--- testing touch creates a file ---\n"; @unlink($filename); diff --git a/ext/standard/tests/file/touch_basic-win32.phpt b/ext/standard/tests/file/touch_basic-win32.phpt index 481d476f54..08248ac760 100644 --- a/ext/standard/tests/file/touch_basic-win32.phpt +++ b/ext/standard/tests/file/touch_basic-win32.phpt @@ -18,7 +18,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { echo "*** Testing touch() : basic functionality ***\n"; -$filename = dirname(__FILE__)."/touch.dat"; +$filename = __DIR__."/touch.dat"; echo "\n--- testing touch creates a file ---\n"; @unlink($filename); diff --git a/ext/standard/tests/file/touch_basic.phpt b/ext/standard/tests/file/touch_basic.phpt index a4c319aefa..ffce02e574 100644 --- a/ext/standard/tests/file/touch_basic.phpt +++ b/ext/standard/tests/file/touch_basic.phpt @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { echo "*** Testing touch() : basic functionality ***\n"; -$filename = dirname(__FILE__)."/touch_basic.dat"; +$filename = __DIR__."/touch_basic.dat"; echo "\n--- testing touch creates a file ---\n"; @unlink($filename); diff --git a/ext/standard/tests/file/touch_variation1.phpt b/ext/standard/tests/file/touch_variation1.phpt index eaf4c46b1d..01599cfcf6 100644 --- a/ext/standard/tests/file/touch_variation1.phpt +++ b/ext/standard/tests/file/touch_variation1.phpt @@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { --FILE-- <?php -$filename = dirname(__FILE__)."/touch.dat"; +$filename = __DIR__."/touch.dat"; var_dump(touch($filename, 101)); diff --git a/ext/standard/tests/file/touch_variation2.phpt b/ext/standard/tests/file/touch_variation2.phpt index a3596adc6b..e9bcf7ef3c 100644 --- a/ext/standard/tests/file/touch_variation2.phpt +++ b/ext/standard/tests/file/touch_variation2.phpt @@ -6,7 +6,7 @@ Dave Kelsey <d_kelsey@uk.ibm.com> <?php -$filename = dirname(__FILE__)."/touch_variation2.dat"; +$filename = __DIR__."/touch_variation2.dat"; $fp=fopen($filename,"w"); fwrite ($fp,"mydata"); fclose($fp); diff --git a/ext/standard/tests/file/umask_variation1.phpt b/ext/standard/tests/file/umask_variation1.phpt index 6f5bdc4480..77eada18e5 100644 --- a/ext/standard/tests/file/umask_variation1.phpt +++ b/ext/standard/tests/file/umask_variation1.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Changes the current umask */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; /* Check umask() on file/dir */ diff --git a/ext/standard/tests/file/umask_variation2.phpt b/ext/standard/tests/file/umask_variation2.phpt index b302bea969..6eac520f1c 100644 --- a/ext/standard/tests/file/umask_variation2.phpt +++ b/ext/standard/tests/file/umask_variation2.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description: Changes the current umask */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; /* Check umask() on file/dir */ diff --git a/ext/standard/tests/file/unlink_basic.phpt b/ext/standard/tests/file/unlink_basic.phpt index 172ad0551a..872326bad8 100644 --- a/ext/standard/tests/file/unlink_basic.phpt +++ b/ext/standard/tests/file/unlink_basic.phpt @@ -6,7 +6,7 @@ Testing unlink() function : basic functionality Description : Deletes filename */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing unlink() on a file ***\n"; $filename = "$file_path/unlink_basic.tmp"; // temp file name used here diff --git a/ext/standard/tests/file/unlink_error-win32-mb.phpt b/ext/standard/tests/file/unlink_error-win32-mb.phpt index efd6ee8323..a208e5675b 100644 --- a/ext/standard/tests/file/unlink_error-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_error-win32-mb.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description : Deletes filename */ -$file_path = dirname(__FILE__).DIRECTORY_SEPARATOR."私はガラスを食べられます"; +$file_path = __DIR__.DIRECTORY_SEPARATOR."私はガラスを食べられます"; @mkdir($file_path); @@ -48,7 +48,7 @@ var_dump( unlink($filename, false) ); // $context as boolean false echo "\n-- Testing unlink() on non-existent file --\n"; -var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") ); +var_dump( unlink(__DIR__."/non_existent_file.tmp") ); echo "\n-- Testing unlink() on directory --\n"; // temp directory used here @@ -62,9 +62,9 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/私はガラスを食べられます/unlink_error.tmp"); -rmdir(dirname(__FILE__)."/私はガラスを食べられます/unlink_error"); -rmdir(dirname(__FILE__)."/私はガラスを食べられます"); +unlink(__DIR__."/私はガラスを食べられます/unlink_error.tmp"); +rmdir(__DIR__."/私はガラスを食べられます/unlink_error"); +rmdir(__DIR__."/私はガラスを食べられます"); ?> --EXPECTF-- *** Testing unlink() : error conditions *** diff --git a/ext/standard/tests/file/unlink_error-win32.phpt b/ext/standard/tests/file/unlink_error-win32.phpt index 8dde64cff0..d62c715a94 100644 --- a/ext/standard/tests/file/unlink_error-win32.phpt +++ b/ext/standard/tests/file/unlink_error-win32.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { Description : Deletes filename */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/unlink_error.tmp"; // temp file name used here $fp = fopen($filename, "w"); // create file @@ -46,7 +46,7 @@ var_dump( unlink($filename, false) ); // $context as boolean false echo "\n-- Testing unlink() on non-existent file --\n"; -var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") ); +var_dump( unlink(__DIR__."/non_existent_file.tmp") ); echo "\n-- Testing unlink() on directory --\n"; // temp directory used here @@ -60,8 +60,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/unlink_error.tmp"); -rmdir(dirname(__FILE__)."/unlink_error"); +unlink(__DIR__."/unlink_error.tmp"); +rmdir(__DIR__."/unlink_error"); ?> --EXPECTF-- *** Testing unlink() : error conditions *** diff --git a/ext/standard/tests/file/unlink_error.phpt b/ext/standard/tests/file/unlink_error.phpt index f7f8f00847..61aac03dd3 100644 --- a/ext/standard/tests/file/unlink_error.phpt +++ b/ext/standard/tests/file/unlink_error.phpt @@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { Description : Deletes filename */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; $filename = "$file_path/unlink_error.tmp"; // temp file name used here $fp = fopen($filename, "w"); // create file @@ -46,7 +46,7 @@ var_dump( unlink($filename, false) ); // $context as boolean false echo "\n-- Testing unlink() on non-existent file --\n"; -var_dump( unlink(dirname(__FILE__)."/non_existent_file.tmp") ); +var_dump( unlink(__DIR__."/non_existent_file.tmp") ); echo "\n-- Testing unlink() on directory --\n"; // temp directory used here @@ -60,8 +60,8 @@ echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/unlink_error.tmp"); -rmdir(dirname(__FILE__)."/unlink_error"); +unlink(__DIR__."/unlink_error.tmp"); +rmdir(__DIR__."/unlink_error"); ?> --EXPECTF-- *** Testing unlink() : error conditions *** diff --git a/ext/standard/tests/file/unlink_variation1-win32-mb.phpt b/ext/standard/tests/file/unlink_variation1-win32-mb.phpt index adfb10edfe..e18049fdbe 100644 --- a/ext/standard/tests/file/unlink_variation1-win32-mb.phpt +++ b/ext/standard/tests/file/unlink_variation1-win32-mb.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ -$file_path = dirname(__FILE__).DIRECTORY_SEPARATOR."私はガラスを食べられます"; +$file_path = __DIR__.DIRECTORY_SEPARATOR."私はガラスを食べられます"; @mkdir($file_path); // temp dir name used here diff --git a/ext/standard/tests/file/unlink_variation1-win32.phpt b/ext/standard/tests/file/unlink_variation1-win32.phpt index b00e546d01..7be1421f77 100644 --- a/ext/standard/tests/file/unlink_variation1-win32.phpt +++ b/ext/standard/tests/file/unlink_variation1-win32.phpt @@ -17,7 +17,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir name used here $dirname = "$file_path/unlink_variation1"; diff --git a/ext/standard/tests/file/unlink_variation1.phpt b/ext/standard/tests/file/unlink_variation1.phpt index c76e236566..0ce7cdf74f 100644 --- a/ext/standard/tests/file/unlink_variation1.phpt +++ b/ext/standard/tests/file/unlink_variation1.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip only on Linux'); } // Skip if being run by root (files are always readable, writeable and executable) -$filename = dirname(__FILE__)."/unlink_root_check.tmp"; +$filename = __DIR__."/unlink_root_check.tmp"; $fp = fopen($filename, 'w'); fclose($fp); if(fileowner($filename) == 0) { @@ -27,7 +27,7 @@ unlink($filename); */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp dir name used here $dirname = "$file_path/unlink_variation1"; diff --git a/ext/standard/tests/file/unlink_variation2.phpt b/ext/standard/tests/file/unlink_variation2.phpt index 0044cbe303..09fa7dac74 100644 --- a/ext/standard/tests/file/unlink_variation2.phpt +++ b/ext/standard/tests/file/unlink_variation2.phpt @@ -8,7 +8,7 @@ Test unlink() function : usage variations - unlink file in use /* Try to unlink file when file handle is still in use */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; echo "*** Testing unlink() on a file which is in use ***\n"; // temp file name used here diff --git a/ext/standard/tests/file/unlink_variation3.phpt b/ext/standard/tests/file/unlink_variation3.phpt index b332ab7b27..1cab0630a6 100644 --- a/ext/standard/tests/file/unlink_variation3.phpt +++ b/ext/standard/tests/file/unlink_variation3.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* Delete link files - soft and hard links */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used $filename = "$file_path/unlink_variation3.tmp"; diff --git a/ext/standard/tests/file/unlink_variation4.phpt b/ext/standard/tests/file/unlink_variation4.phpt index 746cfd3249..bc88b48adf 100644 --- a/ext/standard/tests/file/unlink_variation4.phpt +++ b/ext/standard/tests/file/unlink_variation4.phpt @@ -8,7 +8,7 @@ Test unlink() function : usage variations - unlink deleted file /* Try deleting a file which is already deleted */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used $filename = "$file_path/unlink_variation4.tmp"; diff --git a/ext/standard/tests/file/unlink_variation5.phpt b/ext/standard/tests/file/unlink_variation5.phpt index 071b14086a..bb6fd4b884 100644 --- a/ext/standard/tests/file/unlink_variation5.phpt +++ b/ext/standard/tests/file/unlink_variation5.phpt @@ -14,7 +14,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { /* delete files with different file permission(0000 to 0777) */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; // temp file used $filename = "$file_path/unlink_variation5.tmp"; diff --git a/ext/standard/tests/file/windows_links/bug76335.phpt b/ext/standard/tests/file/windows_links/bug76335.phpt index 6762dc9fb6..6ad374ab95 100644 --- a/ext/standard/tests/file/windows_links/bug76335.phpt +++ b/ext/standard/tests/file/windows_links/bug76335.phpt @@ -9,10 +9,10 @@ if(substr(PHP_OS, 0, 3) != 'WIN' ) { --FILE-- <?php -$d0 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "á"; -$d1 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "a"; +$d0 = __DIR__ . DIRECTORY_SEPARATOR . "á"; +$d1 = __DIR__ . DIRECTORY_SEPARATOR . "a"; -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "file"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "file"; $l0 = $d0 . DIRECTORY_SEPARATOR . "b"; $l1 = $d1 . DIRECTORY_SEPARATOR . "b"; @@ -32,10 +32,10 @@ var_dump(link($d1 . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "file", $ --CLEAN-- <?php -$d0 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "á"; -$d1 = dirname(__FILE__) . DIRECTORY_SEPARATOR . "a"; +$d0 = __DIR__ . DIRECTORY_SEPARATOR . "á"; +$d1 = __DIR__ . DIRECTORY_SEPARATOR . "a"; -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "file"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "file"; $l0 = $d0 . DIRECTORY_SEPARATOR . "b"; $l1 = $d1 . DIRECTORY_SEPARATOR . "b"; diff --git a/ext/standard/tests/file/windows_mb_path/bug54028.phpt b/ext/standard/tests/file/windows_mb_path/bug54028.phpt index 7dc6d0e8b8..7b304c70f4 100644 --- a/ext/standard/tests/file/windows_mb_path/bug54028.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug54028.phpt @@ -2,7 +2,7 @@ Bug #54028 Directory::read() cannot handle non-unicode chars properly --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts("mbstring"); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; $dirs = array("a", "ソ", "ゾ", "şŞıİğĞ", "多国語", "王", "汚れて掘る"); diff --git a/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt b/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt index fef7394c24..81be60e640 100644 --- a/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug54028_2.phpt @@ -2,7 +2,7 @@ Bug #54028 realpath(".") return false --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug54028" . DIRECTORY_SEPARATOR; $dirs = array("a", "ソ", "ゾ", "şŞıİğĞ", "多国語", "王", "汚れて掘る"); diff --git a/ext/standard/tests/file/windows_mb_path/bug54977.phpt b/ext/standard/tests/file/windows_mb_path/bug54977.phpt index b1bc415f05..173aed480f 100644 --- a/ext/standard/tests/file/windows_mb_path/bug54977.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug54977.phpt @@ -2,7 +2,7 @@ Bug #54977 UTF-8 files and folder are not shown --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug54977" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug54977" . DIRECTORY_SEPARATOR; $paths = array("多国語", "王", "汚れて掘る"); diff --git a/ext/standard/tests/file/windows_mb_path/bug61315.phpt b/ext/standard/tests/file/windows_mb_path/bug61315.phpt index 6ce056a250..1e97636175 100644 --- a/ext/standard/tests/file/windows_mb_path/bug61315.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug61315.phpt @@ -2,7 +2,7 @@ Bug #61315 stat() fails with specific DBCS characters --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug61315" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug61315" . DIRECTORY_SEPARATOR; $d0 = $prefix . "ソフト"; $d1 = $prefix . "フォルダ"; diff --git a/ext/standard/tests/file/windows_mb_path/bug64506.phpt b/ext/standard/tests/file/windows_mb_path/bug64506.phpt index 6d9367f857..44d5c6f5f7 100644 --- a/ext/standard/tests/file/windows_mb_path/bug64506.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug64506.phpt @@ -2,7 +2,7 @@ PHP can not read or write file correctly if file name have special char like š --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,9 +16,9 @@ skip_if_no_required_exts(); #vim: set encoding=UTF-8 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$fnw = dirname(__FILE__) . DIRECTORY_SEPARATOR . "š.txt"; // UTF-8 +$fnw = __DIR__ . DIRECTORY_SEPARATOR . "š.txt"; // UTF-8 $f = fopen($fnw, 'w'); if ($f) { diff --git a/ext/standard/tests/file/windows_mb_path/bug64699.phpt b/ext/standard/tests/file/windows_mb_path/bug64699.phpt index 3ad000a3b4..db488c15ed 100644 --- a/ext/standard/tests/file/windows_mb_path/bug64699.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug64699.phpt @@ -2,7 +2,7 @@ Bug #64699 is_dir() is inaccurate result on Windows with japanese locale. --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,12 +14,12 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $old_cp = get_active_cp(); set_active_cp(65001); -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug64699" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug64699" . DIRECTORY_SEPARATOR; $dirs = array("a", "ソ", "ゾ", "şŞıİğĞ", "多国語", "表"); diff --git a/ext/standard/tests/file/windows_mb_path/bug70903.phpt b/ext/standard/tests/file/windows_mb_path/bug70903.phpt index 863fd4ab2e..8d529484be 100644 --- a/ext/standard/tests/file/windows_mb_path/bug70903.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug70903.phpt @@ -2,7 +2,7 @@ Bug #70903 scandir wrongly interprets the Turkish "ı" character --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,9 +14,9 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "testBug70903" . DIRECTORY_SEPARATOR; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "testBug70903" . DIRECTORY_SEPARATOR; $d0 = $prefix . "ı"; diff --git a/ext/standard/tests/file/windows_mb_path/bug71509.phpt b/ext/standard/tests/file/windows_mb_path/bug71509.phpt index 418c35cd25..ed094c6b7a 100644 --- a/ext/standard/tests/file/windows_mb_path/bug71509.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug71509.phpt @@ -2,7 +2,7 @@ Bug #71509 Zip problem with swedish letters in filename. --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -13,7 +13,7 @@ skip_if_no_required_exts("zip"); <?PHP // -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv("ISO-8859-1", "UTF-8", "Rd_Statistics"); // cp1252 $prefix = create_data("bug71509", "$item.txt"); diff --git a/ext/standard/tests/file/windows_mb_path/bug74923.phpt b/ext/standard/tests/file/windows_mb_path/bug74923.phpt index 3660202a4c..210a49732f 100644 --- a/ext/standard/tests/file/windows_mb_path/bug74923.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug74923.phpt @@ -2,7 +2,7 @@ Bug #74923 Crash when crawling through network share --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); diff --git a/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt b/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt index a6bbac111e..a56fecbbe3 100644 --- a/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug75063_cp1251.phpt @@ -2,7 +2,7 @@ Bug #75063 Many filesystem-related functions do not work with multibyte file names, cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,10 +16,10 @@ default_charset=cp1251 /* This file is in cp1251. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $dir_basename = ""; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-cp1251"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-cp1251"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; mkdir($prefix); @@ -55,7 +55,7 @@ chdir($old_cwd); /* --CLEAN-- section were the right place, but it won't accept default_charset ATM, it seems. */ $dir_basename = ""; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-cp1251"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-cp1251"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; $obj = scandir($d0); diff --git a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt index 6028facfaa..beaf690dea 100644 --- a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt @@ -2,7 +2,7 @@ Bug #75063 Many filesystem-related functions do not work with multibyte file names, UTF-8 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -14,10 +14,10 @@ skip_if_no_required_exts(); /* This file is in UTF-8. */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $dir_basename = "тест"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-utf8"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-utf8"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; mkdir($prefix); @@ -56,7 +56,7 @@ chdir($old_cwd); --CLEAN-- <?php $dir_basename = "тест"; -$prefix = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug75063-utf8"; +$prefix = __DIR__ . DIRECTORY_SEPARATOR . "bug75063-utf8"; $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; $obj = scandir($d0); diff --git a/ext/standard/tests/file/windows_mb_path/recursive_it.phpt b/ext/standard/tests/file/windows_mb_path/recursive_it.phpt index 19c08a38c2..ab4b9ec51a 100644 --- a/ext/standard/tests/file/windows_mb_path/recursive_it.phpt +++ b/ext/standard/tests/file/windows_mb_path/recursive_it.phpt @@ -2,18 +2,18 @@ RecursiveDirectoryIterator with dir path long or of edge case length --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); -if (strlen(dirname(__FILE__)) > 259) die("Unsuitable starting path length"); +if (strlen(__DIR__) > 259) die("Unsuitable starting path length"); ?> --FILE-- <?php $need_len = 1024; //$need_len = 259; -$dir = dirname(__FILE__); +$dir = __DIR__; while ($need_len - strlen($dir) > 32) { $dir .= DIRECTORY_SEPARATOR . str_repeat("a", 32); } @@ -24,7 +24,7 @@ $fl = $dir . DIRECTORY_SEPARATOR . "hello.txt"; file_put_contents($fl, ""); -$start = substr($dir, 0, strpos($dir, DIRECTORY_SEPARATOR, strlen(dirname(__FILE__))+1)); +$start = substr($dir, 0, strpos($dir, DIRECTORY_SEPARATOR, strlen(__DIR__)+1)); $iter = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $start, @@ -54,7 +54,7 @@ var_dump(file_exists($start)); do { rmdir($dir); $dir = dirname($dir); -} while (dirname(__FILE__) != $dir);*/ +} while (__DIR__ != $dir);*/ ?> ==DONE== diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt index 6517cf88c1..9390b3755f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading big5 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ defalut_charset=big5 #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "զhr`|"; // BIG5 string $prefix = create_data("file_big5", $item, 950); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt index 98d4e0c89b..ad16770381 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir big5 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=big5 #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "զhr`|"; // BIG5 string $prefix = create_data("dir_big5", $item . "5", 950); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt index 406b925555..088c46d7b6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ defalut_charset=cp950 #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "զhr`|"; // BIG5 string $prefix = create_data("file_big5", $item . "25", 950); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt index 54710fc3c8..f738b9f5be 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('big5', 'utf-8', "զhr`|"); // BIG5 string $prefix = create_data("file_big5", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt index 4e1ef94c00..45d87d1cbe 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('big5', 'utf-8', "զhr`|"); // BIG5 string $prefix = create_data("dir_big5", $item . "5"); diff --git a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt index 3b3b8a558a..07f48eb218 100644 --- a/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_big5_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write big5 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=big5 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('big5', 'utf-8', "զhr`|"); // BIG5 string $prefix = create_data("file_big5", $item . "25"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt index a5dea1c9b8..d7b093281e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "šđčćž_ŠĐČĆŽ"; // cp1250 specific chars $prefix = create_data("file_cp1250", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt index ae7eff4a13..2c629e18ac 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "šđčćž_ŠĐČĆŽ"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt index 45531b6d6b..77a5bf6a08 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write to UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "šđčćž_ŠĐČĆŽ"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt index c70570b2b0..f88cb70ac6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_3.phpt @@ -2,7 +2,7 @@ Test fopen() for reading UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "Árvíztűrő tükörfúrógép"; // cp1250 specific chars $prefix = create_data("file_cp1250", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt index a7df51695f..eca9479978 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_4.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "Árvíztűrő tükörfúrógép"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt index 75e5c55ca9..910db7b04c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1250_to_utf8_5.phpt @@ -2,7 +2,7 @@ Test fopen() for write to UTF-8 path with cp1250 specific symbols --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1250 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "Árvíztűrő tükörfúrógép"; // cp1250 specific chars $prefix = create_data("dir_cp1250", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt index 485ff119ef..1688d75a02 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading CP1251 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1251 #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = ""; // cp1251 string $prefix = create_data("file_cp1251", $item, 1251); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt index db0c9a690c..049800a0aa 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir CP1251 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1251 #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = ""; // cp1251 string $prefix = create_data("dir_cp1251", $item . "3", 1251); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt index 7dd32c5a90..7d3290d99e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write CP1251 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1251 #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = ""; // cp1251 string $prefix = create_data("file_cp1251", $item . "7", 1251); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt index 14b5176415..27ba191d0d 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading CP1251 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1251', 'utf-8', ""); // cp1251 string $prefix = create_data("file_cp1251", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt index 7b5f71b84e..a6baa4b9c1 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir CP1251 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1251', 'utf-8', ""); // cp1251 string $prefix = create_data("dir_cp1251", $item . "3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt index 84ecdbff9e..c46bc48645 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write CP1251 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1251', 'utf-8', ""); // cp1251 string $prefix = create_data("file_cp1251", $item . "7"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt index 2510a2d2de..c4aa6f831c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_0.phpt @@ -5,7 +5,7 @@ zend.multibyte=1 zend.script_encoding=cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ skip_if_no_required_exts("mbstring"); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = ""; // cp1251 string $prefix = create_data("file_cp1251", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt index 3b55e18c67..9265f8ec0b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_1.phpt @@ -5,7 +5,7 @@ zend.multibyte=1 zend.script_encoding=cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ skip_if_no_required_exts("mbstring"); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = ""; // cp1251 string $prefix = create_data("dir_cp1251", $item . "3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt index 98e5852b67..71ecc73bc9 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1251_zend_multibyte_2.phpt @@ -5,7 +5,7 @@ zend.multibyte=1 zend.script_encoding=cp1251 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ skip_if_no_required_exts("mbstring"); #vim: set encoding=cp1251 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "7"; // cp1251 string $prefix = create_data("file_cp1251", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt index 6fe0d968f7..2ebb63a688 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_0.phpt @@ -2,7 +2,7 @@ cp1252 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1252 #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "gef"; $prefix = create_data("file", $item, 1252); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt index ef5dc9397d..dc673c260b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "tsch"); // cp1252 string $prefix = create_data("file_cp1252", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt index 2a34746183..eff0c923e8 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "tsch"); // cp1252 string $prefix = create_data("dir_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt index 293824d550..d0e39c0513 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "tsch"); // cp1252 string $prefix = create_data("dir_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt index c5e075a944..c3b3edb7ee 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_3.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "Volao"); // cp1252 string $prefix = create_data("file2_cp1252", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt index 969a115392..2e97e78460 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_4.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "Volao"); // cp1252 string $prefix = create_data("dir2_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt index 6119213289..c6a135f567 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1252_to_utf8_5.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1252 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1252 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp1252', 'utf-8', "Volao"); // cp1252 string $prefix = create_data("dir2_cp1252", "${item}3"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt index 24beb0d31a..07cf3c8e6c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1253 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1253 #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("file_cp1253", $item, 1253); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt index 854910bc31..9f03a9115c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1253 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1253 #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("dir_cp1253", "${item}42", 1253); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt index 79892e8ae4..1ab6f658c0 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1253 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1253 #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("dir_cp1253", "${item}42}", 1253); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt index 950c4784d8..64ad358b5c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1253 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "διαδρομή δοκιμής"; $prefix = create_data("file_cp1253", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt index 25aeb513ba..a178ea574a 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1253 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "διαδρομή δοκιμής"; $prefix = create_data("dir_cp1253", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt index bd8fc22ba3..a46a8854ce 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1253_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1253 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1253 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "διαδρομή δοκιμής"; $prefix = create_data("dir_cp1253", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt index 4f160c1370..9d92267b01 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1254 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "okbaytl ileri"; $prefix = create_data("file_cp1254", $item, 1254); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt index 5a72058097..8f79a2982b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "okbaytl ileri"; $prefix = create_data("dir_cp1254", "${item}42", 1254); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt index 21f87c501a..d924f87edd 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1254 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "okbaytl ileri"; $prefix = create_data("dir_cp1254", "${item}42}", 1254); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt index 7fcb0ff66d..da264f9e3e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_3.phpt @@ -2,7 +2,7 @@ cp1254 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1254 #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "okbaytl ileri"; diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt index 7a3d496f9f..b79e0f466f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı işleri"; $prefix = create_data("file_cp1254", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt index 0cb73207e8..2966eebab4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı işleri"; $prefix = create_data("dir_cp1254", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt index ea4950974c..a8b1a9a67f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1254 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı işleri"; $prefix = create_data("dir_cp1254", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt index 0c330ea445..a08dfc3e30 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1254_to_utf8_3.phpt @@ -2,7 +2,7 @@ cp1254 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1254 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "çokbaytlı işleri"; diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt index 01b4f7732d..db96aa08d6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1255 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1255 #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("file_cp1255", $item, 1255); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt index 991d2ab615..4da386eaa4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1255 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1255 #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("dir_cp1255", "${item}42", 1255); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt index 276af84a91..e5b6f4cf77 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1255 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1255 #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("dir_cp1255", "${item}42}", 1255); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt index e33616ddd3..b8937a2f9e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1255 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "כללים מרובים"; $prefix = create_data("file_cp1255", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt index b241210faa..dc47630450 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1255 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "כללים מרובים"; $prefix = create_data("dir_cp1255", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt index 10fef62404..109d2dbd64 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1255_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1255 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1255 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "כללים מרובים"; $prefix = create_data("dir_cp1255", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt index 617ebedddd..5ac99b2fd3 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1256 #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; // cp1256 string $prefix = create_data("file_cp1256", $item, 1256); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt index 341c0c01a2..ec95e582d9 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp1256 #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("dir_cp1256", "${item}42", 1256); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt index e8cf5709a7..fd7303f1e7 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp1256 #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = " "; $prefix = create_data("dir_cp1256", "${item}42}", 1256); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt index 32596c2bd5..25e1118fcb 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "مسار متعدد البايت اختبار"; $prefix = create_data("file_cp1256", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt index fd0204aace..f660c5e906 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "مسار متعدد البايت اختبار"; $prefix = create_data("dir_cp1256", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt index ef0229a2e9..e8a14ca9a4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp1256_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp1256 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp1256 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "مسار متعدد البايت اختبار"; $prefix = create_data("dir_cp1256", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt index efc43f3513..8a52ab0a1f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_0.phpt @@ -2,7 +2,7 @@ Thai cp874 basic test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp874 #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $names = array( /* cp874 */ "跴ͺ1", @@ -35,7 +35,7 @@ $names = array( /* cp874 */ $i = 0; foreach ($names as $name) { - $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $name . ".txt"; + $path = __DIR__ . DIRECTORY_SEPARATOR . $name . ".txt"; file_put_contents($path, "hello" . $i++); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt index aa877d7406..2e6df976a4 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_1.phpt @@ -2,7 +2,7 @@ Thai cp874 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,12 +19,12 @@ internal_encoding=cp874 #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "跴ͺ11"; $prefix = create_data("file_cp874", $item, 874); -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . $item; +$fn = __DIR__ . DIRECTORY_SEPARATOR . $item; var_dump($fn); var_dump(touch($fn)); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt index 2c244997b6..3ac3035b4c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_0.phpt @@ -2,7 +2,7 @@ Thai UTF-8 basic test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $names = array( /* cp874 */ "跴ͺ1", @@ -32,7 +32,7 @@ $names = array( /* cp874 */ $i = 0; foreach ($names as $name) { - $pathw = dirname(__FILE__) . DIRECTORY_SEPARATOR . iconv('cp874', 'utf-8', $name) . ".txt"; + $pathw = __DIR__ . DIRECTORY_SEPARATOR . iconv('cp874', 'utf-8', $name) . ".txt"; file_put_contents($pathw, "hello" . $i++); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt index 13ec027748..1bc8fca100 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp874_to_utf8_1.phpt @@ -2,7 +2,7 @@ Thai UTF-8 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "เป็นแฟ้มที่ทดสอบ11"; diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt index 48e55981ca..12c38eae69 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp932 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "eXg}`oCgEpX"; // cp932 string $prefix = create_data("file_cp932", $item, 932); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt index b177e2d1e2..9163f87b33 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp932 --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "eXg}`oCgEpX"; // cp932 string $prefix = create_data("dir_cp932", "${item}42", 932); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt index 595f86213a..149c0fe595 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write to cp932 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "eXg}`oCgEpX"; // cp932 string $prefix = create_data("dir_cp932", "${item}42}", 932); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt index 95992ae79f..a6fd814203 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_3.phpt @@ -2,7 +2,7 @@ cp932 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp932 #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "eXg}`oCgEpX77"; // cp932 string diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt index 5e0e67b662..b845e313b3 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp932 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp932', 'utf-8', "eXg}`oCgEpX"); // cp932 string $prefix = create_data("file_cp932", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt index 2092e40da0..80a49dd28b 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp932 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp932', 'utf-8', "eXg}`oCgEpX"); // cp932 string $prefix = create_data("dir_cp932", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt index bd9b1791ea..1d7764236a 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp932_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp932 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp932 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp932', 'utf-8', "eXg}`oCgEpX"); // cp932 string $prefix = create_data("dir_cp932", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt index 46db0ebc4b..b29631ad5c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp936 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp936 #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "yԇֹ·"; // cp936 string $prefix = create_data("file_cp936", $item, 936); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt index 9eb1f08217..d7ee04bf9e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp936 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ internal_encoding=cp936 #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "yԇֹ·"; // cp936 string $prefix = create_data("dir_cp936", $item . "5", 936); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt index eedee97bd0..eef4e4915e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp936 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -19,7 +19,7 @@ default_charset=cp936 #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "yԇֹ·"; // cp936 string $prefix = create_data("file_cp936", $item . "25", 936); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt index b0b709c0cc..52b164fdb2 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading cp936 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp936', 'utf-8', "yԇֹ·"); // cp936 string $prefix = create_data("file_cp936", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt index 2c4b2876c5..1a22b13ea6 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir cp936 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp936', 'utf-8', "yԇֹ·"); // cp936 string $prefix = create_data("dir_cp936", $item . "5"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt index b260b7b37f..b4fe8415c2 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cp936_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write cp936 to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp936 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('cp936', 'utf-8', "yԇֹ·"); // cp936 string $prefix = create_data("file_cp936", $item . "25"); diff --git a/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt index 930082bd63..394ab17011 100644 --- a/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_cwd_mb_names.phpt @@ -3,7 +3,7 @@ Test chdir()/getcwd() with a dir for multibyte filenames --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $prefix = create_data("dir_mb"); $dirw = $prefix . DIRECTORY_SEPARATOR . "テストマルチバイト・パス42"; diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt index 4b2bae974f..0c8f70919f 100644 --- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading eucjp to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=eucjp */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('eucjp', 'utf-8', "ƥȥޥХȡѥ"); // EUCJP string $prefix = create_data("file_eucjp", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt index db3f1d861b..634c676385 100644 --- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir eucjp to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=eucjp */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('eucjp', 'utf-8', "ƥȥޥХȡѥ"); // EUCJP string $prefix = create_data("dir_eucjp", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt index 0d06fb2489..4b3c631837 100644 --- a/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_eucjp_to_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write eucjp to UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=eucjp */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = iconv('eucjp', 'utf-8', "ƥȥޥХȡѥ"); // EUCJP string $prefix = create_data("dir_eucjp", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt index 51f1bb945b..b1576e827a 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_0.phpt @@ -2,7 +2,7 @@ Test fopen() for reading Kartuli UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=utf-8 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქართველები"; $prefix = create_data("file_kartuli", $item); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt index ff32d75869..73ae71a6ba 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_1.phpt @@ -2,7 +2,7 @@ Test mkdir/rmdir Kartuli UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=utf-8 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქართველები"; $prefix = create_data("dir_kartuli", "${item}42"); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt index 192072760c..8aa7b2378c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_2.phpt @@ -2,7 +2,7 @@ Test fopen() for write Kartuli UTF-8 path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=kartuli */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქართველები"; $prefix = create_data("dir_kartuli", "${item}42}"); diff --git a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt index 8f08357792..211124ad21 100644 --- a/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_kartuli_utf8_3.phpt @@ -2,7 +2,7 @@ Kartuli UTF-8 cmd test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); #vim: set encoding=cp874 */ -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $item = "ქართველები55"; diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt index 688fc6caca..181ba33ca1 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_0.phpt @@ -2,7 +2,7 @@ Basic long path test --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -21,7 +21,7 @@ for ($i = 0; $i < $how_many; $i++) { $p .= DIRECTORY_SEPARATOR; } -$p = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $p; +$p = realpath(__DIR__) . DIRECTORY_SEPARATOR . $p; echo strlen($p), "\n", $p, "\n"; @@ -34,7 +34,7 @@ for ($i = 0; $i < $how_many; $i++) { rmdir($p0); } -var_dump(file_exists(realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $s)); +var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s)); ?> ===DONE=== diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt index b2af71aa76..48f30dbccd 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_1.phpt @@ -2,7 +2,7 @@ Basic long path test with file I/O --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -21,7 +21,7 @@ for ($i = 0; $i < $how_many; $i++) { $p .= DIRECTORY_SEPARATOR; } -$p = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $p; +$p = realpath(__DIR__) . DIRECTORY_SEPARATOR . $p; echo strlen($p), "\n", $p, "\n"; @@ -41,7 +41,7 @@ for ($i = 0; $i < $how_many; $i++) { rmdir($p0); } -var_dump(file_exists(realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $s)); +var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s)); ?> ===DONE=== diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt index bcae2c53bc..3437656eec 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_2.phpt @@ -2,7 +2,7 @@ Basic long path test with file I/O, multibyte path and realpath() check --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -22,7 +22,7 @@ for ($i = 0; $i < $how_many; $i++) { } /* path doesn't exist at this point! */ -$p = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $p; +$p = realpath(__DIR__) . DIRECTORY_SEPARATOR . $p; echo strlen($p), "\n", $p, "\n"; @@ -47,7 +47,7 @@ for ($i = 0; $i < $how_many; $i++) { rmdir($p0); } -var_dump(file_exists(realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . $s)); +var_dump(file_exists(realpath(__DIR__) . DIRECTORY_SEPARATOR . $s)); ?> ===DONE=== diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt index e897aaa07d..d572206c5d 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug30730.phpt @@ -2,7 +2,7 @@ Bug #30730 Filename path length limit broken on NTFS volume, using rename --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -11,7 +11,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); --FILE-- <?php -$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test_bug30730"; +$dir = __DIR__ . DIRECTORY_SEPARATOR . "test_bug30730"; $file = $dir . DIRECTORY_SEPARATOR . "test_file"; var_dump(mkdir($dir)); diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt index bb50ffdebe..6dd1e21afb 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug70943.phpt @@ -2,7 +2,7 @@ Bug #70943 fopen() can't open a file if path is 259 characters long --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -11,7 +11,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); --FILE-- <?php // Generates a sample file whose path is exactly 259 characters long -$testFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . str_repeat("a", 254 - strlen(dirname(__FILE__))).".dat"; +$testFile = __DIR__ . DIRECTORY_SEPARATOR . str_repeat("a", 254 - strlen(__DIR__)).".dat"; echo "Generating a file with a path length of ".strlen($testFile)." characters...\r\n"; touch($testFile); diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt index 4b5bd445f4..7a83c1e4f9 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_bug71103.phpt @@ -2,7 +2,7 @@ Bug #71103 file_exists and is_readable fail silently --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -11,7 +11,7 @@ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); --FILE-- <?php -$base = dirname(__FILE__); +$base = __DIR__; $d = $base . '\\dev\\http\\tproj\\app\\cache\\dev_old\\annotations\\72'; $foo = $d . '\\5b53796d666f6e795c42756e646c655c5477696742756e646c655c436f6e74726f6c6c65725c457863657074696f6e436f6e74726f6c6c657223676574416e64436c65616e4f7574707574427566666572696e67405b416e6e6f745d5d5b.doctrinecache.data'; diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt index 9dc7cf3cc4..287dbf192e 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt @@ -2,11 +2,11 @@ Mkdir with path length < 260 and > 248 has be a long path --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); -$start = realpath(dirname(__FILE__)); +$start = realpath(__DIR__); if (strlen($start) > 260 || strlen($start) > 248) { die("skip the starting path length is unsuitable for this test"); } @@ -23,7 +23,7 @@ for ($i = 0; $i < $how_many; $i++) { $p .= "$s\\"; } -$start = realpath(dirname(__FILE__)); +$start = realpath(__DIR__); $newstart = false; if (strlen($start) <= 248) { // create the exact length diff --git a/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt index 1033c0e3e6..d64316b3af 100644 --- a/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_readdir_mb_names.phpt @@ -2,7 +2,7 @@ Test readdir() with a dir for multibyte filenames --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); @@ -12,7 +12,7 @@ skip_if_no_required_exts(); --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $prefix = create_data("mb_names"); $content = ""; diff --git a/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt b/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt index 7279850c86..acd9323c5c 100644 --- a/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_rename_mb_names.phpt @@ -3,7 +3,7 @@ Test rename() with a dir for multibyte filenames --SKIPIF-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; skip_if_not_win(); @@ -16,7 +16,7 @@ skip_if_no_required_exts(); <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "util.inc"; $prefix = create_data("file2_mb"); diff --git a/ext/standard/tests/filters/bug22538.phpt b/ext/standard/tests/filters/bug22538.phpt index 0f007e47bb..0ef37a7bc1 100644 --- a/ext/standard/tests/filters/bug22538.phpt +++ b/ext/standard/tests/filters/bug22538.phpt @@ -11,8 +11,8 @@ function my_stream_copy_to_stream($fin, $fout) { $size = 65536; do { - $path1 = sprintf("%s/%s%da", dirname(__FILE__), uniqid(), time()); - $path2 = sprintf("%s/%s%db", dirname(__FILE__), uniqid(), time()); + $path1 = sprintf("%s/%s%da", __DIR__, uniqid(), time()); + $path2 = sprintf("%s/%s%db", __DIR__, uniqid(), time()); } while ($path1 == $path2); $fp = fopen($path1, "w") or die("Can not open $path1\n"); diff --git a/ext/standard/tests/filters/bug35916.phpt b/ext/standard/tests/filters/bug35916.phpt index 4d2027d249..8c853023b1 100644 --- a/ext/standard/tests/filters/bug35916.phpt +++ b/ext/standard/tests/filters/bug35916.phpt @@ -2,7 +2,7 @@ Bug #35916 (Duplicate calls to stream_bucket_append() lead to a crash) --FILE-- <?php -$file = dirname(__FILE__) . "/bug35916.txt"; +$file = __DIR__ . "/bug35916.txt"; @unlink($file); class strtoupper_filter extends php_user_filter diff --git a/ext/standard/tests/filters/stream_filter_remove_basic.phpt b/ext/standard/tests/filters/stream_filter_remove_basic.phpt index fd2a4bd4ca..a264a0e4f6 100644 --- a/ext/standard/tests/filters/stream_filter_remove_basic.phpt +++ b/ext/standard/tests/filters/stream_filter_remove_basic.phpt @@ -15,7 +15,7 @@ if(! in_array( "string.rot13", $filters )) die( "skip rot13 filter not available echo "*** Testing stream_filter_remove() : basic functionality ***\n"; -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; touch( $file ); $fp = fopen( $file, 'w+' ); @@ -35,7 +35,7 @@ fclose( $fp ); --CLEAN-- <?php -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; unlink( $file ); ?> diff --git a/ext/standard/tests/filters/stream_filter_remove_error.phpt b/ext/standard/tests/filters/stream_filter_remove_error.phpt index 37820a99c4..9513319f57 100644 --- a/ext/standard/tests/filters/stream_filter_remove_error.phpt +++ b/ext/standard/tests/filters/stream_filter_remove_error.phpt @@ -13,7 +13,7 @@ if(! in_array( "string.rot13", $filters )) die( "skip rot13 filter not available * Alias to functions: */ -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; touch( $file ); $fp = fopen( $file, 'w+' ); $filter = stream_filter_append( $fp, "string.rot13", STREAM_FILTER_WRITE ); @@ -45,7 +45,7 @@ fclose( $fp ); --CLEAN-- <?php -$file = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; +$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTest.txt'; unlink( $file ); ?> diff --git a/ext/standard/tests/general_functions/004.phpt b/ext/standard/tests/general_functions/004.phpt index 5468ca99f0..fa83c7c220 100644 --- a/ext/standard/tests/general_functions/004.phpt +++ b/ext/standard/tests/general_functions/004.phpt @@ -2,7 +2,7 @@ fgetcsv() with tab delimited fields (BUG #8258) --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $fp=fopen("004.data","r"); while($a=fgetcsv($fp,100,"\t")) { echo join(",",$a)."\n"; diff --git a/ext/standard/tests/general_functions/bug40752.phpt b/ext/standard/tests/general_functions/bug40752.phpt index 9bf524029c..4e933d1274 100644 --- a/ext/standard/tests/general_functions/bug40752.phpt +++ b/ext/standard/tests/general_functions/bug40752.phpt @@ -3,7 +3,7 @@ Bug #40752 (parse_ini_file() segfaults when a scalar setting is redeclared as an --FILE-- <?php -$file = dirname(__FILE__)."/bug40752.ini"; +$file = __DIR__."/bug40752.ini"; file_put_contents($file, ' foo = 1; foo[] = 1; diff --git a/ext/standard/tests/general_functions/bug41445.phpt b/ext/standard/tests/general_functions/bug41445.phpt index f46dc9093c..85adfeddc9 100644 --- a/ext/standard/tests/general_functions/bug41445.phpt +++ b/ext/standard/tests/general_functions/bug41445.phpt @@ -3,7 +3,7 @@ Bug #41445 (parse_ini_file() function parses octal numbers in section names) --FILE-- <?php -$file = dirname(__FILE__)."/bug41445.ini"; +$file = __DIR__."/bug41445.ini"; $data = <<<DATA [001099030277] diff --git a/ext/standard/tests/general_functions/bug41445_1.phpt b/ext/standard/tests/general_functions/bug41445_1.phpt index 378001623c..e38b6f322c 100644 --- a/ext/standard/tests/general_functions/bug41445_1.phpt +++ b/ext/standard/tests/general_functions/bug41445_1.phpt @@ -3,7 +3,7 @@ Bug #41445 (parse_ini_file() function parses octal numbers in section names) - 2 --FILE-- <?php -$file = dirname(__FILE__)."/bug41445_1.ini"; +$file = __DIR__."/bug41445_1.ini"; $data = <<<DATA [2454.33] diff --git a/ext/standard/tests/general_functions/bug48660.phpt b/ext/standard/tests/general_functions/bug48660.phpt index d92958fc42..dfb608f18b 100644 --- a/ext/standard/tests/general_functions/bug48660.phpt +++ b/ext/standard/tests/general_functions/bug48660.phpt @@ -3,7 +3,7 @@ Bug #48660 (parse_ini_*(): dollar sign as last character of value fails) --FILE-- <?php -$ini_location = dirname(__FILE__) . '/bug48660.tmp'; +$ini_location = __DIR__ . '/bug48660.tmp'; // Build ini data $ini_data = ' @@ -24,7 +24,7 @@ var_dump(parse_ini_file($ini_location, true, INI_SCANNER_NORMAL)); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48660.tmp'); ?> +<?php @unlink(__DIR__ . '/bug48660.tmp'); ?> --EXPECT-- array(1) { ["cases"]=> diff --git a/ext/standard/tests/general_functions/bug48768.phpt b/ext/standard/tests/general_functions/bug48768.phpt index ae8329ac44..196c92d4a0 100644 --- a/ext/standard/tests/general_functions/bug48768.phpt +++ b/ext/standard/tests/general_functions/bug48768.phpt @@ -3,7 +3,7 @@ Bug #48768 (parse_ini_*() crashes with INI_SCANNER_RAW) --FILE-- <?php -$ini_location = dirname(__FILE__) . '/bug48768.tmp'; +$ini_location = __DIR__ . '/bug48768.tmp'; // Build ini data $ini_data = <<< EOT @@ -19,7 +19,7 @@ var_dump(parse_ini_file($ini_location, false, INI_SCANNER_NORMAL)); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug48768.tmp'); ?> +<?php @unlink(__DIR__ . '/bug48768.tmp'); ?> --EXPECT-- array(1) { ["equal"]=> diff --git a/ext/standard/tests/general_functions/bug49056.phpt b/ext/standard/tests/general_functions/bug49056.phpt index 208766cce0..a979562cd2 100644 --- a/ext/standard/tests/general_functions/bug49056.phpt +++ b/ext/standard/tests/general_functions/bug49056.phpt @@ -8,7 +8,7 @@ Cooking_furniture="Küchen Möbel (en)" Küchen_Möbel="Cooking furniture (en)" EOT; -$filename = dirname(__FILE__) . '/bug49056.tmp'; +$filename = __DIR__ . '/bug49056.tmp'; file_put_contents( $filename, $string); @@ -16,7 +16,7 @@ var_dump(parse_ini_file($filename)); ?> --CLEAN-- -<?php @unlink(dirname(__FILE__) . '/bug49056.tmp'); ?> +<?php @unlink(__DIR__ . '/bug49056.tmp'); ?> --EXPECT-- array(2) { ["Cooking_furniture"]=> diff --git a/ext/standard/tests/general_functions/bug49847.phpt b/ext/standard/tests/general_functions/bug49847.phpt index b7fbded2fc..a35477d00c 100644 --- a/ext/standard/tests/general_functions/bug49847.phpt +++ b/ext/standard/tests/general_functions/bug49847.phpt @@ -5,7 +5,7 @@ Bug #49847 (exec() fails on lines larger then 4095 bytes) $iswin = substr(PHP_OS, 0, 3) == "WIN"; if ($iswin) { - $f = dirname(__FILE__) . '\\bug49847.tmp'; + $f = __DIR__ . '\\bug49847.tmp'; $s = str_repeat(' ', 4097); $s .= '1'; file_put_contents($f, $s); diff --git a/ext/standard/tests/general_functions/bug52138.phpt b/ext/standard/tests/general_functions/bug52138.phpt index d4f38735ab..1cf6b82b61 100644 --- a/ext/standard/tests/general_functions/bug52138.phpt +++ b/ext/standard/tests/general_functions/bug52138.phpt @@ -6,7 +6,7 @@ Bug #52138 (Constants are parsed into the ini file for section names) define('MYCONST', 1); define('A', 'B'); -$ini_file = dirname(__FILE__)."/bug52138.data"; +$ini_file = __DIR__."/bug52138.data"; $ret = parse_ini_file($ini_file, true); var_dump($ret); diff --git a/ext/standard/tests/general_functions/bug60723.phpt b/ext/standard/tests/general_functions/bug60723.phpt index 07b801bcfe..504de7afbf 100644 --- a/ext/standard/tests/general_functions/bug60723.phpt +++ b/ext/standard/tests/general_functions/bug60723.phpt @@ -5,7 +5,7 @@ date.timezone=ASIA/Chongqing log_errors=On --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $log = $dir . "/tmp.err"; ini_set("error_log", $log); echo $aa; diff --git a/ext/standard/tests/general_functions/bug69646.phpt b/ext/standard/tests/general_functions/bug69646.phpt index 4c897516c8..97e60bfff0 100644 --- a/ext/standard/tests/general_functions/bug69646.phpt +++ b/ext/standard/tests/general_functions/bug69646.phpt @@ -21,7 +21,7 @@ var_dump( \$argv ); SCRIPT; -$script = dirname(__FILE__) . DIRECTORY_SEPARATOR . "arginfo.php"; +$script = __DIR__ . DIRECTORY_SEPARATOR . "arginfo.php"; file_put_contents($script, $helper_script); $cmd = PHP_BINARY . " " . $script . " " . escapeshellarg($a) . " " . escapeshellarg($b); diff --git a/ext/standard/tests/general_functions/bug70018.phpt b/ext/standard/tests/general_functions/bug70018.phpt index d4c38b9d8a..f7aefcc03f 100644 --- a/ext/standard/tests/general_functions/bug70018.phpt +++ b/ext/standard/tests/general_functions/bug70018.phpt @@ -10,7 +10,7 @@ if ("cli" != php_sapi_name()) { <?php $output = array(); -$test_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()); +$test_fl = __DIR__ . DIRECTORY_SEPARATOR . md5(uniqid()); file_put_contents($test_fl, '<?php echo "abc\f\n \n";'); exec(PHP_BINARY . " -n $test_fl", $output); diff --git a/ext/standard/tests/general_functions/floatval.phpt b/ext/standard/tests/general_functions/floatval.phpt index 1bb4d1151c..a01e01dbf1 100644 --- a/ext/standard/tests/general_functions/floatval.phpt +++ b/ext/standard/tests/general_functions/floatval.phpt @@ -54,7 +54,7 @@ echo "\n*** Testing floatval() on non floating types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); fclose($fp); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); closedir($dfp); // other types in an array diff --git a/ext/standard/tests/general_functions/floatval_variation1.phpt b/ext/standard/tests/general_functions/floatval_variation1.phpt index 0bb11e95c4..2b49cd195b 100644 --- a/ext/standard/tests/general_functions/floatval_variation1.phpt +++ b/ext/standard/tests/general_functions/floatval_variation1.phpt @@ -11,7 +11,7 @@ Testing floatval() and its alias doubleval() functions : usage variations - diff // get a resource type variable $fp = fopen (__FILE__, "r"); fclose($fp); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); closedir($dfp); // other types in an array diff --git a/ext/standard/tests/general_functions/get_included_files.phpt b/ext/standard/tests/general_functions/get_included_files.phpt index e6d00a56a1..df41ec8513 100644 --- a/ext/standard/tests/general_functions/get_included_files.phpt +++ b/ext/standard/tests/general_functions/get_included_files.phpt @@ -14,11 +14,11 @@ echo "*** Testing get_included_files()\n"; echo "\n-- List included files at start --\n"; var_dump(get_included_files()); -include(dirname(__FILE__)."/get_included_files_inc1.inc"); +include(__DIR__."/get_included_files_inc1.inc"); echo "\n-- List included files atfter including inc1 -\n"; var_dump(get_included_files()); -include(dirname(__FILE__)."/get_included_files_inc2.inc"); +include(__DIR__."/get_included_files_inc2.inc"); echo "\n-- List included files atfter including inc2 which will include inc3 which includes inc1 --\n"; var_dump(get_included_files()); diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt index 59252b5e2c..f8ff6c4460 100644 --- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt +++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt @@ -28,7 +28,7 @@ set_error_handler("foo"); echo "**** Testing gettype() and settype() functions ****\n"; $fp = fopen(__FILE__, "r"); -$dfp = opendir( dirname(__FILE__) ); +$dfp = opendir( __DIR__ ); $var1 = "another string"; $var2 = array(2,3,4); diff --git a/ext/standard/tests/general_functions/intval.phpt b/ext/standard/tests/general_functions/intval.phpt index 7f3d895fbe..1650b91c6f 100644 --- a/ext/standard/tests/general_functions/intval.phpt +++ b/ext/standard/tests/general_functions/intval.phpt @@ -63,7 +63,7 @@ echo "\n*** Testing intval() on non integer types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); fclose($fp); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); closedir($dfp); // unset variable diff --git a/ext/standard/tests/general_functions/is_array.phpt b/ext/standard/tests/general_functions/is_array.phpt index 223b732904..66e5b64934 100644 --- a/ext/standard/tests/general_functions/is_array.phpt +++ b/ext/standard/tests/general_functions/is_array.phpt @@ -37,7 +37,7 @@ echo "\n*** Testing is_array() on non array types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variables $unset_array = array(10); diff --git a/ext/standard/tests/general_functions/is_bool.phpt b/ext/standard/tests/general_functions/is_bool.phpt index a6c6111fa1..34d5e0ef6c 100644 --- a/ext/standard/tests/general_functions/is_bool.phpt +++ b/ext/standard/tests/general_functions/is_bool.phpt @@ -26,7 +26,7 @@ echo "\n*** Testing is_bool() on non boolean values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_bool1 = true; diff --git a/ext/standard/tests/general_functions/is_float.phpt b/ext/standard/tests/general_functions/is_float.phpt index b71a5283db..cec0e445ab 100644 --- a/ext/standard/tests/general_functions/is_float.phpt +++ b/ext/standard/tests/general_functions/is_float.phpt @@ -57,7 +57,7 @@ foreach ($floats as $float ) { echo "\n*** Testing is_float(), is_double() & is_real() with non float values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_float_64bit.phpt b/ext/standard/tests/general_functions/is_float_64bit.phpt index 9410a21fe2..38fc52675f 100644 --- a/ext/standard/tests/general_functions/is_float_64bit.phpt +++ b/ext/standard/tests/general_functions/is_float_64bit.phpt @@ -59,7 +59,7 @@ foreach ($floats as $float ) { echo "\n*** Testing is_float(), is_double() & is_real() with non float values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_int.phpt b/ext/standard/tests/general_functions/is_int.phpt index d154b30748..4cfbf653be 100644 --- a/ext/standard/tests/general_functions/is_int.phpt +++ b/ext/standard/tests/general_functions/is_int.phpt @@ -46,7 +46,7 @@ echo "\n*** Testing is_int(), is_integer() & is_long() with non integer values // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_int_64bit.phpt b/ext/standard/tests/general_functions/is_int_64bit.phpt index 68ef75b35b..dabc7be705 100644 --- a/ext/standard/tests/general_functions/is_int_64bit.phpt +++ b/ext/standard/tests/general_functions/is_int_64bit.phpt @@ -48,7 +48,7 @@ echo "\n*** Testing is_int(), is_integer() & is_long() with non integer values // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/is_null.phpt b/ext/standard/tests/general_functions/is_null.phpt index fa7c87f791..9082f5fcd1 100644 --- a/ext/standard/tests/general_functions/is_null.phpt +++ b/ext/standard/tests/general_functions/is_null.phpt @@ -44,7 +44,7 @@ echo "\n*** Testing is_bool() on non null values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // other types in a array $not_null_types = array ( diff --git a/ext/standard/tests/general_functions/is_numeric.phpt b/ext/standard/tests/general_functions/is_numeric.phpt index 0019cf18d2..c23e5e3b8c 100644 --- a/ext/standard/tests/general_functions/is_numeric.phpt +++ b/ext/standard/tests/general_functions/is_numeric.phpt @@ -99,7 +99,7 @@ echo "\n*** Testing is_numeric() on non numeric types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset variable $unset_var = 10.5; diff --git a/ext/standard/tests/general_functions/is_object.phpt b/ext/standard/tests/general_functions/is_object.phpt index 8abc766376..96c515bf65 100644 --- a/ext/standard/tests/general_functions/is_object.phpt +++ b/ext/standard/tests/general_functions/is_object.phpt @@ -102,7 +102,7 @@ echo "\n*** Testing is_object() on non object types ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset object $unset_object = new foo(); diff --git a/ext/standard/tests/general_functions/is_string.phpt b/ext/standard/tests/general_functions/is_string.phpt index 72a885a57a..ea2fb36a24 100644 --- a/ext/standard/tests/general_functions/is_string.phpt +++ b/ext/standard/tests/general_functions/is_string.phpt @@ -62,7 +62,7 @@ echo "\n*** Testing is_string() on non string values ***\n"; // get a resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // unset vars $unset_string1 = "string"; diff --git a/ext/standard/tests/general_functions/parse_ini_basic.phpt b/ext/standard/tests/general_functions/parse_ini_basic.phpt index 8d7b2f8a22..481f24045f 100644 --- a/ext/standard/tests/general_functions/parse_ini_basic.phpt +++ b/ext/standard/tests/general_functions/parse_ini_basic.phpt @@ -6,7 +6,7 @@ basicqval=FUBAR_QUOTES_VARIABLE --FILE-- <?php -$ini_file = dirname(__FILE__)."/parse_ini_basic.data"; +$ini_file = __DIR__."/parse_ini_basic.data"; define('TEST_CONSTANT', 'this_is_test_constant'); diff --git a/ext/standard/tests/general_functions/parse_ini_booleans.phpt b/ext/standard/tests/general_functions/parse_ini_booleans.phpt index 5b854c3f41..3868147e62 100644 --- a/ext/standard/tests/general_functions/parse_ini_booleans.phpt +++ b/ext/standard/tests/general_functions/parse_ini_booleans.phpt @@ -3,7 +3,7 @@ parse_ini_file() boolean operators --FILE-- <?php -$ini_file = dirname(__FILE__)."/parse_ini_booleans.data"; +$ini_file = __DIR__."/parse_ini_booleans.data"; var_dump(parse_ini_file($ini_file, 1)); diff --git a/ext/standard/tests/general_functions/parse_ini_file.phpt b/ext/standard/tests/general_functions/parse_ini_file.phpt index ebc714455d..368d262a6e 100644 --- a/ext/standard/tests/general_functions/parse_ini_file.phpt +++ b/ext/standard/tests/general_functions/parse_ini_file.phpt @@ -5,7 +5,7 @@ parse_ini_file() multiple calls --FILE-- <?php -$filename = dirname(__FILE__)."/parse_ini_file.dat"; +$filename = __DIR__."/parse_ini_file.dat"; @unlink($filename); /* Make sure the file really does not exist! */ var_dump(parse_ini_file()); diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt index fe02a97c18..bcf5231144 100644 --- a/ext/standard/tests/general_functions/print_r.phpt +++ b/ext/standard/tests/general_functions/print_r.phpt @@ -230,7 +230,7 @@ echo "\n*** Testing print_r() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt index 5447a94db8..8584f08758 100644 --- a/ext/standard/tests/general_functions/print_r_64bit.phpt +++ b/ext/standard/tests/general_functions/print_r_64bit.phpt @@ -234,7 +234,7 @@ echo "\n*** Testing print_r() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/general_functions/proc_open-mb0.phpt b/ext/standard/tests/general_functions/proc_open-mb0.phpt index 69c3dd53e5..4ff38267ad 100644 --- a/ext/standard/tests/general_functions/proc_open-mb0.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb0.phpt @@ -10,7 +10,7 @@ if (!function_exists("proc_open")) echo "skip proc_open() is not available"; $php = PHP_BINARY; -$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "proc_only_mb0.php"; +$f = __DIR__ . DIRECTORY_SEPARATOR . "proc_only_mb0.php"; file_put_contents($f,'<?php var_dump($argv); ?>'); $ds = array( diff --git a/ext/standard/tests/general_functions/proc_open-mb1.phpt b/ext/standard/tests/general_functions/proc_open-mb1.phpt index 2b922917f3..e7a7a4cbfc 100644 --- a/ext/standard/tests/general_functions/proc_open-mb1.phpt +++ b/ext/standard/tests/general_functions/proc_open-mb1.phpt @@ -10,7 +10,7 @@ if (!function_exists("proc_open")) echo "skip proc_open() is not available"; $php = PHP_BINARY; -$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "proc_only_mb1.php"; +$f = __DIR__ . DIRECTORY_SEPARATOR . "proc_only_mb1.php"; file_put_contents($f,'<?php var_dump($argv); ?>'); $ds = array( diff --git a/ext/standard/tests/general_functions/strval.phpt b/ext/standard/tests/general_functions/strval.phpt index b814733dd0..e904fdcaa0 100644 --- a/ext/standard/tests/general_functions/strval.phpt +++ b/ext/standard/tests/general_functions/strval.phpt @@ -106,7 +106,7 @@ foreach ($scalars as $scalar ) { echo "\n*** Testing strval() with non_scalar values ***\n"; // get a resource type variable $fp = fopen(__FILE__, "r"); -$dfp = opendir( dirname(__FILE__) ); +$dfp = opendir( __DIR__ ); // unset variable $unset_var = 10; diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt index f0da840c3b..4641051541 100644 --- a/ext/standard/tests/general_functions/var_dump.phpt +++ b/ext/standard/tests/general_functions/var_dump.phpt @@ -229,7 +229,7 @@ echo "\n*** Testing var_dump() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt index a2476ef3f6..738de410e4 100644 --- a/ext/standard/tests/general_functions/var_dump_64bit.phpt +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -229,7 +229,7 @@ echo "\n*** Testing var_dump() on resources ***\n"; $file_handle = fopen(__FILE__, "r"); /* directory type resource */ -$dir_handle = opendir( dirname(__FILE__) ); +$dir_handle = opendir( __DIR__ ); $resources = array ( $file_handle, diff --git a/ext/standard/tests/image/bug13213.phpt b/ext/standard/tests/image/bug13213.phpt index d6b82a4f0c..7af1549586 100644 --- a/ext/standard/tests/image/bug13213.phpt +++ b/ext/standard/tests/image/bug13213.phpt @@ -2,7 +2,7 @@ Bug #13213 (GetImageSize and wrong JPEG Comments) --FILE-- <?php -var_dump(GetImageSize(dirname(__FILE__).'/bug13213.jpg')); +var_dump(GetImageSize(__DIR__.'/bug13213.jpg')); ?> --EXPECTF-- Warning: getimagesize(): corrupt JPEG data: 2 extraneous bytes before marker in %s%ebug13213.php on line %d diff --git a/ext/standard/tests/image/getimagesize.phpt b/ext/standard/tests/image/getimagesize.phpt index 1164f10c3e..2d0ab0154d 100644 --- a/ext/standard/tests/image/getimagesize.phpt +++ b/ext/standard/tests/image/getimagesize.phpt @@ -7,7 +7,7 @@ GetImageSize() --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ GetImageSize() closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); } var_dump($result); ?> diff --git a/ext/standard/tests/image/getimagesize_246x247.phpt b/ext/standard/tests/image/getimagesize_246x247.phpt index e5a0aea779..5908671f1c 100644 --- a/ext/standard/tests/image/getimagesize_246x247.phpt +++ b/ext/standard/tests/image/getimagesize_246x247.phpt @@ -7,7 +7,7 @@ GetImageSize() with 246x247 pixels --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ GetImageSize() with 246x247 pixels closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); } var_dump($result); ?> diff --git a/ext/standard/tests/image/getimagesize_384x385.phpt b/ext/standard/tests/image/getimagesize_384x385.phpt index 0051df71e0..9ed1104220 100644 --- a/ext/standard/tests/image/getimagesize_384x385.phpt +++ b/ext/standard/tests/image/getimagesize_384x385.phpt @@ -7,7 +7,7 @@ GetImageSize() with 384x385 pixels --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ GetImageSize() with 384x385 pixels closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); } var_dump($result); ?> diff --git a/ext/standard/tests/image/getimagesize_basic.phpt b/ext/standard/tests/image/getimagesize_basic.phpt index dc2ec5e2e7..1129975742 100644 --- a/ext/standard/tests/image/getimagesize_basic.phpt +++ b/ext/standard/tests/image/getimagesize_basic.phpt @@ -41,7 +41,7 @@ echo "*** Testing getimagesize() : basic functionality ***\n"; // loop through each element of the array for imagetype foreach($imagetype_filenames as $key => $filename) { echo "\n-- $key ($filename) --\n"; - var_dump( getimagesize(dirname(__FILE__)."/$filename", $info) ); + var_dump( getimagesize(__DIR__."/$filename", $info) ); var_dump( $info ); }; ?> diff --git a/ext/standard/tests/image/getimagesize_jpgapp.phpt b/ext/standard/tests/image/getimagesize_jpgapp.phpt index 000cef0555..2776c8617a 100644 --- a/ext/standard/tests/image/getimagesize_jpgapp.phpt +++ b/ext/standard/tests/image/getimagesize_jpgapp.phpt @@ -16,7 +16,7 @@ $arr['this'] = "will"; $arr['all'] = "be destroyed!"; $arr['APP1'] = "and this too"; -getimagesize( dirname(__FILE__)."/testAPP.jpg", $arr); +getimagesize( __DIR__."/testAPP.jpg", $arr); foreach ($arr as $key => $value) { echo "$key - length: ". strlen($value) ."; md5: " . md5($value) . "\n" ; diff --git a/ext/standard/tests/image/getimagesize_swc.phpt b/ext/standard/tests/image/getimagesize_swc.phpt index f8c74498a4..5e79a5d0a2 100644 --- a/ext/standard/tests/image/getimagesize_swc.phpt +++ b/ext/standard/tests/image/getimagesize_swc.phpt @@ -8,7 +8,7 @@ GetImageSize() for compressed swf files ?> --FILE-- <?php - var_dump(getimagesize(dirname(__FILE__) . "/test13pix.swf")); + var_dump(getimagesize(__DIR__ . "/test13pix.swf")); ?> --EXPECT-- array(5) { diff --git a/ext/standard/tests/image/getimagesize_tif_mm.phpt b/ext/standard/tests/image/getimagesize_tif_mm.phpt index 3e044e12be..fe4efaf357 100644 --- a/ext/standard/tests/image/getimagesize_tif_mm.phpt +++ b/ext/standard/tests/image/getimagesize_tif_mm.phpt @@ -9,7 +9,7 @@ GetImageSize() for tiff format with big-endian (aka Motorola, aka MM) ordering */ echo "*** Testing getimagesize() : tiff_mm format ***\n"; -var_dump(getimagesize(dirname(__FILE__) . "/2x2mm.tif", $arr)); +var_dump(getimagesize(__DIR__ . "/2x2mm.tif", $arr)); var_dump($arr); ?> diff --git a/ext/standard/tests/image/getimagesize_variation2.phpt b/ext/standard/tests/image/getimagesize_variation2.phpt index eec2301c40..c475a9cb05 100644 --- a/ext/standard/tests/image/getimagesize_variation2.phpt +++ b/ext/standard/tests/image/getimagesize_variation2.phpt @@ -16,7 +16,7 @@ set_error_handler('test_error_handler'); echo "*** Testing getimagesize() : usage variations ***\n"; // Initialise function arguments not being substituted (if any) -$imagefile = dirname(__FILE__)."/test1pix.jpg"; +$imagefile = __DIR__."/test1pix.jpg"; //get an unset variable $unset_var = 10; diff --git a/ext/standard/tests/image/getimagesize_variation3.phpt b/ext/standard/tests/image/getimagesize_variation3.phpt index f935a9f883..a608047707 100644 --- a/ext/standard/tests/image/getimagesize_variation3.phpt +++ b/ext/standard/tests/image/getimagesize_variation3.phpt @@ -27,8 +27,8 @@ echo "*** Testing getimagesize() : variation ***\n"; //loop through each element of the array for filename foreach($file_types_array as $key => $filename) { echo "\n-- $key ($filename) --\n"; - var_dump( getimagesize(dirname(__FILE__)."/$filename" ) ); - var_dump( getimagesize(dirname(__FILE__)."/$filename", $info) ); + var_dump( getimagesize(__DIR__."/$filename" ) ); + var_dump( getimagesize(__DIR__."/$filename", $info) ); var_dump( $info ); }; ?> diff --git a/ext/standard/tests/image/getimagesize_variation4.phpt b/ext/standard/tests/image/getimagesize_variation4.phpt index ae73e27921..526e35c305 100644 --- a/ext/standard/tests/image/getimagesize_variation4.phpt +++ b/ext/standard/tests/image/getimagesize_variation4.phpt @@ -15,7 +15,7 @@ Test getimagesize() function : variation - For shockwave-flash format echo "*** Testing getimagesize() : variation ***\n"; -var_dump( getimagesize(dirname(__FILE__)."/test13pix.swf", $info) ); +var_dump( getimagesize(__DIR__."/test13pix.swf", $info) ); var_dump( $info ); ?> ===DONE=== diff --git a/ext/standard/tests/image/getimagesize_variation_003.phpt b/ext/standard/tests/image/getimagesize_variation_003.phpt index c242234e97..0e82e6fae3 100644 --- a/ext/standard/tests/image/getimagesize_variation_003.phpt +++ b/ext/standard/tests/image/getimagesize_variation_003.phpt @@ -27,8 +27,8 @@ echo "*** Testing getimagesize() : variation ***\n"; //loop through each element of the array for filename foreach($file_types_array as $key => $filename) { echo "\n-- $key ($filename) --\n"; - var_dump( getimagesize(dirname(__FILE__)."/$filename" ) ); - var_dump( getimagesize(dirname(__FILE__)."/$filename", $info) ); + var_dump( getimagesize(__DIR__."/$filename" ) ); + var_dump( getimagesize(__DIR__."/$filename", $info) ); var_dump( $info ); }; ?> diff --git a/ext/standard/tests/image/getimagesize_variation_005.phpt b/ext/standard/tests/image/getimagesize_variation_005.phpt index ea7b813d77..79d2de03e9 100644 --- a/ext/standard/tests/image/getimagesize_variation_005.phpt +++ b/ext/standard/tests/image/getimagesize_variation_005.phpt @@ -15,7 +15,7 @@ Test getimagesize() function : basic functionality for shockwave-flash echo "*** Testing getimagesize() : basic functionality ***\n"; -var_dump( getimagesize(dirname(__FILE__)."/test13pix.swf", $info) ); +var_dump( getimagesize(__DIR__."/test13pix.swf", $info) ); var_dump( $info ); ?> ===DONE=== diff --git a/ext/standard/tests/image/getimagesize_wbmp.phpt b/ext/standard/tests/image/getimagesize_wbmp.phpt index e09eab40af..268a7b7b08 100644 --- a/ext/standard/tests/image/getimagesize_wbmp.phpt +++ b/ext/standard/tests/image/getimagesize_wbmp.phpt @@ -9,7 +9,7 @@ GetImageSize() for wbmp format */ echo "*** Testing getimagesize() : wbmp format ***\n"; -var_dump(getimagesize(dirname(__FILE__) . "/75x50.wbmp", $arr)); +var_dump(getimagesize(__DIR__ . "/75x50.wbmp", $arr)); var_dump($arr); ?> diff --git a/ext/standard/tests/image/getimagesize_xbm.phpt b/ext/standard/tests/image/getimagesize_xbm.phpt index 635750c51c..6520cdb46e 100644 --- a/ext/standard/tests/image/getimagesize_xbm.phpt +++ b/ext/standard/tests/image/getimagesize_xbm.phpt @@ -9,7 +9,7 @@ GetImageSize() for xbm format */ echo "*** Testing getimagesize() : xbm format ***\n"; -var_dump(getimagesize(dirname(__FILE__) . "/75x50.xbm", $arr)); +var_dump(getimagesize(__DIR__ . "/75x50.xbm", $arr)); var_dump($arr); ?> diff --git a/ext/standard/tests/image/image_type_to_mime_type.phpt b/ext/standard/tests/image/image_type_to_mime_type.phpt index 199d2c4b58..f1a40e3eb3 100644 --- a/ext/standard/tests/image/image_type_to_mime_type.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type.phpt @@ -7,7 +7,7 @@ image_type_to_mime_type() --FILE-- <?php // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); + $dir = opendir(__DIR__) or die('cannot open directory: '.__DIR__); $result = array(); $files = array(); while (($file = readdir($dir)) !== FALSE) { @@ -18,7 +18,7 @@ image_type_to_mime_type() closedir($dir); sort($files); foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); + $result[$file] = getimagesize(__DIR__."/$file"); $result[$file] = image_type_to_mime_type($result[$file][2]); } var_dump($result); diff --git a/ext/standard/tests/image/iptcembed_001.phpt b/ext/standard/tests/image/iptcembed_001.phpt index a8ca381ce8..83cddcd47c 100644 --- a/ext/standard/tests/image/iptcembed_001.phpt +++ b/ext/standard/tests/image/iptcembed_001.phpt @@ -3,7 +3,7 @@ iptcembed() and wrong file --FILE-- <?php -$file = dirname(__FILE__).'/iptcembed_001.data'; +$file = __DIR__.'/iptcembed_001.data'; $fp = fopen($file, "w"); fwrite($fp, "-1-1"); fclose($fp); diff --git a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt index eb4c47271f..f615972a84 100644 --- a/ext/standard/tests/mail/mail_basic_alt1-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt1-win32.phpt @@ -7,7 +7,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -25,7 +25,7 @@ ini_set("smtp_port", 25); ini_set("sendmail_from", "user@example.com"); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt index dedb1e3ff8..5efe4504fe 100644 --- a/ext/standard/tests/mail/mail_basic_alt2-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt2-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -21,7 +21,7 @@ max_execution_time = 120 error_reporting(E_ALL & ~E_STRICT); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt index 5d1ec6b7a3..955c47451f 100644 --- a/ext/standard/tests/mail/mail_basic_alt3-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt3-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -21,7 +21,7 @@ max_execution_time = 120 error_reporting(E_ALL & ~E_STRICT); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt index c90e909c6f..4cf3367073 100644 --- a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -21,7 +21,7 @@ max_execution_time = 120 error_reporting(E_ALL & ~E_STRICT); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt index 258bf31377..598dea9c3b 100644 --- a/ext/standard/tests/mail/mail_variation_alt1-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt1-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -24,7 +24,7 @@ ini_set("smtp_port", 2525); ini_set("sendmail_from", "user@example.com"); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt index 4c8ee2ff6c..78df2c7ddf 100644 --- a/ext/standard/tests/mail/mail_variation_alt2-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt2-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -24,7 +24,7 @@ ini_set("smtp_port", 25); ini_set("sendmail_from", "user@example.com"); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt index ae6e308715..63d6ea61fa 100644 --- a/ext/standard/tests/mail/mail_variation_alt3-win32.phpt +++ b/ext/standard/tests/mail/mail_variation_alt3-win32.phpt @@ -6,7 +6,7 @@ if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } -require_once(dirname(__FILE__).'/mail_skipif.inc'); +require_once(__DIR__.'/mail_skipif.inc'); ?> --INI-- max_execution_time = 120 @@ -23,7 +23,7 @@ ini_set("SMTP", "localhost"); ini_set("smtp_port", 25); echo "*** Testing mail() : basic functionality ***\n"; -require_once(dirname(__FILE__).'/mail_include.inc'); +require_once(__DIR__.'/mail_include.inc'); $subject_prefix = "!**PHPT**!"; $to = "$username"; diff --git a/ext/standard/tests/math/abs.phpt b/ext/standard/tests/math/abs.phpt index 9350fc71fb..af8732811d 100644 --- a/ext/standard/tests/math/abs.phpt +++ b/ext/standard/tests/math/abs.phpt @@ -18,7 +18,7 @@ $tests = <<<TESTS -(LONG_MIN+1) === abs(LONG_MIN+1) TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- 1,1,0,0 OK diff --git a/ext/standard/tests/math/acos_basic.phpt b/ext/standard/tests/math/acos_basic.phpt index a5af21e958..6f73d40f40 100644 --- a/ext/standard/tests/math/acos_basic.phpt +++ b/ext/standard/tests/math/acos_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/acosh_basic.phpt b/ext/standard/tests/math/acosh_basic.phpt index ba1a706574..a9ba199df5 100644 --- a/ext/standard/tests/math/acosh_basic.phpt +++ b/ext/standard/tests/math/acosh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "acosh 1.1276259652064= "; diff --git a/ext/standard/tests/math/asin_basic.phpt b/ext/standard/tests/math/asin_basic.phpt index 7c7542e0f6..ec43d50692 100644 --- a/ext/standard/tests/math/asin_basic.phpt +++ b/ext/standard/tests/math/asin_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/asinh_basic.phpt b/ext/standard/tests/math/asinh_basic.phpt index 31643fa3c4..8fd189c66a 100644 --- a/ext/standard/tests/math/asinh_basic.phpt +++ b/ext/standard/tests/math/asinh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "asinh 0.52109530549375= "; diff --git a/ext/standard/tests/math/atan_basic.phpt b/ext/standard/tests/math/atan_basic.phpt index 180263fe59..24f1f4b924 100644 --- a/ext/standard/tests/math/atan_basic.phpt +++ b/ext/standard/tests/math/atan_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "atan 1.7320508075689 = "; diff --git a/ext/standard/tests/math/atanh_basic.phpt b/ext/standard/tests/math/atanh_basic.phpt index 87580ef181..8b994bc5fd 100644 --- a/ext/standard/tests/math/atanh_basic.phpt +++ b/ext/standard/tests/math/atanh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "atanh 0.46211715726001 = "; diff --git a/ext/standard/tests/math/cos_basic.phpt b/ext/standard/tests/math/cos_basic.phpt index 8ad7010ce1..863d443830 100644 --- a/ext/standard/tests/math/cos_basic.phpt +++ b/ext/standard/tests/math/cos_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/cosh_basic.phpt b/ext/standard/tests/math/cosh_basic.phpt index e6cfd868a0..5b52fb2a63 100644 --- a/ext/standard/tests/math/cosh_basic.phpt +++ b/ext/standard/tests/math/cosh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "cosh .5 = "; diff --git a/ext/standard/tests/math/deg2rad_basic.phpt b/ext/standard/tests/math/deg2rad_basic.phpt index 3b756281fa..6db1be4da8 100644 --- a/ext/standard/tests/math/deg2rad_basic.phpt +++ b/ext/standard/tests/math/deg2rad_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $arg_0 = 0.0; diff --git a/ext/standard/tests/math/log10_basic.phpt b/ext/standard/tests/math/log10_basic.phpt index 3ea14b59ac..b81284faf2 100644 --- a/ext/standard/tests/math/log10_basic.phpt +++ b/ext/standard/tests/math/log10_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $arg_0 = 1.0; diff --git a/ext/standard/tests/math/pow-operator.phpt b/ext/standard/tests/math/pow-operator.phpt index 66c65f4dea..c72e946422 100644 --- a/ext/standard/tests/math/pow-operator.phpt +++ b/ext/standard/tests/math/pow-operator.phpt @@ -15,7 +15,7 @@ $tests = <<<TESTS TESTS; echo "On failure, please mail result to php-dev@lists.php.net\n"; - include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); + include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- On failure, please mail result to php-dev@lists.php.net OK diff --git a/ext/standard/tests/math/pow.phpt b/ext/standard/tests/math/pow.phpt index 896acd7bcf..534ecbd58f 100644 --- a/ext/standard/tests/math/pow.phpt +++ b/ext/standard/tests/math/pow.phpt @@ -141,7 +141,7 @@ LONG_MIN*LONG_MIN ~== pow(LONG_MIN,2.0) TESTS; echo "On failure, please mail result to php-dev@lists.php.net\n"; - include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); + include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- 1,1,0,0 On failure, please mail result to php-dev@lists.php.net diff --git a/ext/standard/tests/math/rad2deg_basic.phpt b/ext/standard/tests/math/rad2deg_basic.phpt index e79e591cf7..d09f376151 100644 --- a/ext/standard/tests/math/rad2deg_basic.phpt +++ b/ext/standard/tests/math/rad2deg_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $arg_0 = 0.0; diff --git a/ext/standard/tests/math/round.phpt b/ext/standard/tests/math/round.phpt index 6a1615bd9a..16255c0a30 100644 --- a/ext/standard/tests/math/round.phpt +++ b/ext/standard/tests/math/round.phpt @@ -31,7 +31,7 @@ $tests = <<<TESTS LONG_MAX ~== floor(LONG_MAX + 0.5) TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- 1,1,0,0 OK diff --git a/ext/standard/tests/math/sin_basic.phpt b/ext/standard/tests/math/sin_basic.phpt index 27579cd289..f9be13bec9 100644 --- a/ext/standard/tests/math/sin_basic.phpt +++ b/ext/standard/tests/math/sin_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/math/sinh_basic.phpt b/ext/standard/tests/math/sinh_basic.phpt index 2bcf42f9fd..8d16e1712e 100644 --- a/ext/standard/tests/math/sinh_basic.phpt +++ b/ext/standard/tests/math/sinh_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); echo "sinh .5 = "; diff --git a/ext/standard/tests/math/tan_basic.phpt b/ext/standard/tests/math/tan_basic.phpt index b804a662de..a4d95d77b0 100644 --- a/ext/standard/tests/math/tan_basic.phpt +++ b/ext/standard/tests/math/tan_basic.phpt @@ -9,7 +9,7 @@ precision = 14 * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); $sixty = M_PI / 3.0; diff --git a/ext/standard/tests/math/tanh_basic.phpt b/ext/standard/tests/math/tanh_basic.phpt index 30eacca4cc..472d88b94e 100644 --- a/ext/standard/tests/math/tanh_basic.phpt +++ b/ext/standard/tests/math/tanh_basic.phpt @@ -8,7 +8,7 @@ precision = 14 * proto float tanh(float number) * Function is implemented in ext/standard/math.c */ -$file_path = dirname(__FILE__); +$file_path = __DIR__; require($file_path."/allowed_rounding_error.inc"); diff --git a/ext/standard/tests/misc/get_browser_basic.phpt b/ext/standard/tests/misc/get_browser_basic.phpt index 312bd89b66..fdc2a7868c 100644 --- a/ext/standard/tests/misc/get_browser_basic.phpt +++ b/ext/standard/tests/misc/get_browser_basic.phpt @@ -23,7 +23,7 @@ browscap={PWD}/browscap.ini * Alias to functions: */ -$browsers = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'browsernames.inc'; +$browsers = include __DIR__ . DIRECTORY_SEPARATOR . 'browsernames.inc'; echo "*** Testing get_browser() : basic functionality ***\n"; diff --git a/ext/standard/tests/misc/get_browser_error.phpt b/ext/standard/tests/misc/get_browser_error.phpt index 049c8b9431..c8689d8370 100644 --- a/ext/standard/tests/misc/get_browser_error.phpt +++ b/ext/standard/tests/misc/get_browser_error.phpt @@ -23,7 +23,7 @@ browscap={PWD}/browscap.ini * Alias to functions: */ -$browsers = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'browsernames.inc'; +$browsers = include __DIR__ . DIRECTORY_SEPARATOR . 'browsernames.inc'; echo "*** Testing get_browser() : error functionality ***\n"; diff --git a/ext/standard/tests/misc/get_browser_variation1.phpt b/ext/standard/tests/misc/get_browser_variation1.phpt index 551206a569..2cd2c4e5a0 100644 --- a/ext/standard/tests/misc/get_browser_variation1.phpt +++ b/ext/standard/tests/misc/get_browser_variation1.phpt @@ -23,7 +23,7 @@ browscap={PWD}/browscap.ini * Alias to functions: */ -$browsers = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'browsernames.inc'; +$browsers = include __DIR__ . DIRECTORY_SEPARATOR . 'browsernames.inc'; echo "*** Testing get_browser() : variation functionality: extra browser names ***\n"; diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt index b152b91aad..c0f5917ec9 100644 --- a/ext/standard/tests/serialize/005.phpt +++ b/ext/standard/tests/serialize/005.phpt @@ -9,7 +9,7 @@ function do_autoload($class_name) { if ($class_name != 'autoload_not_available') { - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.inc'); + require_once(__DIR__ . '/' . strtolower($class_name) . '.inc'); } echo __FUNCTION__ . "($class_name)\n"; } diff --git a/ext/standard/tests/serialize/bug30234.phpt b/ext/standard/tests/serialize/bug30234.phpt index 1a46fc7851..41ef9dd565 100644 --- a/ext/standard/tests/serialize/bug30234.phpt +++ b/ext/standard/tests/serialize/bug30234.phpt @@ -8,7 +8,7 @@ Bug #30234 (__autoload() not invoked for interfaces) <?php spl_autoload_register(function ($class_name) { - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.inc'); + require_once(__DIR__ . '/' . strtolower($class_name) . '.inc'); echo __FUNCTION__ . '(' . $class_name . ")\n"; }); diff --git a/ext/standard/tests/streams/bug46024.phpt b/ext/standard/tests/streams/bug46024.phpt index 548768283c..4fb0eee402 100644 --- a/ext/standard/tests/streams/bug46024.phpt +++ b/ext/standard/tests/streams/bug46024.phpt @@ -9,7 +9,7 @@ $pipes = array(); $proc = proc_open( "$php -n -i" ,array(0 => array('pipe', 'r'), 1 => array('pipe', 'w')) - ,$pipes, dirname(__FILE__), array(), array() + ,$pipes, __DIR__, array(), array() ); var_dump($proc); if (!$proc) { diff --git a/ext/standard/tests/streams/bug64433.phpt b/ext/standard/tests/streams/bug64433.phpt index 897947f453..bb22edee55 100644 --- a/ext/standard/tests/streams/bug64433.phpt +++ b/ext/standard/tests/streams/bug64433.phpt @@ -2,9 +2,9 @@ Bug #60180 ($_SERVER["PHP_SELF"] incorrect) --SKIPIF-- <?php -if(!file_exists(dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc")) +if(!file_exists(__DIR__."/../../../../sapi/cli/tests/php_cli_server.inc")) die("skip could not found cli server script"); -$res = @include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc"; +$res = @include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc"; if(!$res) { die("skip could not open cli server script"); } @@ -13,8 +13,8 @@ if(!$res) { server --FILE-- <?php -include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc"; -php_cli_server_start(file_get_contents(dirname(__FILE__).'/bug64433_srv.inc')); +include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc"; +php_cli_server_start(file_get_contents(__DIR__.'/bug64433_srv.inc')); echo file_get_contents("http://".PHP_CLI_SERVER_ADDRESS."/index.php"); echo "default\n"; diff --git a/ext/standard/tests/streams/bug70198.phpt b/ext/standard/tests/streams/bug70198.phpt index 7b4b8cc16d..83efb9669b 100644 --- a/ext/standard/tests/streams/bug70198.phpt +++ b/ext/standard/tests/streams/bug70198.phpt @@ -16,7 +16,7 @@ server */ $srv_addr = "tcp://127.0.0.1:8964"; -$srv_fl = dirname(__FILE__) . "/bug70198_svr_" . md5(uniqid()) . ".php"; +$srv_fl = __DIR__ . "/bug70198_svr_" . md5(uniqid()) . ".php"; $srv_fl_cont = <<<SRV <?php \$socket = stream_socket_server('$srv_addr', \$errno, \$errstr); diff --git a/ext/standard/tests/streams/bug72534.phpt b/ext/standard/tests/streams/bug72534.phpt index 5ffc90b6bd..005b8b9d7d 100644 --- a/ext/standard/tests/streams/bug72534.phpt +++ b/ext/standard/tests/streams/bug72534.phpt @@ -2,7 +2,7 @@ Bug #72534 stream_socket_get_name crashes --FILE-- <?php -$fname = dirname(__FILE__) . '/aa.tmp'; +$fname = __DIR__ . '/aa.tmp'; $fp0 = fopen($fname, 'w'); var_dump(stream_socket_get_name($fp0, false)); var_dump(stream_socket_get_name($fp0, true)); @@ -10,7 +10,7 @@ fclose($fp0); ?> --CLEAN-- <?php -$fname = dirname(__FILE__) . '/aa.tmp'; +$fname = __DIR__ . '/aa.tmp'; unlink($fname); ?> --EXPECT-- diff --git a/ext/standard/tests/streams/bug72857.phpt b/ext/standard/tests/streams/bug72857.phpt index e91e6fa4ea..7b71c269f4 100644 --- a/ext/standard/tests/streams/bug72857.phpt +++ b/ext/standard/tests/streams/bug72857.phpt @@ -2,7 +2,7 @@ Bug #72857 stream_socket_recvfrom read access violation --FILE-- <?php - $fname = dirname(__FILE__) . DIRECTORY_SEPARATOR . "stream_socket_recvfrom.tmp"; + $fname = __DIR__ . DIRECTORY_SEPARATOR . "stream_socket_recvfrom.tmp"; $fp0 = fopen($fname, 'w'); $v2=10; $v3=STREAM_PEEK; diff --git a/ext/standard/tests/streams/proc_open_bug51800.phpt b/ext/standard/tests/streams/proc_open_bug51800.phpt index a107875e3e..7e7d2c7cb3 100644 --- a/ext/standard/tests/streams/proc_open_bug51800.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800.phpt @@ -18,7 +18,7 @@ so then the pipe buffer is emptied more often and the child has chance to contin write. The behaviour might look some better if write/read in a separate thread, however this is much more resource greedy and complexer to integrate into the user script. */ -$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php"; +$callee = __DIR__ . "/process_proc_open_bug51800.php"; $php = PHP_BINARY; $cmd = "$php $callee"; @@ -77,7 +77,7 @@ var_dump(array( ===DONE=== --CLEAN-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800.php"; +$callee = __DIR__ . "/process_proc_open_bug51800.php"; unlink($callee); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/proc_open_bug51800_right.phpt b/ext/standard/tests/streams/proc_open_bug51800_right.phpt index 2753570fb1..22860f1fc3 100644 --- a/ext/standard/tests/streams/proc_open_bug51800_right.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800_right.phpt @@ -2,7 +2,7 @@ Bug #51800 proc_open on Windows hangs forever, the right way to do it --FILE-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right.php"; $php = PHP_BINARY; $cmd = "$php -n $callee"; @@ -60,7 +60,7 @@ var_dump(array( ===DONE=== --CLEAN-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right.php"; unlink($callee); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/proc_open_bug51800_right2.phpt b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt index 045d3f70db..d183557066 100644 --- a/ext/standard/tests/streams/proc_open_bug51800_right2.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800_right2.phpt @@ -2,7 +2,7 @@ Bug #51800 proc_open on Windows hangs forever, the right way to do it with more data --FILE-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right2.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right2.php"; $php = PHP_BINARY; $cmd = "$php -n $callee"; @@ -66,7 +66,7 @@ var_dump(array( ===DONE=== --CLEAN-- <?php -$callee = dirname(__FILE__) . "/process_proc_open_bug51800_right2.php"; +$callee = __DIR__ . "/process_proc_open_bug51800_right2.php"; unlink($callee); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/proc_open_bug69900.phpt b/ext/standard/tests/streams/proc_open_bug69900.phpt index 8e0c99fb83..6e1133a399 100644 --- a/ext/standard/tests/streams/proc_open_bug69900.phpt +++ b/ext/standard/tests/streams/proc_open_bug69900.phpt @@ -5,7 +5,7 @@ Bug #69900 Commandline input/output weird behaviour with STDIO error_reporting(E_ALL); -$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; +$fl = __DIR__ . DIRECTORY_SEPARATOR . "test69900.php"; $max_ms = 10; $test_content = '<?php @@ -52,7 +52,7 @@ proc_close($process); ===DONE=== --CLEAN-- <?php -$fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "test69900.php"; +$fl = __DIR__ . DIRECTORY_SEPARATOR . "test69900.php"; @unlink($fl); ?> --EXPECTF-- diff --git a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt index ed7f7fb0ac..420d5ad490 100644 --- a/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt +++ b/ext/standard/tests/streams/stream_context_tcp_nodelay_server.phpt @@ -39,7 +39,7 @@ CODE; include sprintf( "%s/../../../openssl/tests/ServerClientTestCase.inc", - dirname(__FILE__)); + __DIR__); ServerClientTestCase::getInstance()->run($serverCode, $clientCode); ?> --EXPECT-- diff --git a/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt index 6658d69a4b..bdcc077b67 100644 --- a/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt +++ b/ext/standard/tests/streams/stream_get_meta_data_dir_basic.phpt @@ -3,11 +3,11 @@ stream_get_meta_data() on directories --FILE-- <?php -$dir = opendir(dirname(__FILE__)); +$dir = opendir(__DIR__); var_dump(stream_get_meta_data($dir)); closedir($dir); -$dirObject = dir(dirname(__FILE__)); +$dirObject = dir(__DIR__); var_dump(stream_get_meta_data($dirObject->handle)); ?> diff --git a/ext/standard/tests/strings/fprintf_variation_001.phpt b/ext/standard/tests/strings/fprintf_variation_001.phpt index df81c249b6..c010aef3d4 100644 --- a/ext/standard/tests/strings/fprintf_variation_001.phpt +++ b/ext/standard/tests/strings/fprintf_variation_001.phpt @@ -7,7 +7,7 @@ $float_variation = array( "%f","%-f", "%+f", "%7.2f", "%-7.2f", "%07.2f", "%-07. $float_numbers = array( 0, 1, -1, 0.32, -0.32, 3.4. -3.4, 2.54, -2.54 ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_001.txt'; +$data_file = __DIR__ . '/fprintf_variation_001.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_002.phpt b/ext/standard/tests/strings/fprintf_variation_002.phpt index 1cc1a4ddd7..f0f21b4630 100644 --- a/ext/standard/tests/strings/fprintf_variation_002.phpt +++ b/ext/standard/tests/strings/fprintf_variation_002.phpt @@ -7,7 +7,7 @@ $int_variation = array( "%d", "%-d", "%+d", "%7.2d", "%-7.2d", "%07.2d", "%-07.2 $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_002.txt'; +$data_file = __DIR__ . '/fprintf_variation_002.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_003.phpt b/ext/standard/tests/strings/fprintf_variation_003.phpt index 1e8eb4706f..9e9779371e 100644 --- a/ext/standard/tests/strings/fprintf_variation_003.phpt +++ b/ext/standard/tests/strings/fprintf_variation_003.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_003.txt'; +$data_file = __DIR__ . '/fprintf_variation_003.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt index 26db7ab18b..bdb59d5021 100644 --- a/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_003_64bit.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_003_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_003_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_004.phpt b/ext/standard/tests/strings/fprintf_variation_004.phpt Binary files differindex aa47a298d8..103ca579f4 100644 --- a/ext/standard/tests/strings/fprintf_variation_004.phpt +++ b/ext/standard/tests/strings/fprintf_variation_004.phpt diff --git a/ext/standard/tests/strings/fprintf_variation_005.phpt b/ext/standard/tests/strings/fprintf_variation_005.phpt index 0be2cb6847..ddc4f70938 100644 --- a/ext/standard/tests/strings/fprintf_variation_005.phpt +++ b/ext/standard/tests/strings/fprintf_variation_005.phpt @@ -6,7 +6,7 @@ Test fprintf() function (variation - 5) $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_005.txt'; +$data_file = __DIR__ . '/fprintf_variation_005.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_006.phpt b/ext/standard/tests/strings/fprintf_variation_006.phpt index b48720c2d5..75846c2731 100644 --- a/ext/standard/tests/strings/fprintf_variation_006.phpt +++ b/ext/standard/tests/strings/fprintf_variation_006.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_006.txt'; +$data_file = __DIR__ . '/fprintf_variation_006.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt index 92ab010d03..a4c20f16f5 100644 --- a/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_006_64bit.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_006_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_006_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_007.phpt b/ext/standard/tests/strings/fprintf_variation_007.phpt index f2653a1ee1..e2102a53ab 100644 --- a/ext/standard/tests/strings/fprintf_variation_007.phpt +++ b/ext/standard/tests/strings/fprintf_variation_007.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_007.txt'; +$data_file = __DIR__ . '/fprintf_variation_007.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt index 9e30f91639..b4c80f95c5 100644 --- a/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_007_64bit.phpt @@ -10,7 +10,7 @@ if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_007_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_007_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_008.phpt b/ext/standard/tests/strings/fprintf_variation_008.phpt index e8c0a9e412..dba49b47ba 100644 --- a/ext/standard/tests/strings/fprintf_variation_008.phpt +++ b/ext/standard/tests/strings/fprintf_variation_008.phpt @@ -11,7 +11,7 @@ $int_variation = array( "%d", "%-d", "%+d", "%7.2d", "%-7.2d", "%07.2d", "%-07.2 $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_008.txt'; +$data_file = __DIR__ . '/fprintf_variation_008.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt b/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt index 661f2711f3..fae1ce3c2a 100644 --- a/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt +++ b/ext/standard/tests/strings/fprintf_variation_008_64bit.phpt @@ -11,7 +11,7 @@ $int_variation = array( "%d", "%-d", "%+d", "%7.2d", "%-7.2d", "%07.2d", "%-07.2 $int_numbers = array( 0, 1, -1, 2.7, -2.7, 23333333, -23333333, "1234" ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_008_64bit.txt'; +$data_file = __DIR__ . '/fprintf_variation_008_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/fprintf_variation_009.phpt b/ext/standard/tests/strings/fprintf_variation_009.phpt index c16623ba8f..eb1780f0ce 100644 --- a/ext/standard/tests/strings/fprintf_variation_009.phpt +++ b/ext/standard/tests/strings/fprintf_variation_009.phpt @@ -7,7 +7,7 @@ $string_variation = array( "%5s", "%-5s", "%05s", "%'#5s" ); $strings = array( NULL, "abc", 'aaa' ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/fprintf_variation_009.txt'; +$data_file = __DIR__ . '/fprintf_variation_009.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/get_meta_tags.phpt b/ext/standard/tests/strings/get_meta_tags.phpt index cc29995046..406ceb2590 100644 --- a/ext/standard/tests/strings/get_meta_tags.phpt +++ b/ext/standard/tests/strings/get_meta_tags.phpt @@ -3,7 +3,7 @@ get_meta_tags() tests --FILE-- <?php -$filename = dirname(__FILE__)."/get_meta_tags.html"; +$filename = __DIR__."/get_meta_tags.html"; $data = <<<DATA <meta name="author" content="name"> diff --git a/ext/standard/tests/strings/highlight_file.phpt b/ext/standard/tests/strings/highlight_file.phpt index 65636908e6..9861c6c27f 100644 --- a/ext/standard/tests/strings/highlight_file.phpt +++ b/ext/standard/tests/strings/highlight_file.phpt @@ -11,7 +11,7 @@ allow_url_fopen=1 --FILE-- <?php -$filename = dirname(__FILE__)."/highlight_file.dat"; +$filename = __DIR__."/highlight_file.dat"; var_dump(highlight_file()); var_dump(highlight_file($filename)); diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt Binary files differindex d5de391e96..085c9bc0cd 100644 --- a/ext/standard/tests/strings/implode1.phpt +++ b/ext/standard/tests/strings/implode1.phpt diff --git a/ext/standard/tests/strings/php_strip_whitespace.phpt b/ext/standard/tests/strings/php_strip_whitespace.phpt index d9376b101a..442672c6aa 100644 --- a/ext/standard/tests/strings/php_strip_whitespace.phpt +++ b/ext/standard/tests/strings/php_strip_whitespace.phpt @@ -3,7 +3,7 @@ php_strip_whitespace() tests --FILE-- <?php -$filename = dirname(__FILE__)."/php_strip_whitespace.dat"; +$filename = __DIR__."/php_strip_whitespace.dat"; var_dump(php_strip_whitespace()); var_dump(php_strip_whitespace($filename)); diff --git a/ext/standard/tests/strings/sha1.phpt b/ext/standard/tests/strings/sha1.phpt index 68a8a080ca..1dc73881ef 100644 --- a/ext/standard/tests/strings/sha1.phpt +++ b/ext/standard/tests/strings/sha1.phpt @@ -3,7 +3,7 @@ sha1() with ASCII output --FILE-- <?php -$filename = dirname(__FILE__)."/sha1.dat"; +$filename = __DIR__."/sha1.dat"; $a = array( "abc", "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", diff --git a/ext/standard/tests/strings/sprintf_variation11.phpt b/ext/standard/tests/strings/sprintf_variation11.phpt index cb2a3a9cac..d3de553580 100644 --- a/ext/standard/tests/strings/sprintf_variation11.phpt +++ b/ext/standard/tests/strings/sprintf_variation11.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : float formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation17.phpt b/ext/standard/tests/strings/sprintf_variation17.phpt index dc9bc8bcad..ac040faeaf 100644 --- a/ext/standard/tests/strings/sprintf_variation17.phpt +++ b/ext/standard/tests/strings/sprintf_variation17.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : string formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource values $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation23.phpt b/ext/standard/tests/strings/sprintf_variation23.phpt index fc3148c0be..8a7a45e57a 100644 --- a/ext/standard/tests/strings/sprintf_variation23.phpt +++ b/ext/standard/tests/strings/sprintf_variation23.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : char formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation30.phpt b/ext/standard/tests/strings/sprintf_variation30.phpt index d0beeb9501..885dc26718 100644 --- a/ext/standard/tests/strings/sprintf_variation30.phpt +++ b/ext/standard/tests/strings/sprintf_variation30.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : octal formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation36.phpt b/ext/standard/tests/strings/sprintf_variation36.phpt index bf05a99db4..b465e0cf9e 100644 --- a/ext/standard/tests/strings/sprintf_variation36.phpt +++ b/ext/standard/tests/strings/sprintf_variation36.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : hexa formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation42.phpt b/ext/standard/tests/strings/sprintf_variation42.phpt index 760c173a00..8dcec355ac 100644 --- a/ext/standard/tests/strings/sprintf_variation42.phpt +++ b/ext/standard/tests/strings/sprintf_variation42.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : unsigned formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation48.phpt b/ext/standard/tests/strings/sprintf_variation48.phpt index ac551a4453..1f5504af4b 100644 --- a/ext/standard/tests/strings/sprintf_variation48.phpt +++ b/ext/standard/tests/strings/sprintf_variation48.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : scientific formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); // array of resource types $resource_values = array ( diff --git a/ext/standard/tests/strings/sprintf_variation5.phpt b/ext/standard/tests/strings/sprintf_variation5.phpt index 4fc37435ef..a5cb86bdda 100644 --- a/ext/standard/tests/strings/sprintf_variation5.phpt +++ b/ext/standard/tests/strings/sprintf_variation5.phpt @@ -11,7 +11,7 @@ echo "*** Testing sprintf() : integer formats with resource values ***\n"; // resource type variable $fp = fopen (__FILE__, "r"); -$dfp = opendir ( dirname(__FILE__) ); +$dfp = opendir ( __DIR__ ); $fp_copy = $fp; $dfp_copy = $dfp; diff --git a/ext/standard/tests/strings/trim.phpt b/ext/standard/tests/strings/trim.phpt index 44276284e1..660bb202eb 100644 --- a/ext/standard/tests/strings/trim.phpt +++ b/ext/standard/tests/strings/trim.phpt @@ -21,6 +21,6 @@ $tests = <<<TESTS "ABC" === trim("ABC\\x50\\xC1\\x60\\x90","\\x50..\\xC1") TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- OK diff --git a/ext/standard/tests/strings/vfprintf_basic1.phpt b/ext/standard/tests/strings/vfprintf_basic1.phpt index 84d8ad101d..aa8d2eb850 100644 --- a/ext/standard/tests/strings/vfprintf_basic1.phpt +++ b/ext/standard/tests/strings/vfprintf_basic1.phpt @@ -20,7 +20,7 @@ $arg3 = array("one","two","three"); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic1.txt'; +$data_file = __DIR__ . '/vfprintf_basic1.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic2.phpt b/ext/standard/tests/strings/vfprintf_basic2.phpt index 970640f071..4593dbb1b6 100644 --- a/ext/standard/tests/strings/vfprintf_basic2.phpt +++ b/ext/standard/tests/strings/vfprintf_basic2.phpt @@ -23,7 +23,7 @@ $arg2 = array(111,222); $arg3 = array(111,222,333); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic2.txt'; +$data_file = __DIR__ . '/vfprintf_basic2.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic3.phpt b/ext/standard/tests/strings/vfprintf_basic3.phpt index a940ccffe8..b303f196f8 100644 --- a/ext/standard/tests/strings/vfprintf_basic3.phpt +++ b/ext/standard/tests/strings/vfprintf_basic3.phpt @@ -24,7 +24,7 @@ $arg2 = array(11.11,22.22); $arg3 = array(11.11,22.22,33.33); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic3.txt'; +$data_file = __DIR__ . '/vfprintf_basic3.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic4.phpt b/ext/standard/tests/strings/vfprintf_basic4.phpt index c8a170c670..a0780c160b 100644 --- a/ext/standard/tests/strings/vfprintf_basic4.phpt +++ b/ext/standard/tests/strings/vfprintf_basic4.phpt @@ -19,7 +19,7 @@ $arg2 = array(TRUE,FALSE); $arg3 = array(TRUE,FALSE,TRUE); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic4.txt'; +$data_file = __DIR__ . '/vfprintf_basic4.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic5.phpt b/ext/standard/tests/strings/vfprintf_basic5.phpt index f89ab53f5c..56dd2c67fc 100644 --- a/ext/standard/tests/strings/vfprintf_basic5.phpt +++ b/ext/standard/tests/strings/vfprintf_basic5.phpt @@ -19,7 +19,7 @@ $arg2 = array(65,66); $arg3 = array(65,66,67); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic5.txt'; +$data_file = __DIR__ . '/vfprintf_basic5.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic6.phpt b/ext/standard/tests/strings/vfprintf_basic6.phpt index 9e888939d2..0590810e31 100644 --- a/ext/standard/tests/strings/vfprintf_basic6.phpt +++ b/ext/standard/tests/strings/vfprintf_basic6.phpt @@ -20,7 +20,7 @@ $arg2 = array(1000,2000); $arg3 = array(1000,2000,3000); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic6.txt'; +$data_file = __DIR__ . '/vfprintf_basic6.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic7.phpt b/ext/standard/tests/strings/vfprintf_basic7.phpt index a9f286f5a8..f7cc0ed0b3 100644 --- a/ext/standard/tests/strings/vfprintf_basic7.phpt +++ b/ext/standard/tests/strings/vfprintf_basic7.phpt @@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567); $arg3 = array(-1111,-1234567,-2345432); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic7.txt'; +$data_file = __DIR__ . '/vfprintf_basic7.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt b/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt index b5526a652f..3587792d81 100644 --- a/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_basic7_64bit.phpt @@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567); $arg3 = array(-1111,-1234567,-2345432); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic7_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_basic7_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic8.phpt b/ext/standard/tests/strings/vfprintf_basic8.phpt index ed9d23c2ad..ced87284f8 100644 --- a/ext/standard/tests/strings/vfprintf_basic8.phpt +++ b/ext/standard/tests/strings/vfprintf_basic8.phpt @@ -19,7 +19,7 @@ $arg2 = array(021,0347); $arg3 = array(021,0347,0567); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic8.txt'; +$data_file = __DIR__ . '/vfprintf_basic8.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_basic9.phpt b/ext/standard/tests/strings/vfprintf_basic9.phpt index 080e52bb64..db98c442e8 100644 --- a/ext/standard/tests/strings/vfprintf_basic9.phpt +++ b/ext/standard/tests/strings/vfprintf_basic9.phpt @@ -24,7 +24,7 @@ $arg2 = array(11,132); $arg3 = array(11,132,177); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_basic9.txt'; +$data_file = __DIR__ . '/vfprintf_basic9.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation10.phpt b/ext/standard/tests/strings/vfprintf_variation10.phpt Binary files differindex fac24dc7a9..dda2105dcd 100644 --- a/ext/standard/tests/strings/vfprintf_variation10.phpt +++ b/ext/standard/tests/strings/vfprintf_variation10.phpt diff --git a/ext/standard/tests/strings/vfprintf_variation11.phpt b/ext/standard/tests/strings/vfprintf_variation11.phpt index e94e7e0c56..6c93875c75 100644 --- a/ext/standard/tests/strings/vfprintf_variation11.phpt +++ b/ext/standard/tests/strings/vfprintf_variation11.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation11.txt'; +$data_file = __DIR__ . '/vfprintf_variation11.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt index ab3e1ce83f..5217442ff9 100644 --- a/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation11_64bit.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation11_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation11_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation12.phpt b/ext/standard/tests/strings/vfprintf_variation12.phpt index 51ab97e8bf..a655da5367 100644 --- a/ext/standard/tests/strings/vfprintf_variation12.phpt +++ b/ext/standard/tests/strings/vfprintf_variation12.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation12.txt'; +$data_file = __DIR__ . '/vfprintf_variation12.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt index ffd232355c..651ff7b70d 100644 --- a/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation12_64bit.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation12_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation12_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation13.phpt b/ext/standard/tests/strings/vfprintf_variation13.phpt index ebb45acb6b..dca1d4c169 100644 --- a/ext/standard/tests/strings/vfprintf_variation13.phpt +++ b/ext/standard/tests/strings/vfprintf_variation13.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation13.txt'; +$data_file = __DIR__ . '/vfprintf_variation13.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt index 34089e2b78..7288abc485 100644 --- a/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation13_64bit.phpt @@ -45,7 +45,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation13_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation13_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation14.phpt b/ext/standard/tests/strings/vfprintf_variation14.phpt index ea2957a18c..7e0ab0193f 100644 --- a/ext/standard/tests/strings/vfprintf_variation14.phpt +++ b/ext/standard/tests/strings/vfprintf_variation14.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation14.txt'; +$data_file = __DIR__ . '/vfprintf_variation14.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt index 9916967b3f..83576b1d34 100644 --- a/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation14_64bit.phpt @@ -68,7 +68,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation14_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation14_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation15.phpt b/ext/standard/tests/strings/vfprintf_variation15.phpt index b513227836..b0d7091c09 100644 --- a/ext/standard/tests/strings/vfprintf_variation15.phpt +++ b/ext/standard/tests/strings/vfprintf_variation15.phpt @@ -38,7 +38,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation15.txt'; +$data_file = __DIR__ . '/vfprintf_variation15.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt index b31ffd3eb4..53dd105123 100644 --- a/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation15_64bit.phpt @@ -38,7 +38,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation15_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation15_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation16.phpt b/ext/standard/tests/strings/vfprintf_variation16.phpt index 010028c387..1d2858cbab 100644 --- a/ext/standard/tests/strings/vfprintf_variation16.phpt +++ b/ext/standard/tests/strings/vfprintf_variation16.phpt @@ -61,7 +61,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation16.txt'; +$data_file = __DIR__ . '/vfprintf_variation16.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt index 0819cc0e5f..f65998aeef 100644 --- a/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation16_64bit.phpt @@ -61,7 +61,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation16_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation16_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation17.phpt b/ext/standard/tests/strings/vfprintf_variation17.phpt index 545ae6d43d..3c9d82025f 100644 --- a/ext/standard/tests/strings/vfprintf_variation17.phpt +++ b/ext/standard/tests/strings/vfprintf_variation17.phpt @@ -34,7 +34,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation17.txt'; +$data_file = __DIR__ . '/vfprintf_variation17.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation18.phpt b/ext/standard/tests/strings/vfprintf_variation18.phpt index 3d0d810442..71277ca3d8 100644 --- a/ext/standard/tests/strings/vfprintf_variation18.phpt +++ b/ext/standard/tests/strings/vfprintf_variation18.phpt @@ -57,7 +57,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation18.txt'; +$data_file = __DIR__ . '/vfprintf_variation18.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation19.phpt b/ext/standard/tests/strings/vfprintf_variation19.phpt index 19aac7738b..b3d5eed82b 100644 --- a/ext/standard/tests/strings/vfprintf_variation19.phpt +++ b/ext/standard/tests/strings/vfprintf_variation19.phpt @@ -46,7 +46,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation19.txt'; +$data_file = __DIR__ . '/vfprintf_variation19.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt index 8ad2df0947..0ae053ac98 100644 --- a/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation19_64bit.phpt @@ -46,7 +46,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation19_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation19_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation20.phpt b/ext/standard/tests/strings/vfprintf_variation20.phpt index 3bc9bf6b29..1f8dfefca4 100644 --- a/ext/standard/tests/strings/vfprintf_variation20.phpt +++ b/ext/standard/tests/strings/vfprintf_variation20.phpt @@ -84,7 +84,7 @@ $values = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation20.txt'; +$data_file = __DIR__ . '/vfprintf_variation20.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation21.phpt b/ext/standard/tests/strings/vfprintf_variation21.phpt index 874b279763..11f29e87ac 100644 --- a/ext/standard/tests/strings/vfprintf_variation21.phpt +++ b/ext/standard/tests/strings/vfprintf_variation21.phpt @@ -81,7 +81,7 @@ $values = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation21.txt'; +$data_file = __DIR__ . '/vfprintf_variation21.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation3.phpt b/ext/standard/tests/strings/vfprintf_variation3.phpt index e3e7b9636a..7cb8e83d0d 100644 --- a/ext/standard/tests/strings/vfprintf_variation3.phpt +++ b/ext/standard/tests/strings/vfprintf_variation3.phpt @@ -45,7 +45,7 @@ $args_array = array( // and with int values from the above $args_array array /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation3.txt'; +$data_file = __DIR__ . '/vfprintf_variation3.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation4.phpt b/ext/standard/tests/strings/vfprintf_variation4.phpt index 9dad0eff58..312ec6f18a 100644 --- a/ext/standard/tests/strings/vfprintf_variation4.phpt +++ b/ext/standard/tests/strings/vfprintf_variation4.phpt @@ -62,7 +62,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation4.txt'; +$data_file = __DIR__ . '/vfprintf_variation4.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt b/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt index 1bf0861c0f..690e2633f2 100644 --- a/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt +++ b/ext/standard/tests/strings/vfprintf_variation4_64bit.phpt @@ -62,7 +62,7 @@ $args_array = array( /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation4_64bit.txt'; +$data_file = __DIR__ . '/vfprintf_variation4_64bit.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation5.phpt b/ext/standard/tests/strings/vfprintf_variation5.phpt index ffe6c347bc..a9139ce6af 100644 --- a/ext/standard/tests/strings/vfprintf_variation5.phpt +++ b/ext/standard/tests/strings/vfprintf_variation5.phpt @@ -42,7 +42,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation5.txt'; +$data_file = __DIR__ . '/vfprintf_variation5.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation6.phpt b/ext/standard/tests/strings/vfprintf_variation6.phpt index 9194d84866..e586a074f2 100644 --- a/ext/standard/tests/strings/vfprintf_variation6.phpt +++ b/ext/standard/tests/strings/vfprintf_variation6.phpt @@ -57,7 +57,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation6.txt'; +$data_file = __DIR__ . '/vfprintf_variation6.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation7.phpt b/ext/standard/tests/strings/vfprintf_variation7.phpt Binary files differindex ee836edc77..54b4ef4505 100644 --- a/ext/standard/tests/strings/vfprintf_variation7.phpt +++ b/ext/standard/tests/strings/vfprintf_variation7.phpt diff --git a/ext/standard/tests/strings/vfprintf_variation8.phpt b/ext/standard/tests/strings/vfprintf_variation8.phpt index 036c52b04a..ff806154f4 100644 --- a/ext/standard/tests/strings/vfprintf_variation8.phpt +++ b/ext/standard/tests/strings/vfprintf_variation8.phpt @@ -60,7 +60,7 @@ $args_array = array( ); /* creating dumping file */ -$data_file = dirname(__FILE__) . '/vfprintf_variation8.txt'; +$data_file = __DIR__ . '/vfprintf_variation8.txt'; if (!($fp = fopen($data_file, 'wt'))) return; diff --git a/ext/standard/tests/strings/vfprintf_variation9.phpt b/ext/standard/tests/strings/vfprintf_variation9.phpt Binary files differindex 677840a584..30509d9119 100644 --- a/ext/standard/tests/strings/vfprintf_variation9.phpt +++ b/ext/standard/tests/strings/vfprintf_variation9.phpt diff --git a/ext/standard/tests/strings/wordwrap.phpt b/ext/standard/tests/strings/wordwrap.phpt index 50531b5e93..543c41fdd9 100644 --- a/ext/standard/tests/strings/wordwrap.phpt +++ b/ext/standard/tests/strings/wordwrap.phpt @@ -31,6 +31,6 @@ FALSE === @wordwrap(chr(0), 0, "") TESTS; -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); +include(__DIR__ . '/../../../../tests/quicktester.inc'); --EXPECT-- OK diff --git a/ext/standard/tests/url/get_headers_error_003.phpt b/ext/standard/tests/url/get_headers_error_003.phpt index 8a50e3bc8a..a8edc2cb21 100644 --- a/ext/standard/tests/url/get_headers_error_003.phpt +++ b/ext/standard/tests/url/get_headers_error_003.phpt @@ -5,7 +5,7 @@ server --FILE-- <?php -include dirname(__FILE__)."/../../../../sapi/cli/tests/php_cli_server.inc"; +include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc"; php_cli_server_start('header("X-Request-Method: ".$_SERVER["REQUEST_METHOD"]);'); $opts = array( diff --git a/ext/standard/tests/url/parse_url_basic_001.phpt b/ext/standard/tests/url/parse_url_basic_001.phpt index 7340d24323..d59f080fbf 100644 --- a/ext/standard/tests/url/parse_url_basic_001.phpt +++ b/ext/standard/tests/url/parse_url_basic_001.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying the component /* * Parse a load of URLs without specifying the component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "\n--> $url: "; diff --git a/ext/standard/tests/url/parse_url_basic_002.phpt b/ext/standard/tests/url/parse_url_basic_002.phpt index 5f8b6bf145..c8b94dec1c 100644 --- a/ext/standard/tests/url/parse_url_basic_002.phpt +++ b/ext/standard/tests/url/parse_url_basic_002.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_SCHEM /* * Parse a load of URLs without specifying PHP_URL_SCHEME as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_003.phpt b/ext/standard/tests/url/parse_url_basic_003.phpt index bced2757de..f917b77b97 100644 --- a/ext/standard/tests/url/parse_url_basic_003.phpt +++ b/ext/standard/tests/url/parse_url_basic_003.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_HOST /* * Parse a load of URLs without specifying PHP_URL_HOST as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_004.phpt b/ext/standard/tests/url/parse_url_basic_004.phpt index f705d408d3..29d4655243 100644 --- a/ext/standard/tests/url/parse_url_basic_004.phpt +++ b/ext/standard/tests/url/parse_url_basic_004.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PORT /* * Parse a load of URLs without specifying PHP_URL_PORT as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_005.phpt b/ext/standard/tests/url/parse_url_basic_005.phpt index dafb784860..716d8d1dfa 100644 --- a/ext/standard/tests/url/parse_url_basic_005.phpt +++ b/ext/standard/tests/url/parse_url_basic_005.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_USER /* * Parse a load of URLs without specifying PHP_URL_USER as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_006.phpt b/ext/standard/tests/url/parse_url_basic_006.phpt index d881c9527e..3ae94ca626 100644 --- a/ext/standard/tests/url/parse_url_basic_006.phpt +++ b/ext/standard/tests/url/parse_url_basic_006.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PASS /* * Parse a load of URLs without specifying PHP_URL_PASS as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_007.phpt b/ext/standard/tests/url/parse_url_basic_007.phpt index fc5593ea3b..8cad27e958 100644 --- a/ext/standard/tests/url/parse_url_basic_007.phpt +++ b/ext/standard/tests/url/parse_url_basic_007.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_PATH /* * Parse a load of URLs without specifying PHP_URL_PATH as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_008.phpt b/ext/standard/tests/url/parse_url_basic_008.phpt index 753432107b..761eb61179 100644 --- a/ext/standard/tests/url/parse_url_basic_008.phpt +++ b/ext/standard/tests/url/parse_url_basic_008.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_QUERY /* * Parse a load of URLs without specifying PHP_URL_QUERY as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_basic_009.phpt b/ext/standard/tests/url/parse_url_basic_009.phpt index b5d32b2053..f08787761d 100644 --- a/ext/standard/tests/url/parse_url_basic_009.phpt +++ b/ext/standard/tests/url/parse_url_basic_009.phpt @@ -11,7 +11,7 @@ Test parse_url() function: Parse a load of URLs without specifying PHP_URL_FRAGM /* * Parse a load of URLs without specifying PHP_URL_FRAGMENT as the URL component */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "--> $url : "; diff --git a/ext/standard/tests/url/parse_url_unterminated.phpt b/ext/standard/tests/url/parse_url_unterminated.phpt index c83e458085..94975ee889 100644 --- a/ext/standard/tests/url/parse_url_unterminated.phpt +++ b/ext/standard/tests/url/parse_url_unterminated.phpt @@ -11,7 +11,7 @@ if (!function_exists('zend_create_unterminated_string')) die('skip ext/test requ * This is the same as the basic001 test, but with unterminated strings. */ -include_once(dirname(__FILE__) . '/urls.inc'); +include_once(__DIR__ . '/urls.inc'); foreach ($urls as $url) { echo "\n--> $url: "; diff --git a/ext/sysvmsg/tests/001.phpt b/ext/sysvmsg/tests/001.phpt index 5096033bb1..1e53f38f20 100644 --- a/ext/sysvmsg/tests/001.phpt +++ b/ext/sysvmsg/tests/001.phpt @@ -5,7 +5,7 @@ send/receive serialized message. if (!extension_loaded("sysvmsg")) print "skip"; ?> --FILE-- <?php -$key = ftok(dirname(__FILE__) . "/001.phpt", "p"); +$key = ftok(__DIR__ . "/001.phpt", "p"); $q = msg_get_queue($key); msg_send($q, 1, "hello") or print "FAIL\n"; $type = null; diff --git a/ext/sysvshm/tests/003.phpt b/ext/sysvshm/tests/003.phpt index 010ac83cd3..e141353dec 100644 --- a/ext/sysvshm/tests/003.phpt +++ b/ext/sysvshm/tests/003.phpt @@ -8,7 +8,7 @@ if (!function_exists('ftok')){ print 'skip'; } --FILE-- <?php -$key = ftok(dirname(__FILE__)."/003.phpt", 'q'); +$key = ftok(__DIR__."/003.phpt", 'q'); var_dump(shm_detach()); var_dump(shm_detach(1,1)); @@ -28,7 +28,7 @@ echo "Done\n"; --CLEAN-- <?php -$key = ftok(dirname(__FILE__)."/003.phpt", 'q'); +$key = ftok(__DIR__."/003.phpt", 'q'); $s = shm_attach($key); shm_remove($s); diff --git a/ext/tidy/tests/005-mb.phpt b/ext/tidy/tests/005-mb.phpt index d19104ab29..c7b8e20676 100644 --- a/ext/tidy/tests/005-mb.phpt +++ b/ext/tidy/tests/005-mb.phpt @@ -4,7 +4,7 @@ tidy_parse_file() <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php - $a = tidy_parse_file(dirname(__FILE__)."/005私はガラスを食べられます.html"); + $a = tidy_parse_file(__DIR__."/005私はガラスを食べられます.html"); echo tidy_get_output($a); ?> diff --git a/ext/tidy/tests/005.phpt b/ext/tidy/tests/005.phpt index ea4aab3125..49b0a2ad4d 100644 --- a/ext/tidy/tests/005.phpt +++ b/ext/tidy/tests/005.phpt @@ -4,7 +4,7 @@ tidy_parse_file() <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php - $a = tidy_parse_file(dirname(__FILE__)."/005.html"); + $a = tidy_parse_file(__DIR__."/005.html"); echo tidy_get_output($a); ?> diff --git a/ext/tidy/tests/007.phpt b/ext/tidy/tests/007.phpt index f6bb13d556..bae8918625 100644 --- a/ext/tidy/tests/007.phpt +++ b/ext/tidy/tests/007.phpt @@ -6,7 +6,7 @@ Verbose tidy_getopt() tidy.default_config= --FILE-- <?php - $a = new tidy(dirname(__FILE__)."/007.html"); + $a = new tidy(__DIR__."/007.html"); echo "Current Value of 'tidy-mark': "; var_dump($a->getopt("tidy-mark")); echo "Current Value of 'error-file': "; diff --git a/ext/tidy/tests/013.phpt b/ext/tidy/tests/013.phpt index 8f1ac94ef4..a43a88d585 100644 --- a/ext/tidy/tests/013.phpt +++ b/ext/tidy/tests/013.phpt @@ -4,7 +4,7 @@ Parsing a file using constructor <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php - $tidy = new tidy(dirname(__FILE__)."/013.html", array("show-body-only"=>true)); + $tidy = new tidy(__DIR__."/013.html", array("show-body-only"=>true)); $tidy->cleanRepair(); echo $tidy; diff --git a/ext/tidy/tests/015.phpt b/ext/tidy/tests/015.phpt index 5b8255c52b..c5bc1dc4d3 100644 --- a/ext/tidy/tests/015.phpt +++ b/ext/tidy/tests/015.phpt @@ -4,7 +4,7 @@ Passing configuration options through tidy_parse_file(). <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php - $tidy = tidy_parse_file(dirname(__FILE__)."/015.html", array('show-body-only'=>true)); + $tidy = tidy_parse_file(__DIR__."/015.html", array('show-body-only'=>true)); tidy_clean_repair($tidy); echo tidy_get_output($tidy); diff --git a/ext/tidy/tests/016.phpt b/ext/tidy/tests/016.phpt index 05b7cc18f9..9b9718ec25 100644 --- a/ext/tidy/tests/016.phpt +++ b/ext/tidy/tests/016.phpt @@ -4,8 +4,8 @@ Passing configuration file through tidy_parse_file() (may fail with buggy libtid <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php - $tidy = tidy_parse_file(dirname(__FILE__)."/016.html", - dirname(__FILE__)."/016.tcfg"); + $tidy = tidy_parse_file(__DIR__."/016.html", + __DIR__."/016.tcfg"); $cfg = $tidy->getConfig(); echo $cfg["clean"]; ?> diff --git a/ext/wddx/tests/001-64bit.phpt b/ext/wddx/tests/001-64bit.phpt index 7869c48e1d..c0cd49c835 100644 --- a/ext/wddx/tests/001-64bit.phpt +++ b/ext/wddx/tests/001-64bit.phpt @@ -7,7 +7,7 @@ wddx deserialization test (64-bit) precision=14 --FILE-- <?php - $path = dirname(__FILE__); + $path = __DIR__; var_dump(wddx_deserialize(file_get_contents("{$path}/wddx.xml"))); ?> --EXPECTF-- diff --git a/ext/wddx/tests/001.phpt b/ext/wddx/tests/001.phpt index ebe3af60af..a38d7d12cb 100644 --- a/ext/wddx/tests/001.phpt +++ b/ext/wddx/tests/001.phpt @@ -7,7 +7,7 @@ wddx deserialization test (32-bit) precision=14 --FILE-- <?php - $path = dirname(__FILE__); + $path = __DIR__; var_dump(wddx_deserialize(file_get_contents("{$path}/wddx.xml"))); ?> --EXPECTF-- diff --git a/ext/wddx/tests/003.phpt b/ext/wddx/tests/003.phpt index 999d63724a..b9155b1ae1 100644 --- a/ext/wddx/tests/003.phpt +++ b/ext/wddx/tests/003.phpt @@ -6,7 +6,7 @@ wddx deserialize from ressource precision=14 --FILE-- <?php - $path = dirname(__FILE__); + $path = __DIR__; $fp = fopen("php://temp", 'w+'); fputs($fp, "<wddxPacket version='1.0'><header><comment>TEST comment</comment></header><data><struct><var name='var1'><null/></var><var name='var2'><string>some string</string></var><var name='var3'><number>756</number></var><var name='var4'><boolean value='true'/></var></struct></data></wddxPacket>"); rewind($fp); diff --git a/ext/wddx/tests/bug75055.phpt b/ext/wddx/tests/bug75055.phpt index affad3d421..cd84c9b8fa 100644 --- a/ext/wddx/tests/bug75055.phpt +++ b/ext/wddx/tests/bug75055.phpt @@ -5,7 +5,7 @@ Bug #75055 Out-Of-Bounds Read in timelib_meridian() --FILE-- <?php -$file_str = dirname(__FILE__) . "/bug75055.wddx"; +$file_str = __DIR__ . "/bug75055.wddx"; $wddx_str = file_get_contents($file_str); print strlen($wddx_str) . " bytes read.\n"; diff --git a/ext/xml/tests/xml001.phpt b/ext/xml/tests/xml001.phpt index 6d22e5526f..e859a4bbcb 100644 --- a/ext/xml/tests/xml001.phpt +++ b/ext/xml/tests/xml001.phpt @@ -7,7 +7,7 @@ XML_SAX_IMPL == 'libxml' && die('skip this test is not intended for libxml SAX p ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $xml_parser = xml_parser_create(); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1); diff --git a/ext/xml/tests/xml002.phpt b/ext/xml/tests/xml002.phpt index f56319932e..e183fa4ae3 100644 --- a/ext/xml/tests/xml002.phpt +++ b/ext/xml/tests/xml002.phpt @@ -7,7 +7,7 @@ XML_SAX_IMPL == 'libxml' && die('skip this test is not intended for libxml SAX p ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); class myclass { diff --git a/ext/xml/tests/xml003.phpt b/ext/xml/tests/xml003.phpt index dd5d8d1e44..fb4cbbd29e 100644 --- a/ext/xml/tests/xml003.phpt +++ b/ext/xml/tests/xml003.phpt @@ -7,7 +7,7 @@ XML_SAX_IMPL == 'libxml' && die('skip this test is not intended for libxml SAX p ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); class myclass { diff --git a/ext/xml/tests/xml004.phpt b/ext/xml/tests/xml004.phpt index a9e68e103f..1e545db2a1 100644 --- a/ext/xml/tests/xml004.phpt +++ b/ext/xml/tests/xml004.phpt @@ -4,7 +4,7 @@ XML parser case folding test <?php include("skipif.inc"); ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $xp = xml_parser_create(); xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false); diff --git a/ext/xml/tests/xml_closures_001.phpt b/ext/xml/tests/xml_closures_001.phpt index defffbb2ae..da9d849da5 100644 --- a/ext/xml/tests/xml_closures_001.phpt +++ b/ext/xml/tests/xml_closures_001.phpt @@ -4,7 +4,7 @@ XML parser test using closures as callbacks <?php include("skipif.inc"); ?> --FILE-- <?php -chdir(dirname(__FILE__)); +chdir(__DIR__); $start_element = function ($xp, $elem, $attribs) { diff --git a/ext/xmlreader/tests/002.phpt b/ext/xmlreader/tests/002.phpt index 6101d6cc48..b2d50731ee 100644 --- a/ext/xmlreader/tests/002.phpt +++ b/ext/xmlreader/tests/002.phpt @@ -4,7 +4,7 @@ XMLReader: libxml2 XML Reader, file data <?php if (!extension_loaded("xmlreader")) print "skip"; ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/_002.xml'; +$filename = __DIR__ . '/_002.xml'; $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books></books>'; file_put_contents($filename, $xmlstring); diff --git a/ext/xmlreader/tests/003-get-errors.phpt b/ext/xmlreader/tests/003-get-errors.phpt index 61addaca15..614b3501e6 100644 --- a/ext/xmlreader/tests/003-get-errors.phpt +++ b/ext/xmlreader/tests/003-get-errors.phpt @@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 // Set up test data in a new file $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books><book num="1" idx="2">book1</book></books>'; -$filename = dirname(__FILE__) . '/_014.xml'; +$filename = __DIR__ . '/_014.xml'; file_put_contents($filename, $xmlstring); // Load test data into a new XML Reader diff --git a/ext/xmlreader/tests/003-mb.phpt b/ext/xmlreader/tests/003-mb.phpt index 905f8fd03e..6d3282e6a5 100644 --- a/ext/xmlreader/tests/003-mb.phpt +++ b/ext/xmlreader/tests/003-mb.phpt @@ -4,7 +4,7 @@ XMLReader: libxml2 XML Reader, attributes test <?php if (!extension_loaded("xmlreader")) print "skip"; ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/私はガラスを食べられます_003.xml'; +$filename = __DIR__ . '/私はガラスを食べられます_003.xml'; $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books><book num="1" idx="2">book1</book></books>'; diff --git a/ext/xmlreader/tests/003-move-errors.phpt b/ext/xmlreader/tests/003-move-errors.phpt index 641324b54e..fdaf3b747a 100644 --- a/ext/xmlreader/tests/003-move-errors.phpt +++ b/ext/xmlreader/tests/003-move-errors.phpt @@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 // Set up test data in a new file $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books><book num="1" idx="2">book1</book></books>'; -$filename = dirname(__FILE__) . '/_014.xml'; +$filename = __DIR__ . '/_014.xml'; file_put_contents($filename, $xmlstring); // Load test data into a new XML Reader diff --git a/ext/xmlreader/tests/003.phpt b/ext/xmlreader/tests/003.phpt index ac9e73136e..ae255220b3 100644 --- a/ext/xmlreader/tests/003.phpt +++ b/ext/xmlreader/tests/003.phpt @@ -4,7 +4,7 @@ XMLReader: libxml2 XML Reader, attributes test <?php if (!extension_loaded("xmlreader")) print "skip"; ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/_003.xml'; +$filename = __DIR__ . '/_003.xml'; $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books><book num="1" idx="2">book1</book></books>'; diff --git a/ext/xmlreader/tests/004.phpt b/ext/xmlreader/tests/004.phpt index 9298945847..915a14bccf 100644 --- a/ext/xmlreader/tests/004.phpt +++ b/ext/xmlreader/tests/004.phpt @@ -4,7 +4,7 @@ XMLReader: libxml2 XML Reader, attributes test <?php if (!extension_loaded("xmlreader")) print "skip"; ?> --FILE-- <?php -$filename = dirname(__FILE__) . '/_004.xml'; +$filename = __DIR__ . '/_004.xml'; $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books><book num="1" idx="2">book1</book></books>'; diff --git a/ext/xmlreader/tests/007.phpt b/ext/xmlreader/tests/007.phpt index acbb574721..88e8800054 100644 --- a/ext/xmlreader/tests/007.phpt +++ b/ext/xmlreader/tests/007.phpt @@ -6,8 +6,8 @@ XMLReader: libxml2 XML Reader, setRelaxNGSchema <?php $xmlstring = '<TEI.2>hello</TEI.2>'; -$relaxngfile = dirname(__FILE__) . '/relaxNG.rng'; -$file = dirname(__FILE__) . '/_007.xml'; +$relaxngfile = __DIR__ . '/relaxNG.rng'; +$file = __DIR__ . '/_007.xml'; file_put_contents($file, $xmlstring); $reader = new XMLReader(); diff --git a/ext/xmlreader/tests/008.phpt b/ext/xmlreader/tests/008.phpt index fd3da46184..ceb0972376 100644 --- a/ext/xmlreader/tests/008.phpt +++ b/ext/xmlreader/tests/008.phpt @@ -21,8 +21,8 @@ $xmlstring = '<?xml version="1.0" encoding="UTF-8" standalone="no"?> </MOVIE> </LIST>'; -$dtdfile = rawurlencode(dirname(__FILE__)) . '/dtdexample.dtd'; -$file = dirname(__FILE__) . '/_008.xml'; +$dtdfile = rawurlencode(__DIR__) . '/dtdexample.dtd'; +$file = __DIR__ . '/_008.xml'; file_put_contents($file, $xmlstring); diff --git a/ext/xmlreader/tests/012.phpt b/ext/xmlreader/tests/012.phpt index 50b761c235..ba4455ade7 100644 --- a/ext/xmlreader/tests/012.phpt +++ b/ext/xmlreader/tests/012.phpt @@ -23,7 +23,7 @@ $xmlstring =<<<EOF <foo bar=""/> EOF; -$xmlstring = str_replace('012.dtd', dirname(__FILE__).'/012.dtd', $xmlstring); +$xmlstring = str_replace('012.dtd', __DIR__.'/012.dtd', $xmlstring); if (DIRECTORY_SEPARATOR == '\\') { $xmlstring = str_replace('\\',"/", $xmlstring); } @@ -37,7 +37,7 @@ $reader->close(); echo "\nUsing URI:\n"; $reader = new XMLReader(); -$file = dirname(__FILE__) . '/012.xml'; +$file = __DIR__ . '/012.xml'; if (DIRECTORY_SEPARATOR == '\\') { $file = str_replace('\\',"/", $file); } @@ -51,7 +51,7 @@ var_dump($reader->getAttribute('baz')); $reader->close(); $reader = new XMLReader(); -$reader->open(dirname(__FILE__) . '/012.xml'); +$reader->open(__DIR__ . '/012.xml'); $reader->setParserProperty(XMLReader::DEFAULTATTRS, true); while($reader->read() && $reader->nodeType != XMLReader::ELEMENT); var_dump($reader->getAttribute('bar')); diff --git a/ext/xmlreader/tests/013.phpt b/ext/xmlreader/tests/013.phpt index 09bef8df0c..bceccced6b 100644 --- a/ext/xmlreader/tests/013.phpt +++ b/ext/xmlreader/tests/013.phpt @@ -16,7 +16,7 @@ EOF; $reader = new XMLReader(); $reader->XML($xml); -$reader->setSchema(dirname(__FILE__) . '/013.xsd'); +$reader->setSchema(__DIR__ . '/013.xsd'); while($reader->read()) { if ($reader->nodeType == XMLReader::ELEMENT && $reader->name == 'item') { $reader->read(); @@ -36,7 +36,7 @@ EOF; $reader = new XMLReader(); $reader->XML($xml); -$reader->setSchema(dirname(__FILE__) . '/013.xsd'); +$reader->setSchema(__DIR__ . '/013.xsd'); while($reader->read() && $reader->nodeType != XMLReader::ELEMENT); $reader->close(); diff --git a/ext/xmlreader/tests/014.phpt b/ext/xmlreader/tests/014.phpt index cdc041a38e..5969da62f2 100644 --- a/ext/xmlreader/tests/014.phpt +++ b/ext/xmlreader/tests/014.phpt @@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 // Set up test data in a new file $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books><book num="1" idx="2">book1</book></books>'; -$filename = dirname(__FILE__) . '/_014.xml'; +$filename = __DIR__ . '/_014.xml'; file_put_contents($filename, $xmlstring); // Load test data into a new XML Reader diff --git a/ext/xmlreader/tests/015-get-errors.phpt b/ext/xmlreader/tests/015-get-errors.phpt index 0eeed280da..7db7585eef 100644 --- a/ext/xmlreader/tests/015-get-errors.phpt +++ b/ext/xmlreader/tests/015-get-errors.phpt @@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 // Set up test data in a new file $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books xmlns:ns1="http://www.ns1.namespace.org/" xmlns:ns2="http://www.ns2.namespace.org/"><book ns1:num="1" ns2:idx="2" ns1:idx="3" ns2:isbn="4">book1</book></books>'; -$filename = dirname(__FILE__) . '/_014.xml'; +$filename = __DIR__ . '/_014.xml'; file_put_contents($filename, $xmlstring); // Load test data into a new XML Reader diff --git a/ext/xmlreader/tests/015-move-errors.phpt b/ext/xmlreader/tests/015-move-errors.phpt index b54a243070..c5d3b543c1 100644 --- a/ext/xmlreader/tests/015-move-errors.phpt +++ b/ext/xmlreader/tests/015-move-errors.phpt @@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 // Set up test data in a new file $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books xmlns:ns1="http://www.ns1.namespace.org/" xmlns:ns2="http://www.ns2.namespace.org/"><book ns1:num="1" ns2:idx="2" ns1:idx="3" ns2:isbn="4">book1</book></books>'; -$filename = dirname(__FILE__) . '/_014.xml'; +$filename = __DIR__ . '/_014.xml'; file_put_contents($filename, $xmlstring); // Load test data into a new XML Reader diff --git a/ext/xmlreader/tests/015.phpt b/ext/xmlreader/tests/015.phpt index 4945927740..8a67f3c81e 100644 --- a/ext/xmlreader/tests/015.phpt +++ b/ext/xmlreader/tests/015.phpt @@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2 // Set up test data in a new file $xmlstring = '<?xml version="1.0" encoding="UTF-8"?> <books xmlns:ns1="http://www.ns1.namespace.org/" xmlns:ns2="http://www.ns2.namespace.org/"><book ns1:num="1" ns2:idx="2" ns1:idx="3" ns2:isbn="4">book1</book></books>'; -$filename = dirname(__FILE__) . '/_014.xml'; +$filename = __DIR__ . '/_014.xml'; file_put_contents($filename, $xmlstring); // Load test data into a new XML Reader diff --git a/ext/xmlreader/tests/bug71805.phpt b/ext/xmlreader/tests/bug71805.phpt index 3d1713ace5..6f54b1347a 100644 --- a/ext/xmlreader/tests/bug71805.phpt +++ b/ext/xmlreader/tests/bug71805.phpt @@ -5,8 +5,8 @@ XMLReader: Bug #71805 XML files can generate UTF-8 error even if they are UTF-8 --FILE-- <?php -TestXML(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'XMLReaderGood_bug71805.xml'); -TestXML(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'XMLReaderBad_bug71805.xml'); +TestXML(__DIR__ . DIRECTORY_SEPARATOR . 'XMLReaderGood_bug71805.xml'); +TestXML(__DIR__ . DIRECTORY_SEPARATOR . 'XMLReaderBad_bug71805.xml'); function TestXML($file) { $XR = new XMLReader; diff --git a/ext/xmlwriter/tests/010.phpt b/ext/xmlwriter/tests/010.phpt index a32a9696a6..2ae160fad8 100644 --- a/ext/xmlwriter/tests/010.phpt +++ b/ext/xmlwriter/tests/010.phpt @@ -7,7 +7,7 @@ if (!extension_loaded("xmlwriter")) die("skip"); --FILE-- <?php -$file = dirname(__FILE__).'/010.tmp'; +$file = __DIR__.'/010.tmp'; $xw = xmlwriter_open_uri($file); diff --git a/ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt b/ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt index 9db8b55346..d887008256 100644 --- a/ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt +++ b/ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt @@ -4,7 +4,7 @@ xmlwriter_set_indent_string passing xmlwriter resource <?php if (!extension_loaded("xmlwriter")) print "skip"; ?> --FILE-- <?php -$temp_filename = dirname(__FILE__)."/xmlwriter_set_indent_string.tmp"; +$temp_filename = __DIR__."/xmlwriter_set_indent_string.tmp"; $fp = fopen($temp_filename, "w"); fwrite ($fp, "Hi"); fclose($fp); @@ -13,7 +13,7 @@ var_dump(xmlwriter_set_indent_string($resource, ' ')); ?> --CLEAN-- <?php -$temp_filename = dirname(__FILE__)."/xmlwriter_set_indent_string.tmp"; +$temp_filename = __DIR__."/xmlwriter_set_indent_string.tmp"; unlink($temp_filename); ?> --CREDITS-- diff --git a/ext/xsl/tests/bug26384.phpt b/ext/xsl/tests/bug26384.phpt index b6d2940ae6..54ff5e767d 100644 --- a/ext/xsl/tests/bug26384.phpt +++ b/ext/xsl/tests/bug26384.phpt @@ -1,17 +1,17 @@ --TEST-- Bug #26384 (domxslt->process causes segfault with xsl:key) --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php $dom = new domDocument; -$dom->load(dirname(__FILE__)."/area_name.xml"); +$dom->load(__DIR__."/area_name.xml"); if(!$dom) { echo "Error while parsing the document\n"; exit; } $xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/area_list.xsl"); +$xsl->load(__DIR__."/area_list.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; diff --git a/ext/xsl/tests/bug53965.phpt b/ext/xsl/tests/bug53965.phpt index 40ce0a62f1..7feee0e053 100644 --- a/ext/xsl/tests/bug53965.phpt +++ b/ext/xsl/tests/bug53965.phpt @@ -7,7 +7,7 @@ if (!extension_loaded('xsl')) die("skip Extension XSL is required\n"); --FILE-- <?php -$base = 'file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . '53965'; +$base = 'file://' . __DIR__ . DIRECTORY_SEPARATOR . '53965'; $xml = new DOMDocument(); $xml->load($base . DIRECTORY_SEPARATOR . 'collection.xml'); diff --git a/ext/xsl/tests/bug54446.phpt b/ext/xsl/tests/bug54446.phpt index 2335319009..b9af5581eb 100644 --- a/ext/xsl/tests/bug54446.phpt +++ b/ext/xsl/tests/bug54446.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('xsl')) die("skip Extension XSL is required\n"); <?php include("prepare.inc"); -$outputfile = dirname(__FILE__)."/bug54446test.txt"; +$outputfile = __DIR__."/bug54446test.txt"; if (file_exists($outputfile)) { unlink($outputfile); } diff --git a/ext/xsl/tests/bug54446_with_ini.phpt b/ext/xsl/tests/bug54446_with_ini.phpt index 92a71cad09..9769d1fd29 100644 --- a/ext/xsl/tests/bug54446_with_ini.phpt +++ b/ext/xsl/tests/bug54446_with_ini.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('xsl')) die("skip Extension XSL is required\n"); <?php include("prepare.inc"); -$outputfile = dirname(__FILE__)."/bug54446test.txt"; +$outputfile = __DIR__."/bug54446test.txt"; if (file_exists($outputfile)) { unlink($outputfile); } diff --git a/ext/xsl/tests/xslt001.phpt b/ext/xsl/tests/xslt001.phpt index 70d4446928..f7bdc42424 100644 --- a/ext/xsl/tests/xslt001.phpt +++ b/ext/xsl/tests/xslt001.phpt @@ -1,7 +1,7 @@ --TEST-- Test 1: Transform To XML String --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 1: Transform To XML String"; diff --git a/ext/xsl/tests/xslt002.phpt b/ext/xsl/tests/xslt002.phpt index deb86aa215..60a8ec0e16 100644 --- a/ext/xsl/tests/xslt002.phpt +++ b/ext/xsl/tests/xslt002.phpt @@ -1,7 +1,7 @@ --TEST-- Test 2: Transform To HTML String --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 2: Transform To HTML String"; diff --git a/ext/xsl/tests/xslt003.phpt b/ext/xsl/tests/xslt003.phpt index 992e5c7cf0..d1ad8a6496 100644 --- a/ext/xsl/tests/xslt003.phpt +++ b/ext/xsl/tests/xslt003.phpt @@ -1,7 +1,7 @@ --TEST-- Test 3: Using Parameters --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 3: Using Parameters"; diff --git a/ext/xsl/tests/xslt004.phpt b/ext/xsl/tests/xslt004.phpt index e2076032a9..656c99086d 100644 --- a/ext/xsl/tests/xslt004.phpt +++ b/ext/xsl/tests/xslt004.phpt @@ -1,7 +1,7 @@ --TEST-- Test 4: Checking UTF8 Output --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 4: Checking UTF8 Output"; diff --git a/ext/xsl/tests/xslt005.phpt b/ext/xsl/tests/xslt005.phpt index 49027e1b16..28da4db734 100644 --- a/ext/xsl/tests/xslt005.phpt +++ b/ext/xsl/tests/xslt005.phpt @@ -1,7 +1,7 @@ --TEST-- Test 5: Checking Indent --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 5: Checking Indent"; diff --git a/ext/xsl/tests/xslt006.phpt b/ext/xsl/tests/xslt006.phpt index 60ca1812e3..0ad976ee69 100644 --- a/ext/xsl/tests/xslt006.phpt +++ b/ext/xsl/tests/xslt006.phpt @@ -1,7 +1,7 @@ --TEST-- Test 6: Transform To Doc --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 6: Transform To Doc"; diff --git a/ext/xsl/tests/xslt007.phpt b/ext/xsl/tests/xslt007.phpt index bb4d0ba657..241cc1cc0b 100644 --- a/ext/xsl/tests/xslt007.phpt +++ b/ext/xsl/tests/xslt007.phpt @@ -1,16 +1,16 @@ --TEST-- Test 7: Transform To Uri --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 7: Transform To Uri"; include("prepare.inc"); $proc->importStylesheet($xsl); print "\n"; -$doc = $proc->transformToUri($dom, "file://".dirname(__FILE__)."/out.xml"); -print file_get_contents(dirname(__FILE__)."/out.xml"); -unlink(dirname(__FILE__)."/out.xml"); +$doc = $proc->transformToUri($dom, "file://".__DIR__."/out.xml"); +print file_get_contents(__DIR__."/out.xml"); +unlink(__DIR__."/out.xml"); print "\n"; --EXPECT-- Test 7: Transform To Uri diff --git a/ext/xsl/tests/xslt008-mb.phpt b/ext/xsl/tests/xslt008-mb.phpt index 52940cecd3..a10b13a580 100644 --- a/ext/xsl/tests/xslt008-mb.phpt +++ b/ext/xsl/tests/xslt008-mb.phpt @@ -2,7 +2,7 @@ Test 8: Stream Wrapper Includes --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; if (!extension_loaded('zlib')) die('skip zlib extension not available'); ?> --FILE-- @@ -10,12 +10,12 @@ Test 8: Stream Wrapper Includes echo "Test 8: Stream Wrapper Includes "; include("prepare.inc"); $xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/私はガラスを食べられますstreamsinclude.xsl"); +$xsl->load(__DIR__."/私はガラスを食べられますstreamsinclude.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; } -chdir(dirname(__FILE__)); +chdir(__DIR__); $proc->importStylesheet($xsl); print "\n"; print $proc->transformToXML($dom); diff --git a/ext/xsl/tests/xslt008.phpt b/ext/xsl/tests/xslt008.phpt index 4c72bf81c3..4446045198 100644 --- a/ext/xsl/tests/xslt008.phpt +++ b/ext/xsl/tests/xslt008.phpt @@ -2,7 +2,7 @@ Test 8: Stream Wrapper Includes --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; if (!extension_loaded('zlib')) die('skip zlib extension not available'); ?> --FILE-- @@ -10,12 +10,12 @@ Test 8: Stream Wrapper Includes echo "Test 8: Stream Wrapper Includes "; include("prepare.inc"); $xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/streamsinclude.xsl"); +$xsl->load(__DIR__."/streamsinclude.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; } -chdir(dirname(__FILE__)); +chdir(__DIR__); $proc->importStylesheet($xsl); print "\n"; print $proc->transformToXML($dom); diff --git a/ext/xsl/tests/xslt009.phpt b/ext/xsl/tests/xslt009.phpt index b4e8390985..429e11f10d 100644 --- a/ext/xsl/tests/xslt009.phpt +++ b/ext/xsl/tests/xslt009.phpt @@ -2,7 +2,7 @@ Test 9: Stream Wrapper XPath-Document() --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once __DIR__ .'/skipif.inc'; if (!extension_loaded('zlib')) die('skip zlib extension not available'); ?> --FILE-- @@ -11,7 +11,7 @@ echo "Test 9: Stream Wrapper XPath-Document()"; include("prepare.inc"); $xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/documentxpath.xsl"); +$xsl->load(__DIR__."/documentxpath.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; diff --git a/ext/xsl/tests/xslt010.phpt b/ext/xsl/tests/xslt010.phpt index aeedabc513..dc1eac3ccb 100644 --- a/ext/xsl/tests/xslt010.phpt +++ b/ext/xsl/tests/xslt010.phpt @@ -2,7 +2,7 @@ Test 10: EXSLT Support --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; $proc = new xsltprocessor; if (!$proc->hasExsltSupport()) die('skip EXSLT support not available'); if (LIBXSLT_VERSION < 10117) die('skip too old libxsl'); @@ -13,12 +13,12 @@ if (LIBXSLT_VERSION > 10129) die('skip for libxsl < 10130'); echo "Test 10: EXSLT Support"; $dom = new domDocument(); - $dom->load(dirname(__FILE__)."/exslt.xsl"); + $dom->load(__DIR__."/exslt.xsl"); $proc = new xsltprocessor; $xsl = $proc->importStylesheet($dom); $xml = new DomDocument(); - $xml->load(dirname(__FILE__)."/exslt.xml"); + $xml->load(__DIR__."/exslt.xml"); print $proc->transformToXml($xml); --EXPECT-- diff --git a/ext/xsl/tests/xslt010_gt10129.phpt b/ext/xsl/tests/xslt010_gt10129.phpt index 999ec807a3..d1de1722a1 100644 --- a/ext/xsl/tests/xslt010_gt10129.phpt +++ b/ext/xsl/tests/xslt010_gt10129.phpt @@ -2,7 +2,7 @@ Test 10: EXSLT Support --SKIPIF-- <?php -require_once dirname(__FILE__) .'/skipif.inc'; +require_once __DIR__ .'/skipif.inc'; $proc = new xsltprocessor; if (!$proc->hasExsltSupport()) die('skip EXSLT support not available'); if (LIBXSLT_VERSION < 10130) die('skip too old libxsl'); @@ -12,12 +12,12 @@ if (LIBXSLT_VERSION < 10130) die('skip too old libxsl'); echo "Test 10: EXSLT Support"; $dom = new domDocument(); - $dom->load(dirname(__FILE__)."/exslt.xsl"); + $dom->load(__DIR__."/exslt.xsl"); $proc = new xsltprocessor; $xsl = $proc->importStylesheet($dom); $xml = new DomDocument(); - $xml->load(dirname(__FILE__)."/exslt.xml"); + $xml->load(__DIR__."/exslt.xml"); print $proc->transformToXml($xml); --EXPECT-- diff --git a/ext/xsl/tests/xslt011.phpt b/ext/xsl/tests/xslt011.phpt index 92777b8a56..5eaa7fbd09 100644 --- a/ext/xsl/tests/xslt011.phpt +++ b/ext/xsl/tests/xslt011.phpt @@ -1,7 +1,7 @@ --TEST-- Test 11: php:function Support --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php print "Test 11: php:function Support\n"; @@ -11,12 +11,12 @@ print "Test 11: php:function Support\n"; } $dom = new domDocument(); - $dom->load(dirname(__FILE__)."/xslt011.xsl"); + $dom->load(__DIR__."/xslt011.xsl"); $proc = new xsltprocessor; $xsl = $proc->importStylesheet($dom); $xml = new DomDocument(); - $xml->load(dirname(__FILE__)."/xslt011.xml"); + $xml->load(__DIR__."/xslt011.xml"); $proc->registerPHPFunctions(); print $proc->transformToXml($xml); diff --git a/ext/xsl/tests/xslt012.phpt b/ext/xsl/tests/xslt012.phpt index 6cb3f5ec71..a24a0d2a7f 100644 --- a/ext/xsl/tests/xslt012.phpt +++ b/ext/xsl/tests/xslt012.phpt @@ -1,20 +1,20 @@ --TEST-- Test 12: Using Associative Array of Parameters --SKIPIF-- -<?php require_once dirname(__FILE__) .'/skipif.inc'; ?> +<?php require_once __DIR__ .'/skipif.inc'; ?> --FILE-- <?php echo "Test 12: Using Associative Array of Parameters"; $dom = new domDocument; -$dom->load(dirname(__FILE__)."/xslt.xml"); +$dom->load(__DIR__."/xslt.xml"); if(!$dom) { echo "Error while parsing the document\n"; exit; } $xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/xslt012.xsl"); +$xsl->load(__DIR__."/xslt012.xsl"); if(!$xsl) { echo "Error while parsing the document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_getParameter-invalidparam.phpt b/ext/xsl/tests/xsltprocessor_getParameter-invalidparam.phpt index 41bcf4ad10..78191c2b6e 100644 --- a/ext/xsl/tests/xsltprocessor_getParameter-invalidparam.phpt +++ b/ext/xsl/tests/xsltprocessor_getParameter-invalidparam.phpt @@ -8,7 +8,7 @@ Check xsltprocessor::getParameter with undefined parameter ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; var_dump($proc->getParameter('', 'doesnotexist')); --EXPECT-- bool(false) diff --git a/ext/xsl/tests/xsltprocessor_getParameter.phpt b/ext/xsl/tests/xsltprocessor_getParameter.phpt index b4031db975..6512b7b53e 100644 --- a/ext/xsl/tests/xsltprocessor_getParameter.phpt +++ b/ext/xsl/tests/xsltprocessor_getParameter.phpt @@ -8,7 +8,7 @@ Check xsltprocessor::getparameter functionality ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $proc->importStylesheet($xsl); $proc->setParameter('', 'key', 'value'); var_dump($proc->getParameter('', 'key')); diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt index f61b7abe89..18e7ddca97 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-allfuncs.phpt @@ -8,9 +8,9 @@ Check xsltprocessor::registerPHPFunctions ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt index 9879fb38f7..ab136735ef 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-multiple.phpt @@ -12,9 +12,9 @@ list - it does not replace the previously allowed functions. ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt index cc49371fe6..03b3f744e6 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array-notallowed.phpt @@ -8,9 +8,9 @@ Check xsltprocessor::registerPHPFunctions with array and a not allowed function ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt index 642b58e74a..5cfa497408 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-array.phpt @@ -8,9 +8,9 @@ Check xsltprocessor::registerPHPFunctions with array ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt index f66632d2be..e173842c4e 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt @@ -11,9 +11,9 @@ is expected to fail ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc-nostring.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc-nostring.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt index e4cf0e816a..85fcbe0d02 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt @@ -10,9 +10,9 @@ The XSL script tries to call a php function that is not defined ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc-undef.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc-undef.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt index a142dfa431..3fb495d5a2 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-null.phpt @@ -12,9 +12,9 @@ list - it does not replace the previously allowed functions. ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt index 5eeb793ed5..1ef40abc94 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-multiple.phpt @@ -12,9 +12,9 @@ list - it does not replace the old function. ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt index 1e7092c8bd..cb6a274905 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string-notallowed.phpt @@ -8,9 +8,9 @@ Check xsltprocessor::registerPHPFunctions with string and not allowed function ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt index 2a3474eee3..ac9d4ffb9f 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-string.phpt @@ -8,9 +8,9 @@ Check xsltprocessor::registerPHPFunctions with string ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $phpfuncxsl = new domDocument(); -$phpfuncxsl->load(dirname(__FILE__)."/phpfunc.xsl"); +$phpfuncxsl->load(__DIR__."/phpfunc.xsl"); if(!$phpfuncxsl) { echo "Error while parsing the xsl document\n"; exit; diff --git a/ext/xsl/tests/xsltprocessor_removeParameter-invalidparam.phpt b/ext/xsl/tests/xsltprocessor_removeParameter-invalidparam.phpt index a5a62286c1..9eed0ccedc 100644 --- a/ext/xsl/tests/xsltprocessor_removeParameter-invalidparam.phpt +++ b/ext/xsl/tests/xsltprocessor_removeParameter-invalidparam.phpt @@ -8,7 +8,7 @@ Check xsltprocessor::removeParameter with invalid parameter ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $proc->importStylesheet($xsl); var_dump($proc->removeParameter('', 'doesnotexist')); --EXPECT-- diff --git a/ext/xsl/tests/xsltprocessor_removeParameter.phpt b/ext/xsl/tests/xsltprocessor_removeParameter.phpt index 6568e2bae3..6b9cb99d09 100644 --- a/ext/xsl/tests/xsltprocessor_removeParameter.phpt +++ b/ext/xsl/tests/xsltprocessor_removeParameter.phpt @@ -8,7 +8,7 @@ Check xsltprocessor::removeParameter functionality ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $proc->importStylesheet($xsl); $proc->setParameter('', 'key', 'value'); $proc->removeParameter('', 'key'); diff --git a/ext/xsl/tests/xsltprocessor_setparameter-errorquote.phpt b/ext/xsl/tests/xsltprocessor_setparameter-errorquote.phpt index a3114bb755..efefe0f83b 100644 --- a/ext/xsl/tests/xsltprocessor_setparameter-errorquote.phpt +++ b/ext/xsl/tests/xsltprocessor_setparameter-errorquote.phpt @@ -10,7 +10,7 @@ Memleak: http://bugs.php.net/bug.php?id=48221 ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $proc->importStylesheet($xsl); $proc->setParameter('', '', '"\''); $proc->transformToXml($dom); diff --git a/ext/xsl/tests/xsltprocessor_setparameter-nostring.phpt b/ext/xsl/tests/xsltprocessor_setparameter-nostring.phpt index dd17a72d49..2c723434aa 100644 --- a/ext/xsl/tests/xsltprocessor_setparameter-nostring.phpt +++ b/ext/xsl/tests/xsltprocessor_setparameter-nostring.phpt @@ -10,7 +10,7 @@ Memleak: http://bugs.php.net/bug.php?id=48221 ?> --FILE-- <?php -include dirname(__FILE__) .'/prepare.inc'; +include __DIR__ .'/prepare.inc'; $proc->importStylesheet($xsl); var_dump($proc->setParameter('', array(4, 'abc'))); $proc->transformToXml($dom); diff --git a/ext/zip/tests/bug14962.phpt b/ext/zip/tests/bug14962.phpt index 63a63b6eb9..06a2ce5e6a 100644 --- a/ext/zip/tests/bug14962.phpt +++ b/ext/zip/tests/bug14962.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dir = dirname(__FILE__); +$dir = __DIR__; $file = '__tmp14962.txt'; $fullpath = $dir . '/' . $file; $za = new ZipArchive; diff --git a/ext/zip/tests/bug38944.phpt b/ext/zip/tests/bug38944.phpt index b4ff2b2f19..d016fa6268 100644 --- a/ext/zip/tests/bug38944.phpt +++ b/ext/zip/tests/bug38944.phpt @@ -5,7 +5,7 @@ Bug #38944 (newly created ZipArchive segfaults when accessing comment property) --FILE-- <?php -$arc_name = dirname(__FILE__)."/bug38944.zip"; +$arc_name = __DIR__."/bug38944.zip"; $foo = new ZipArchive; $foo->open($arc_name, ZIPARCHIVE::CREATE); diff --git a/ext/zip/tests/bug40228-mb.phpt b/ext/zip/tests/bug40228-mb.phpt index db9e2e90d5..b7095dda68 100644 --- a/ext/zip/tests/bug40228-mb.phpt +++ b/ext/zip/tests/bug40228-mb.phpt @@ -4,7 +4,7 @@ Bug #40228 (extractTo does not create recursive empty path) <?php if (!extension_loaded("zip")) print "skip"; ?> --FILE-- <?php -$dest = dirname(__FILE__); +$dest = __DIR__; $arc_name = $dest . "/bug40228私はガラスを食べられます.zip"; $zip = new ZipArchive; $zip->open($arc_name, ZIPARCHIVE::CREATE); diff --git a/ext/zip/tests/bug40228.phpt b/ext/zip/tests/bug40228.phpt index 2691b3b22f..ce5f1e6afe 100644 --- a/ext/zip/tests/bug40228.phpt +++ b/ext/zip/tests/bug40228.phpt @@ -4,7 +4,7 @@ Bug #40228 (extractTo does not create recursive empty path) <?php if (!extension_loaded("zip")) print "skip"; ?> --FILE-- <?php -$dest = dirname(__FILE__); +$dest = __DIR__; $arc_name = $dest . "/bug40228.zip"; $zip = new ZipArchive; $zip->open($arc_name, ZIPARCHIVE::CREATE); diff --git a/ext/zip/tests/bug47667.phpt b/ext/zip/tests/bug47667.phpt index e52f7470a8..085fb1b87f 100644 --- a/ext/zip/tests/bug47667.phpt +++ b/ext/zip/tests/bug47667.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$thisdir = dirname(__FILE__); +$thisdir = __DIR__; $filename = $thisdir . "/bug47667.zip"; $zip = new ZipArchive(); diff --git a/ext/zip/tests/bug49072.phpt b/ext/zip/tests/bug49072.phpt index 731f015fc5..b918fba01b 100644 --- a/ext/zip/tests/bug49072.phpt +++ b/ext/zip/tests/bug49072.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$f = dirname(__FILE__) . '/bug49072.zip'; +$f = __DIR__ . '/bug49072.zip'; $o = new ZipArchive(); if (! $o->open($f, ZipArchive::CHECKCONS)) { exit ('error can\'t open'); diff --git a/ext/zip/tests/bug51353.phpt b/ext/zip/tests/bug51353.phpt index 560945f9dd..d84de38f5b 100644 --- a/ext/zip/tests/bug51353.phpt +++ b/ext/zip/tests/bug51353.phpt @@ -10,7 +10,7 @@ die('skip the test might get very long, activate it manually'); adding an explicit skip, remove it to run this test. */ set_time_limit(0); -$base_path = dirname(__FILE__); +$base_path = __DIR__; /* Either we ship a file with 100000 entries which would be >12M big, or create it dynamically. */ @@ -40,7 +40,7 @@ if ($r) { echo "OK"; --CLEAN-- <?php -$base_path = dirname(__FILE__); +$base_path = __DIR__; unlink("$base_path/51353.zip"); diff --git a/ext/zip/tests/bug53579.phpt b/ext/zip/tests/bug53579.phpt index fb7553041d..371dc31e4f 100644 --- a/ext/zip/tests/bug53579.phpt +++ b/ext/zip/tests/bug53579.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . 'test_with_comment.zip'; include $dirname . 'utils.inc'; $zip = new ZipArchive; @@ -24,7 +24,7 @@ $zip->close(); var_dump($contents); -$fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb'); +$fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb'); if (!$fp) { exit("cannot open\n"); } diff --git a/ext/zip/tests/bug53603.phpt b/ext/zip/tests/bug53603.phpt index 56d84ad3de..0a501071e5 100644 --- a/ext/zip/tests/bug53603.phpt +++ b/ext/zip/tests/bug53603.phpt @@ -17,7 +17,7 @@ class TestStream { stream_wrapper_register("teststream", "TestStream"); -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . 'test_with_comment.zip'; $zip = new ZipArchive; if ($zip->open($file) !== TRUE) { diff --git a/ext/zip/tests/bug53885.phpt b/ext/zip/tests/bug53885.phpt index 5db2367c30..6f95a661b3 100644 --- a/ext/zip/tests/bug53885.phpt +++ b/ext/zip/tests/bug53885.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$fname = dirname(__FILE__)."/test53885.zip"; +$fname = __DIR__."/test53885.zip"; if(file_exists($fname)) unlink($fname); touch($fname); $nx=new ZipArchive(); @@ -17,7 +17,7 @@ $nx->statName("a",ZIPARCHIVE::FL_UNCHANGED); ==DONE== --CLEAN-- <?php -$fname = dirname(__FILE__)."/test53885.zip"; +$fname = __DIR__."/test53885.zip"; unlink($fname); ?> --EXPECT-- diff --git a/ext/zip/tests/bug64342_0.phpt b/ext/zip/tests/bug64342_0.phpt index ea7afa8e0a..96e9667dda 100644 --- a/ext/zip/tests/bug64342_0.phpt +++ b/ext/zip/tests/bug64342_0.phpt @@ -8,7 +8,7 @@ Bug #64342 ZipArchive::addFile() has to check file existence (variation 1) <?php $zip = new ZipArchive; -$res = $zip->open(dirname(__FILE__) . '/bug64342.zip', ZipArchive::CREATE); +$res = $zip->open(__DIR__ . '/bug64342.zip', ZipArchive::CREATE); if ($res === TRUE) { $f = md5(uniqid()) . '.txt'; echo "$f\n"; @@ -34,7 +34,7 @@ DONE --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/bug64342.zip'); +@unlink(__DIR__ . '/bug64342.zip'); --EXPECTF-- %s.txt add failed diff --git a/ext/zip/tests/bug64342_1-mb.phpt b/ext/zip/tests/bug64342_1-mb.phpt index a4525f0cc8..611a416253 100644 --- a/ext/zip/tests/bug64342_1-mb.phpt +++ b/ext/zip/tests/bug64342_1-mb.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__私はガラスを食べられますtmp_oo_addfile.zip'; diff --git a/ext/zip/tests/bug64342_1.phpt b/ext/zip/tests/bug64342_1.phpt index d1d0f49931..84cd5db993 100644 --- a/ext/zip/tests/bug64342_1.phpt +++ b/ext/zip/tests/bug64342_1.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_oo_addfile.zip'; diff --git a/ext/zip/tests/bug70350.phpt b/ext/zip/tests/bug70350.phpt index d81de65a32..9308f39187 100644 --- a/ext/zip/tests/bug70350.phpt +++ b/ext/zip/tests/bug70350.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dir = dirname(__FILE__)."/bug70350"; +$dir = __DIR__."/bug70350"; mkdir($dir); $archive = new ZipArchive(); $archive->open("$dir/a.zip",ZipArchive::CREATE); @@ -23,7 +23,7 @@ var_dump(file_exists("../down2/")); ?> --CLEAN-- <?php -$dir = dirname(__FILE__)."/bug70350"; +$dir = __DIR__."/bug70350"; rmdir("$dir/down2"); unlink("$dir/a.zip"); rmdir($dir); diff --git a/ext/zip/tests/bug7214.phpt b/ext/zip/tests/bug7214.phpt index 02455fa421..d36f0f4b42 100644 --- a/ext/zip/tests/bug7214.phpt +++ b/ext/zip/tests/bug7214.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/binarynull.zip"); +$zip = zip_open(__DIR__."/binarynull.zip"); if (!is_resource($zip)) die("Failure"); $entries = 0; $entry = zip_read($zip); diff --git a/ext/zip/tests/bug72258.phpt b/ext/zip/tests/bug72258.phpt index 6ab5c5ee7e..208a810c33 100644 --- a/ext/zip/tests/bug72258.phpt +++ b/ext/zip/tests/bug72258.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug72258.zip"; +$fn = __DIR__ . DIRECTORY_SEPARATOR . "bug72258.zip"; $zip = new \ZipArchive(); $res = $zip->open($fn); diff --git a/ext/zip/tests/bug72660.phpt b/ext/zip/tests/bug72660.phpt index af02b9b5a3..188c7b37e6 100644 --- a/ext/zip/tests/bug72660.phpt +++ b/ext/zip/tests/bug72660.phpt @@ -8,13 +8,13 @@ if(PHP_ZTS == 0) { die('skip ZTS required'); } --FILE-- <?php $zip = new ZipArchive(); -$zip->open(dirname(__FILE__) . "/bug72660.zip", ZIPARCHIVE::CREATE); +$zip->open(__DIR__ . "/bug72660.zip", ZIPARCHIVE::CREATE); $zip->addPattern("/noexists/"); ?> okey --CLEAN-- <?php -@unlink(dirname(__FILE__) . "/bug72660.zip"); +@unlink(__DIR__ . "/bug72660.zip"); ?> --EXPECT-- okey diff --git a/ext/zip/tests/bug7658.phpt b/ext/zip/tests/bug7658.phpt index a09848a679..9253b01c3f 100644 --- a/ext/zip/tests/bug7658.phpt +++ b/ext/zip/tests/bug7658.phpt @@ -23,7 +23,7 @@ $expect = array( "settings.xml", "META-INF/manifest.xml", ); -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_bug7658.odt'; $zip = new ZipArchive(); diff --git a/ext/zip/tests/bug8009.phpt b/ext/zip/tests/bug8009.phpt index 61aaca77bd..4cc85a1b3f 100644 --- a/ext/zip/tests/bug8009.phpt +++ b/ext/zip/tests/bug8009.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$thisdir = dirname(__FILE__); +$thisdir = __DIR__; $src = $thisdir . "/bug8009.zip"; $filename = $thisdir . "/tmp8009.zip"; copy($src, $filename); diff --git a/ext/zip/tests/bug8700.phpt b/ext/zip/tests/bug8700.phpt index 5a25af3a11..67bd265f9a 100644 --- a/ext/zip/tests/bug8700.phpt +++ b/ext/zip/tests/bug8700.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$thisdir = dirname(__FILE__); +$thisdir = __DIR__; $filename = $thisdir . "/bug8009.zip"; $zip = new ZipArchive(); diff --git a/ext/zip/tests/doubleclose.phpt b/ext/zip/tests/doubleclose.phpt index 0eccc40bad..48547e3c72 100644 --- a/ext/zip/tests/doubleclose.phpt +++ b/ext/zip/tests/doubleclose.phpt @@ -8,7 +8,7 @@ if(!extension_loaded('zip')) die('skip'); <?php echo "Procedural\n"; -$zip = zip_open(dirname(__FILE__) . '/test.zip'); +$zip = zip_open(__DIR__ . '/test.zip'); if (!is_resource($zip)) { die("Failure"); } @@ -17,7 +17,7 @@ var_dump(zip_close($zip)); echo "Object\n"; $zip = new ZipArchive(); -if (!$zip->open(dirname(__FILE__) . '/test.zip')) { +if (!$zip->open(__DIR__ . '/test.zip')) { die('Failure'); } if ($zip->status == ZIPARCHIVE::ER_OK) { diff --git a/ext/zip/tests/oo_addemptydir.phpt b/ext/zip/tests/oo_addemptydir.phpt index 271410b938..e63952935d 100644 --- a/ext/zip/tests/oo_addemptydir.phpt +++ b/ext/zip/tests/oo_addemptydir.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_oo_addfile.zip'; diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index b41e3dbf2c..7592f5b2b4 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_oo_addfile.zip'; diff --git a/ext/zip/tests/oo_addpattern.phpt b/ext/zip/tests/oo_addpattern.phpt index 193f828496..a66ecba312 100644 --- a/ext/zip/tests/oo_addpattern.phpt +++ b/ext/zip/tests/oo_addpattern.phpt @@ -38,7 +38,7 @@ if ($zip->status == ZIPARCHIVE::ER_OK) { ?> --CLEAN-- <?php -$dirname = dirname(__FILE__) . '/oo_addpattern_dir/'; +$dirname = __DIR__ . '/oo_addpattern_dir/'; unlink($dirname . 'tmp.zip'); unlink($dirname . 'foo.txt'); unlink($dirname . 'bar.txt'); diff --git a/ext/zip/tests/oo_close.phpt b/ext/zip/tests/oo_close.phpt index 46ecfaf43a..60a7f364d1 100644 --- a/ext/zip/tests/oo_close.phpt +++ b/ext/zip/tests/oo_close.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $zip = new ZipArchive; if (!$zip->open($dirname . 'test.zip')) { exit('failed'); diff --git a/ext/zip/tests/oo_count.phpt b/ext/zip/tests/oo_count.phpt index a553e17156..a5771fa298 100644 --- a/ext/zip/tests/oo_count.phpt +++ b/ext/zip/tests/oo_count.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . 'test.zip'; $zip = new ZipArchive; diff --git a/ext/zip/tests/oo_delete.phpt b/ext/zip/tests/oo_delete.phpt index 20e1f38fda..cdf3ded336 100644 --- a/ext/zip/tests/oo_delete.phpt +++ b/ext/zip/tests/oo_delete.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . '__tmp_oo_delete.zip'; if (file_exists($file)) { unlink($file); diff --git a/ext/zip/tests/oo_extract.phpt b/ext/zip/tests/oo_extract.phpt index ef3e3406f3..d2ae2b5a43 100644 --- a/ext/zip/tests/oo_extract.phpt +++ b/ext/zip/tests/oo_extract.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . 'test_with_comment.zip'; include $dirname . 'utils.inc'; $zip = new ZipArchive; diff --git a/ext/zip/tests/oo_getcomment.phpt b/ext/zip/tests/oo_getcomment.phpt index c6b505828d..4301a8aa34 100644 --- a/ext/zip/tests/oo_getcomment.phpt +++ b/ext/zip/tests/oo_getcomment.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . 'test_with_comment.zip'; include $dirname . 'utils.inc'; $zip = new ZipArchive; diff --git a/ext/zip/tests/oo_getnameindex.phpt b/ext/zip/tests/oo_getnameindex.phpt index aa96b4cfbe..53ca490e7d 100644 --- a/ext/zip/tests/oo_getnameindex.phpt +++ b/ext/zip/tests/oo_getnameindex.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_oo_rename.zip'; diff --git a/ext/zip/tests/oo_getstatusstring.phpt b/ext/zip/tests/oo_getstatusstring.phpt index 87462694ac..50d76a16b6 100644 --- a/ext/zip/tests/oo_getstatusstring.phpt +++ b/ext/zip/tests/oo_getstatusstring.phpt @@ -8,7 +8,7 @@ Ole-Petter Wikene <olepw@redpill-linpro.com> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $arch = new ZipArchive; $arch->open($dirname.'foo.zip',ZIPARCHIVE::CREATE); var_dump($arch->getStatusString()); diff --git a/ext/zip/tests/oo_namelocate.phpt b/ext/zip/tests/oo_namelocate.phpt index 17f3cb9c28..639ee6803e 100644 --- a/ext/zip/tests/oo_namelocate.phpt +++ b/ext/zip/tests/oo_namelocate.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_oo_rename.zip'; diff --git a/ext/zip/tests/oo_open.phpt b/ext/zip/tests/oo_open.phpt index 0b33cfb489..10ebad9441 100644 --- a/ext/zip/tests/oo_open.phpt +++ b/ext/zip/tests/oo_open.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $zip = new ZipArchive; $r = $zip->open($dirname . 'nofile'); if ($r !== TRUE) { diff --git a/ext/zip/tests/oo_properties.phpt b/ext/zip/tests/oo_properties.phpt index bcd6f2fc28..b435d6c159 100644 --- a/ext/zip/tests/oo_properties.phpt +++ b/ext/zip/tests/oo_properties.phpt @@ -7,7 +7,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . '__property_test.zip'; copy($dirname . 'test_with_comment.zip', $file); diff --git a/ext/zip/tests/oo_rename.phpt b/ext/zip/tests/oo_rename.phpt index fe54fd812b..1ec661eed2 100644 --- a/ext/zip/tests/oo_rename.phpt +++ b/ext/zip/tests/oo_rename.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_oo_rename.zip'; diff --git a/ext/zip/tests/oo_setcomment.phpt b/ext/zip/tests/oo_setcomment.phpt index 0135084253..b22c2a27a8 100644 --- a/ext/zip/tests/oo_setcomment.phpt +++ b/ext/zip/tests/oo_setcomment.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; include $dirname . 'utils.inc'; $file = $dirname . '__tmp_oo_set_comment.zip'; diff --git a/ext/zip/tests/oo_setcompression.phpt b/ext/zip/tests/oo_setcompression.phpt index 4ea96acfa3..f19600a4ed 100644 --- a/ext/zip/tests/oo_setcompression.phpt +++ b/ext/zip/tests/oo_setcompression.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$tmpfile = dirname(__FILE__) . '/__tmp_oo_set_compression.zip'; +$tmpfile = __DIR__ . '/__tmp_oo_set_compression.zip'; if (file_exists($tmpfile)) { unlink($tmpfile); @@ -52,7 +52,7 @@ zip_close($zip); ?> --CLEAN-- <?php -$tmpfile = dirname(__FILE__) . '/__tmp_oo_set_compression.zip'; +$tmpfile = __DIR__ . '/__tmp_oo_set_compression.zip'; unlink($tmpfile); ?> --EXPECT-- diff --git a/ext/zip/tests/oo_stream.phpt b/ext/zip/tests/oo_stream.phpt index 83fe7e8466..89a2711666 100644 --- a/ext/zip/tests/oo_stream.phpt +++ b/ext/zip/tests/oo_stream.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . 'test_with_comment.zip'; include $dirname . 'utils.inc'; $zip = new ZipArchive; @@ -27,7 +27,7 @@ $zip->close(); var_dump($contents); -$fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb'); +$fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb'); if (!$fp) { exit("cannot open\n"); } diff --git a/ext/zip/tests/oo_unchangeIndex.phpt b/ext/zip/tests/oo_unchangeIndex.phpt index f4b5a9a82a..71647689ab 100644 --- a/ext/zip/tests/oo_unchangeIndex.phpt +++ b/ext/zip/tests/oo_unchangeIndex.phpt @@ -6,7 +6,7 @@ PHP TestFest 2017 - Bergfreunde, Florian Engelhardt <?php if (!extension_loaded("zip")) print "skip"; ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . '__tmp_oo_unchangeIndex.zip'; copy($dirname.'test.zip', $file); diff --git a/ext/zip/tests/oo_unchangeName.phpt b/ext/zip/tests/oo_unchangeName.phpt index 23dd0574af..c29ef2ca88 100644 --- a/ext/zip/tests/oo_unchangeName.phpt +++ b/ext/zip/tests/oo_unchangeName.phpt @@ -6,7 +6,7 @@ PHP TestFest 2017 - Bergfreunde, Florian Engelhardt <?php if (!extension_loaded("zip")) print "skip"; ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . '__tmp_oo_unchangeIndex.zip'; copy($dirname.'test.zip', $file); diff --git a/ext/zip/tests/pecl12414.phpt b/ext/zip/tests/pecl12414.phpt index fed9bf9d6b..1b728c0ebc 100644 --- a/ext/zip/tests/pecl12414.phpt +++ b/ext/zip/tests/pecl12414.phpt @@ -8,7 +8,7 @@ if(!extension_loaded('zip')) die('skip'); --FILE-- <?php $filename = 'MYLOGOV2.GFX'; -$zipname = dirname(__FILE__) . "/pecl12414.zip"; +$zipname = __DIR__ . "/pecl12414.zip"; $za = new ZipArchive(); $res =$za->open($zipname); if ($res === TRUE) { diff --git a/ext/zip/tests/stream_meta_data.phpt b/ext/zip/tests/stream_meta_data.phpt index 11d4d88aea..26453af134 100644 --- a/ext/zip/tests/stream_meta_data.phpt +++ b/ext/zip/tests/stream_meta_data.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$dirname = dirname(__FILE__) . '/'; +$dirname = __DIR__ . '/'; $file = $dirname . 'test_with_comment.zip'; include $dirname . 'utils.inc'; $zip = new ZipArchive; @@ -23,7 +23,7 @@ fclose($fp); $zip->close(); -$fp = fopen('zip://' . dirname(__FILE__) . '/test_with_comment.zip#foo', 'rb'); +$fp = fopen('zip://' . __DIR__ . '/test_with_comment.zip#foo', 'rb'); if (!$fp) { exit("cannot open\n"); } diff --git a/ext/zip/tests/zip_close.phpt b/ext/zip/tests/zip_close.phpt index d95f6da3c2..5df226e0ee 100644 --- a/ext/zip/tests/zip_close.phpt +++ b/ext/zip/tests/zip_close.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); if (!is_resource($zip)) die("Failure"); zip_close($zip); echo "OK"; diff --git a/ext/zip/tests/zip_entry_close.phpt b/ext/zip/tests/zip_entry_close.phpt index aed4acc661..2f2581b2d0 100644 --- a/ext/zip/tests/zip_entry_close.phpt +++ b/ext/zip/tests/zip_entry_close.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); $entry = zip_read($zip); echo "entry_open: "; var_dump(zip_entry_open($zip, $entry, "r")); echo "entry_close: "; var_dump(zip_entry_close($entry)); diff --git a/ext/zip/tests/zip_entry_compressedsize.phpt b/ext/zip/tests/zip_entry_compressedsize.phpt index cc59a0e318..1356bac343 100644 --- a/ext/zip/tests/zip_entry_compressedsize.phpt +++ b/ext/zip/tests/zip_entry_compressedsize.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); if (!is_resource($zip)) die("Failure"); $entries = 0; while ($entry = zip_read($zip)) { diff --git a/ext/zip/tests/zip_entry_compressionmethod.phpt b/ext/zip/tests/zip_entry_compressionmethod.phpt index 0695256b77..f8b4863716 100644 --- a/ext/zip/tests/zip_entry_compressionmethod.phpt +++ b/ext/zip/tests/zip_entry_compressionmethod.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); if (!is_resource($zip)) die("Failure"); $entries = 0; while ($entry = zip_read($zip)) { diff --git a/ext/zip/tests/zip_entry_filesize.phpt b/ext/zip/tests/zip_entry_filesize.phpt index db69bbf61a..1498682215 100644 --- a/ext/zip/tests/zip_entry_filesize.phpt +++ b/ext/zip/tests/zip_entry_filesize.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); if (!is_resource($zip)) die("Failure"); $entries = 0; while ($entry = zip_read($zip)) { diff --git a/ext/zip/tests/zip_entry_name.phpt b/ext/zip/tests/zip_entry_name.phpt index 91b6f5c82e..486777a0b1 100644 --- a/ext/zip/tests/zip_entry_name.phpt +++ b/ext/zip/tests/zip_entry_name.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); if (!is_resource($zip)) die("Failure"); $entries = 0; while ($entry = zip_read($zip)) { diff --git a/ext/zip/tests/zip_entry_open.phpt b/ext/zip/tests/zip_entry_open.phpt index 9b7a388323..3c7fa28714 100644 --- a/ext/zip/tests/zip_entry_open.phpt +++ b/ext/zip/tests/zip_entry_open.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); $entry = zip_read($zip); echo zip_entry_open($zip, $entry, "r") ? "OK" : "Failure"; zip_entry_close($entry); diff --git a/ext/zip/tests/zip_entry_read.phpt b/ext/zip/tests/zip_entry_read.phpt index bb136ceef1..a9800b5cc4 100644 --- a/ext/zip/tests/zip_entry_read.phpt +++ b/ext/zip/tests/zip_entry_read.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); $entry = zip_read($zip); if (!zip_entry_open($zip, $entry, "r")) die("Failure"); echo zip_entry_read($entry); diff --git a/ext/zip/tests/zip_open.phpt b/ext/zip/tests/zip_open.phpt index 6b176532ce..8cd714da0c 100644 --- a/ext/zip/tests/zip_open.phpt +++ b/ext/zip/tests/zip_open.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); echo is_resource($zip) ? "OK" : "Failure"; diff --git a/ext/zip/tests/zip_read.phpt b/ext/zip/tests/zip_read.phpt index 743ab05626..5cd2e9755a 100644 --- a/ext/zip/tests/zip_read.phpt +++ b/ext/zip/tests/zip_read.phpt @@ -6,7 +6,7 @@ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php -$zip = zip_open(dirname(__FILE__)."/test_procedural.zip"); +$zip = zip_open(__DIR__."/test_procedural.zip"); if (!is_resource($zip)) die("Failure"); $entries = 0; while ($entry = zip_read($zip)) { diff --git a/ext/zlib/tests/004-mb.phpt b/ext/zlib/tests/004-mb.phpt index 92f7db1b70..07a26e5294 100644 --- a/ext/zlib/tests/004-mb.phpt +++ b/ext/zlib/tests/004-mb.phpt @@ -9,8 +9,8 @@ var_dump(gzfile()); var_dump(gzfile("nonexistent_file_gzfile",1)); var_dump(gzfile(1,1,1)); -var_dump(gzfile(dirname(__FILE__)."/004私はガラスを食べられます.txt.gz")); -var_dump(gzfile(dirname(__FILE__)."/004私はガラスを食べられます.txt.gz", 1)); +var_dump(gzfile(__DIR__."/004私はガラスを食べられます.txt.gz")); +var_dump(gzfile(__DIR__."/004私はガラスを食べられます.txt.gz", 1)); echo "Done\n"; ?> diff --git a/ext/zlib/tests/004.phpt b/ext/zlib/tests/004.phpt index b8d0f0eccd..7689ad0cf1 100644 --- a/ext/zlib/tests/004.phpt +++ b/ext/zlib/tests/004.phpt @@ -9,8 +9,8 @@ var_dump(gzfile()); var_dump(gzfile("nonexistent_file_gzfile",1)); var_dump(gzfile(1,1,1)); -var_dump(gzfile(dirname(__FILE__)."/004.txt.gz")); -var_dump(gzfile(dirname(__FILE__)."/004.txt.gz", 1)); +var_dump(gzfile(__DIR__."/004.txt.gz")); +var_dump(gzfile(__DIR__."/004.txt.gz", 1)); echo "Done\n"; ?> diff --git a/ext/zlib/tests/bug_40189.phpt b/ext/zlib/tests/bug_40189.phpt index aedf0619a1..53226c0599 100644 --- a/ext/zlib/tests/bug_40189.phpt +++ b/ext/zlib/tests/bug_40189.phpt @@ -9,17 +9,17 @@ allow_url_fopen=1 // this string is an excerpt of a phar archive that caused an infinite loop $a = "\x3\x0\x85\x46\x2f\x7c\xc2\xaa\x69\x2b\x6d\xe5\xdb\xfe\xe4\x21\x8f\x0\x97\x21\x1d\x2\x0\x0\x0\x47\x42\x4d\x42"; var_dump(base64_encode($a)); -$gp = fopen(dirname(__FILE__) . '/test.other', 'wb'); +$gp = fopen(__DIR__ . '/test.other', 'wb'); $fp = fopen('data://text/plain;base64,AwCFRi98wqppK23l2/7kIY8AlyEdAgAAAEdCTUI=', 'r'); stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ); var_dump(stream_copy_to_stream($fp, $gp, 5)); fclose($fp); fclose($gp); -var_dump(file_get_contents(dirname(__FILE__) . '/test.other')); +var_dump(file_get_contents(__DIR__ . '/test.other')); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/test.other'); +@unlink(__DIR__ . '/test.other'); ?> --EXPECT-- string(40) "AwCFRi98wqppK23l2/7kIY8AlyEdAgAAAEdCTUI=" diff --git a/ext/zlib/tests/bug_52944.phpt b/ext/zlib/tests/bug_52944.phpt index 4edc147db9..e5c6694158 100644 --- a/ext/zlib/tests/bug_52944.phpt +++ b/ext/zlib/tests/bug_52944.phpt @@ -10,7 +10,7 @@ allow_url_fopen=1 1.2.7 on at least Windows and Darwin. Using unoptimized zlib build fixes the issue. */ -require dirname(__FILE__) . "/bug_52944_corrupted_data.inc"; +require __DIR__ . "/bug_52944_corrupted_data.inc"; $fp = fopen('data://text/plain;base64,' . $data, 'r'); stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ); diff --git a/ext/zlib/tests/compress_zlib_wrapper.phpt b/ext/zlib/tests/compress_zlib_wrapper.phpt index 4bf6c08317..1d11722129 100644 --- a/ext/zlib/tests/compress_zlib_wrapper.phpt +++ b/ext/zlib/tests/compress_zlib_wrapper.phpt @@ -4,7 +4,7 @@ compress.zlib:// wrapper <?php if (!extension_loaded("zlib")) die("skip"); ?> --FILE-- <?php -chdir(dirname(__FILE__). "/../../.."); +chdir(__DIR__. "/../../.."); $pfx = str_repeat('../', substr_count($_SERVER['PHP_SELF'], '../')); @@ -13,7 +13,7 @@ $fp = fopen("compress.zlib://{$pfx}ext/xsl/tests/xslt.xsl.gz", "rb"); fclose($fp); // Absolute path -$fp = fopen("compress.zlib://". dirname(__FILE__). "/../../../ext/xsl/tests/xslt.xsl.gz", "rb"); +$fp = fopen("compress.zlib://". __DIR__. "/../../../ext/xsl/tests/xslt.xsl.gz", "rb"); fclose($fp); echo "ok\n"; diff --git a/ext/zlib/tests/gzclose_basic.phpt b/ext/zlib/tests/gzclose_basic.phpt index 9a84111781..0393db2c57 100644 --- a/ext/zlib/tests/gzclose_basic.phpt +++ b/ext/zlib/tests/gzclose_basic.phpt @@ -11,7 +11,7 @@ if (!extension_loaded("zlib")) { // note that gzclose is an alias to fclose. parameter checking tests will be // the same as fclose -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); gzread($h, 20); var_dump(gzclose($h)); diff --git a/ext/zlib/tests/gzcompress_basic1.phpt b/ext/zlib/tests/gzcompress_basic1.phpt index 9d5fcedcf8..882fd87fad 100644 --- a/ext/zlib/tests/gzcompress_basic1.phpt +++ b/ext/zlib/tests/gzcompress_basic1.phpt @@ -18,7 +18,7 @@ if (!extension_loaded("zlib")) { * add a comment here to say what the test is supposed to do */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzcompress() : basic functionality ***\n"; diff --git a/ext/zlib/tests/gzcompress_variation1.phpt b/ext/zlib/tests/gzcompress_variation1.phpt index de1671545a..c4bc0a1ff5 100644 --- a/ext/zlib/tests/gzcompress_variation1.phpt +++ b/ext/zlib/tests/gzcompress_variation1.phpt @@ -14,7 +14,7 @@ if (!extension_loaded("zlib")) { * Alias to functions: */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzcompress() : variation ***\n"; diff --git a/ext/zlib/tests/gzdeflate_basic1.phpt b/ext/zlib/tests/gzdeflate_basic1.phpt index 5f25a1880b..8ab0ee6243 100644 --- a/ext/zlib/tests/gzdeflate_basic1.phpt +++ b/ext/zlib/tests/gzdeflate_basic1.phpt @@ -18,7 +18,7 @@ if (!extension_loaded("zlib")) { * add a comment here to say what the test is supposed to do */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzdeflate() : basic functionality ***\n"; diff --git a/ext/zlib/tests/gzdeflate_variation1.phpt b/ext/zlib/tests/gzdeflate_variation1.phpt index dc8b9d1fcd..7993abb529 100644 --- a/ext/zlib/tests/gzdeflate_variation1.phpt +++ b/ext/zlib/tests/gzdeflate_variation1.phpt @@ -14,7 +14,7 @@ if (!extension_loaded("zlib")) { * Alias to functions: */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzdeflate() : variation ***\n"; diff --git a/ext/zlib/tests/gzencode_basic1.phpt b/ext/zlib/tests/gzencode_basic1.phpt index c6040135f0..dfb09cc2ed 100644 --- a/ext/zlib/tests/gzencode_basic1.phpt +++ b/ext/zlib/tests/gzencode_basic1.phpt @@ -18,7 +18,7 @@ if (!extension_loaded("zlib")) { * Test basic function of gzencode */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzencode() : basic functionality ***\n"; diff --git a/ext/zlib/tests/gzencode_variation1-win32.phpt b/ext/zlib/tests/gzencode_variation1-win32.phpt index 4feb7d653c..798924f9fe 100644 --- a/ext/zlib/tests/gzencode_variation1-win32.phpt +++ b/ext/zlib/tests/gzencode_variation1-win32.phpt @@ -27,7 +27,7 @@ if(!function_exists("gzdecode")) { } -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzencode() : variation ***\n"; diff --git a/ext/zlib/tests/gzencode_variation1.phpt b/ext/zlib/tests/gzencode_variation1.phpt index 1c82da98f8..c966b2cbc5 100644 --- a/ext/zlib/tests/gzencode_variation1.phpt +++ b/ext/zlib/tests/gzencode_variation1.phpt @@ -19,7 +19,7 @@ if (!extension_loaded("zlib")) { * Alias to functions: */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzencode() : variation ***\n"; diff --git a/ext/zlib/tests/gzeof_basic.phpt b/ext/zlib/tests/gzeof_basic.phpt index 6ee8d8e181..33d46599c3 100644 --- a/ext/zlib/tests/gzeof_basic.phpt +++ b/ext/zlib/tests/gzeof_basic.phpt @@ -11,7 +11,7 @@ if (!extension_loaded("zlib")) { // note that gzeof is an alias to gzeof. parameter checking tests will be // the same as gzeof -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; echo "-- test 1 --\n"; $h = gzopen($f, 'r'); diff --git a/ext/zlib/tests/gzeof_variation1.phpt b/ext/zlib/tests/gzeof_variation1.phpt index 9e30775928..4a845917af 100644 --- a/ext/zlib/tests/gzeof_variation1.phpt +++ b/ext/zlib/tests/gzeof_variation1.phpt @@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) { --FILE-- <?php -$filename = dirname(__FILE__)."/gzeof_variation1.txt.gz"; +$filename = __DIR__."/gzeof_variation1.txt.gz"; $h = gzopen($filename, 'w'); $str = "Here is the string to be written. "; $length = 10; diff --git a/ext/zlib/tests/gzfile_variation11.phpt b/ext/zlib/tests/gzfile_variation11.phpt index ba25bf570f..76f0a537b5 100644 --- a/ext/zlib/tests/gzfile_variation11.phpt +++ b/ext/zlib/tests/gzfile_variation11.phpt @@ -9,7 +9,7 @@ if (PHP_INT_SIZE != 8) die('skip 64-bit only'); <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $variation = array( diff --git a/ext/zlib/tests/gzfile_variation12.phpt b/ext/zlib/tests/gzfile_variation12.phpt index e16a91822b..6b9aec5334 100644 --- a/ext/zlib/tests/gzfile_variation12.phpt +++ b/ext/zlib/tests/gzfile_variation12.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $variation = array ( diff --git a/ext/zlib/tests/gzfile_variation9.phpt b/ext/zlib/tests/gzfile_variation9.phpt index 6cb5a53331..8fa994026f 100644 --- a/ext/zlib/tests/gzfile_variation9.phpt +++ b/ext/zlib/tests/gzfile_variation9.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $variation = array( 'lowercase true' => true, diff --git a/ext/zlib/tests/gzgetc_basic.phpt b/ext/zlib/tests/gzgetc_basic.phpt index ad8684381b..73dc128bf2 100644 --- a/ext/zlib/tests/gzgetc_basic.phpt +++ b/ext/zlib/tests/gzgetc_basic.phpt @@ -16,7 +16,7 @@ if (version_compare(get_zlib_version(), '1.2.5') > 0) { // note that gzgets is an alias to fgets. parameter checking tests will be // the same as gzgets -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); $count = 0; diff --git a/ext/zlib/tests/gzgetc_basic_1.phpt b/ext/zlib/tests/gzgetc_basic_1.phpt index 24d847eb64..b555877c8c 100644 --- a/ext/zlib/tests/gzgetc_basic_1.phpt +++ b/ext/zlib/tests/gzgetc_basic_1.phpt @@ -16,7 +16,7 @@ if (version_compare(get_zlib_version(), '1.2.7') < 0) { // note that gzgets is an alias to fgets. parameter checking tests will be // the same as gzgets -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); if ($h) { $count = 0; diff --git a/ext/zlib/tests/gzgets_basic.phpt b/ext/zlib/tests/gzgets_basic.phpt index 20d43e1eb3..8f2e1c0a20 100644 --- a/ext/zlib/tests/gzgets_basic.phpt +++ b/ext/zlib/tests/gzgets_basic.phpt @@ -12,7 +12,7 @@ if (!extension_loaded("zlib")) { // note that gzgets is an alias to fgets. parameter checking tests will be // the same as fgets -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); $lengths = array(10, 14, 7, 99); foreach ($lengths as $length) { diff --git a/ext/zlib/tests/gzinflate_error1.phpt b/ext/zlib/tests/gzinflate_error1.phpt index cbfe615511..fd65f54e55 100644 --- a/ext/zlib/tests/gzinflate_error1.phpt +++ b/ext/zlib/tests/gzinflate_error1.phpt @@ -14,7 +14,7 @@ if (!extension_loaded("zlib")) { * Alias to functions: */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzinflate() : error conditions ***\n"; diff --git a/ext/zlib/tests/gzopen_basic.phpt b/ext/zlib/tests/gzopen_basic.phpt index d41e1c40de..4ef34aea68 100644 --- a/ext/zlib/tests/gzopen_basic.phpt +++ b/ext/zlib/tests/gzopen_basic.phpt @@ -18,7 +18,7 @@ echo "*** Testing gzopen() : basic functionality ***\n"; // Initialise all required variables -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $mode = 'r'; $use_include_path = false; diff --git a/ext/zlib/tests/gzopen_variation7.phpt b/ext/zlib/tests/gzopen_variation7.phpt index cc627374bf..0e499e0d37 100644 --- a/ext/zlib/tests/gzopen_variation7.phpt +++ b/ext/zlib/tests/gzopen_variation7.phpt @@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) { --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h1 = gzopen($f, 'r'); $h2 = gzopen($f, 'r'); diff --git a/ext/zlib/tests/gzopen_variation9.phpt b/ext/zlib/tests/gzopen_variation9.phpt index b308316335..d948b435ca 100644 --- a/ext/zlib/tests/gzopen_variation9.phpt +++ b/ext/zlib/tests/gzopen_variation9.phpt @@ -18,7 +18,7 @@ echo "*** Testing gzopen() : variation ***\n"; $modes = array('r+', 'rf', 'w+' , 'e'); -$file = dirname(__FILE__)."/004.txt.gz"; +$file = __DIR__."/004.txt.gz"; foreach ($modes as $mode) { echo "mode=$mode\n"; diff --git a/ext/zlib/tests/gzpassthru_basic.phpt b/ext/zlib/tests/gzpassthru_basic.phpt index 10ff6630b2..2747edc786 100644 --- a/ext/zlib/tests/gzpassthru_basic.phpt +++ b/ext/zlib/tests/gzpassthru_basic.phpt @@ -12,7 +12,7 @@ if (!extension_loaded("zlib")) { // note that gzpassthru is an alias to fpassthru. parameter checking tests will be // the same as fpassthru -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); var_dump(gzpassthru($h)); var_dump(gzpassthru($h)); diff --git a/ext/zlib/tests/gzputs_basic.phpt b/ext/zlib/tests/gzputs_basic.phpt index 72173bb7b9..a9bd682c14 100644 --- a/ext/zlib/tests/gzputs_basic.phpt +++ b/ext/zlib/tests/gzputs_basic.phpt @@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) { --FILE-- <?php -$filename = dirname(__FILE__)."/gzputs_basic.txt.gz"; +$filename = __DIR__."/gzputs_basic.txt.gz"; $h = gzopen($filename, 'w'); $str = "Here is the string to be written. "; $length = 10; diff --git a/ext/zlib/tests/gzread_basic.phpt b/ext/zlib/tests/gzread_basic.phpt index b41720c396..813fcd8616 100644 --- a/ext/zlib/tests/gzread_basic.phpt +++ b/ext/zlib/tests/gzread_basic.phpt @@ -11,7 +11,7 @@ if (!extension_loaded("zlib")) { // note that gzread is an alias to fread. parameter checking tests will be // the same as fread -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); $lengths = array(10, 14, 7, 99, 2000); diff --git a/ext/zlib/tests/gzread_error2.phpt b/ext/zlib/tests/gzread_error2.phpt index 5b97993482..a419f96640 100644 --- a/ext/zlib/tests/gzread_error2.phpt +++ b/ext/zlib/tests/gzread_error2.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); var_dump(gzread($h, 10)); var_dump(gzread($h, 0)); diff --git a/ext/zlib/tests/gzrewind_basic.phpt b/ext/zlib/tests/gzrewind_basic.phpt index e415a0e105..3a34f49797 100644 --- a/ext/zlib/tests/gzrewind_basic.phpt +++ b/ext/zlib/tests/gzrewind_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); echo "test rewind before doing anything\n"; var_dump(gzrewind($h)); diff --git a/ext/zlib/tests/gzrewind_basic2.phpt b/ext/zlib/tests/gzrewind_basic2.phpt index 277d8a02ad..2648966b7d 100644 --- a/ext/zlib/tests/gzrewind_basic2.phpt +++ b/ext/zlib/tests/gzrewind_basic2.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); // read to the end of the file diff --git a/ext/zlib/tests/gzseek_basic.phpt b/ext/zlib/tests/gzseek_basic.phpt index 8ef4ef070d..e31e25f380 100644 --- a/ext/zlib/tests/gzseek_basic.phpt +++ b/ext/zlib/tests/gzseek_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); echo "move to the 50th byte\n"; diff --git a/ext/zlib/tests/gzseek_variation2.phpt b/ext/zlib/tests/gzseek_variation2.phpt index 6063f42b4d..14ae30a09a 100644 --- a/ext/zlib/tests/gzseek_variation2.phpt +++ b/ext/zlib/tests/gzseek_variation2.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); echo "move to the 50th byte\n"; diff --git a/ext/zlib/tests/gzseek_variation3.phpt b/ext/zlib/tests/gzseek_variation3.phpt index 196f69361e..d238fe96bd 100644 --- a/ext/zlib/tests/gzseek_variation3.phpt +++ b/ext/zlib/tests/gzseek_variation3.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); echo "move to the 50th byte\n"; diff --git a/ext/zlib/tests/gzseek_variation6.phpt b/ext/zlib/tests/gzseek_variation6.phpt index 888adac310..54a52dce3c 100644 --- a/ext/zlib/tests/gzseek_variation6.phpt +++ b/ext/zlib/tests/gzseek_variation6.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); // move 40 bytes echo "move 40 bytes\n"; diff --git a/ext/zlib/tests/gztell_basic.phpt b/ext/zlib/tests/gztell_basic.phpt index 3e33fcd3fc..181295c097 100644 --- a/ext/zlib/tests/gztell_basic.phpt +++ b/ext/zlib/tests/gztell_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, 'r'); $intervals = array(7, 22, 54, 17, 27, 15, 1000); // tell should be 7, 29, 83, 100, 127, 142, 176 (176 is length of uncompressed file) diff --git a/ext/zlib/tests/gzuncompress_basic1.phpt b/ext/zlib/tests/gzuncompress_basic1.phpt index 3d593e466c..6107a59e4f 100644 --- a/ext/zlib/tests/gzuncompress_basic1.phpt +++ b/ext/zlib/tests/gzuncompress_basic1.phpt @@ -14,7 +14,7 @@ if (!extension_loaded("zlib")) { * Alias to functions: */ -include(dirname(__FILE__) . '/data.inc'); +include(__DIR__ . '/data.inc'); echo "*** Testing gzuncompress() : basic functionality ***\n"; diff --git a/ext/zlib/tests/gzwrite_variation1.phpt b/ext/zlib/tests/gzwrite_variation1.phpt index aa556ca5a4..6061ef1a0f 100644 --- a/ext/zlib/tests/gzwrite_variation1.phpt +++ b/ext/zlib/tests/gzwrite_variation1.phpt @@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) { --FILE-- <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $h = gzopen($filename, 'r'); $str = "Here is the string to be written. "; $length = 10; diff --git a/ext/zlib/tests/readgzfile_variation10.phpt b/ext/zlib/tests/readgzfile_variation10.phpt index 004a07775a..731445dbf0 100644 --- a/ext/zlib/tests/readgzfile_variation10.phpt +++ b/ext/zlib/tests/readgzfile_variation10.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $unset_var = 10; diff --git a/ext/zlib/tests/readgzfile_variation11.phpt b/ext/zlib/tests/readgzfile_variation11.phpt index 6dd9c2ff39..87eb8ac7c8 100644 --- a/ext/zlib/tests/readgzfile_variation11.phpt +++ b/ext/zlib/tests/readgzfile_variation11.phpt @@ -9,7 +9,7 @@ if (PHP_INT_SIZE != 8) die('skip 64-bit only'); <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $variation = array( diff --git a/ext/zlib/tests/readgzfile_variation12.phpt b/ext/zlib/tests/readgzfile_variation12.phpt index 82e7b07a5d..af22ce6f6c 100644 --- a/ext/zlib/tests/readgzfile_variation12.phpt +++ b/ext/zlib/tests/readgzfile_variation12.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $variation = array ( diff --git a/ext/zlib/tests/readgzfile_variation9.phpt b/ext/zlib/tests/readgzfile_variation9.phpt index 50fdd62f06..4f7b7d30c0 100644 --- a/ext/zlib/tests/readgzfile_variation9.phpt +++ b/ext/zlib/tests/readgzfile_variation9.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('zlib')) die ('skip zlib extension not available in this b <?php -$filename = dirname(__FILE__)."/004.txt.gz"; +$filename = __DIR__."/004.txt.gz"; $variation = array( 'lowercase true' => true, diff --git a/ext/zlib/tests/zlib_filter_inflate2.phpt b/ext/zlib/tests/zlib_filter_inflate2.phpt index 67b7e8aa42..7dd2ebb594 100644 --- a/ext/zlib/tests/zlib_filter_inflate2.phpt +++ b/ext/zlib/tests/zlib_filter_inflate2.phpt @@ -5,24 +5,24 @@ zlib.inflate of gzip-encoded stream --FILE-- <?php -$a = gzopen(dirname(__FILE__) . '/test.txt.gz', 'w'); +$a = gzopen(__DIR__ . '/test.txt.gz', 'w'); fwrite($a, "This is quite the thing ain't it\n"); fclose($a); -$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r'); +$fp = fopen(__DIR__ . '/test.txt.gz', 'r'); stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ); echo fread($fp, 2000); fclose($fp); echo "1\n"; -$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r'); +$fp = fopen(__DIR__ . '/test.txt.gz', 'r'); // zlib format -$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r'); +$fp = fopen(__DIR__ . '/test.txt.gz', 'r'); stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' => 15+16)); echo "2\n"; echo fread($fp, 2000); fclose($fp); // auto-detect -$fp = fopen(dirname(__FILE__) . '/test.txt.gz', 'r'); +$fp = fopen(__DIR__ . '/test.txt.gz', 'r'); stream_filter_append($fp, 'zlib.inflate', STREAM_FILTER_READ, array('window' => 15+32)); echo "3\n"; echo fread($fp, 2000); @@ -31,7 +31,7 @@ fclose($fp); ?> --CLEAN-- <?php -@unlink(dirname(__FILE__) . '/test.txt.gz'); +@unlink(__DIR__ . '/test.txt.gz'); ?> --EXPECT-- 1 diff --git a/ext/zlib/tests/zlib_scheme_copy_basic.phpt b/ext/zlib/tests/zlib_scheme_copy_basic.phpt index 179545ee44..a295c84bc5 100644 --- a/ext/zlib/tests/zlib_scheme_copy_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_copy_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $outputFileName = __FILE__.'.tmp'; $srcFile = "compress.zlib://$inputFileName"; diff --git a/ext/zlib/tests/zlib_scheme_copy_variation1.phpt b/ext/zlib/tests/zlib_scheme_copy_variation1.phpt index 728275986d..4130aa4508 100644 --- a/ext/zlib/tests/zlib_scheme_copy_variation1.phpt +++ b/ext/zlib/tests/zlib_scheme_copy_variation1.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $outputFileName = __FILE__.'.tmp'; $srcFile = "compress.zlib://$inputFileName"; diff --git a/ext/zlib/tests/zlib_scheme_dir_basic.phpt b/ext/zlib/tests/zlib_scheme_dir_basic.phpt index 41a2683f06..768cdb23a1 100644 --- a/ext/zlib/tests/zlib_scheme_dir_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_dir_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/dir.gz"; +$inputFileName = __DIR__."/dir.gz"; $srcFile = "compress.zlib://$inputFileName"; var_dump(mkdir($srcFile)); var_dump(is_dir($srcFile)); diff --git a/ext/zlib/tests/zlib_scheme_file_basic.phpt b/ext/zlib/tests/zlib_scheme_file_basic.phpt index c2264159bb..b978e35915 100644 --- a/ext/zlib/tests/zlib_scheme_file_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_file_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; $contents = file($srcFile); var_dump($contents); diff --git a/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt b/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt index 3882389b16..e98e4e8ca6 100644 --- a/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; $contents = file_get_contents($srcFile); echo $contents; diff --git a/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt b/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt index 99ff70de79..c0862d31a9 100644 --- a/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; readfile($srcFile); ?> diff --git a/ext/zlib/tests/zlib_scheme_fopen_basic.phpt b/ext/zlib/tests/zlib_scheme_fopen_basic.phpt index a282aa9c3b..d06276a5f4 100644 --- a/ext/zlib/tests/zlib_scheme_fopen_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_fopen_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; $h = fopen($srcFile, 'r'); fpassthru($h); diff --git a/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt b/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt index 670d67532d..a57d52f567 100644 --- a/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt +++ b/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "file://$inputFileName"; $compressedFile = "compress.zlib://$srcFile"; diff --git a/ext/zlib/tests/zlib_scheme_rename_basic.phpt b/ext/zlib/tests/zlib_scheme_rename_basic.phpt index 53bc70a4cf..e7225b6d81 100644 --- a/ext/zlib/tests/zlib_scheme_rename_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_rename_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; rename($srcFile, 'something.tmp'); var_dump(file_exists($inputFileName)); diff --git a/ext/zlib/tests/zlib_scheme_stat_basic.phpt b/ext/zlib/tests/zlib_scheme_stat_basic.phpt index 80c26bd62a..d7997e2ebd 100644 --- a/ext/zlib/tests/zlib_scheme_stat_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_stat_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; stat($srcFile); lstat($srcFile); diff --git a/ext/zlib/tests/zlib_scheme_stat_basic2.phpt b/ext/zlib/tests/zlib_scheme_stat_basic2.phpt index 8081fc805b..e74504939e 100644 --- a/ext/zlib/tests/zlib_scheme_stat_basic2.phpt +++ b/ext/zlib/tests/zlib_scheme_stat_basic2.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; echo "file_exists="; var_dump(file_exists($srcFile)); diff --git a/ext/zlib/tests/zlib_scheme_unlink_basic.phpt b/ext/zlib/tests/zlib_scheme_unlink_basic.phpt index afa62f51f5..cb2734d905 100644 --- a/ext/zlib/tests/zlib_scheme_unlink_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_unlink_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$inputFileName = dirname(__FILE__)."/004.txt.gz"; +$inputFileName = __DIR__."/004.txt.gz"; $srcFile = "compress.zlib://$inputFileName"; unlink($srcFile); var_dump(file_exists($inputFileName)); diff --git a/ext/zlib/tests/zlib_wrapper_flock_basic.phpt b/ext/zlib/tests/zlib_wrapper_flock_basic.phpt index f8b776ae33..e32f116420 100644 --- a/ext/zlib/tests/zlib_wrapper_flock_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_flock_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f,'r'); var_dump(flock($h, LOCK_SH)); gzclose($h); diff --git a/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt b/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt index 4996d9e2c7..cb7cf915ff 100644 --- a/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f, "r"); var_dump(fstat($h)); fclose($h); diff --git a/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt b/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt index 0bc6f4f3e0..674243ab5c 100644 --- a/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt @@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) { ?> --FILE-- <?php -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $f2 = "zlib_wrapper_ftruncate_basic.txt.gz"; copy($f, $f2); diff --git a/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt b/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt index 1a2993acbf..591b93d075 100644 --- a/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt @@ -9,12 +9,12 @@ if (!extension_loaded("zlib")) { --FILE-- <?php echo "no wrapper\n"; -$f = dirname(__FILE__)."/004.txt.gz"; +$f = __DIR__."/004.txt.gz"; $h = gzopen($f,'r'); var_dump(stream_get_meta_data($h)); gzclose($h); echo "\nwith wrapper\n"; -$f = "compress.zlib://".dirname(__FILE__)."/004.txt.gz"; +$f = "compress.zlib://".__DIR__."/004.txt.gz"; $h = fopen($f,'r'); var_dump(stream_get_meta_data($h)); gzclose($h); diff --git a/sapi/cgi/tests/002.phpt b/sapi/cgi/tests/002.phpt index 91db184fcb..b28c865659 100644 --- a/sapi/cgi/tests/002.phpt +++ b/sapi/cgi/tests/002.phpt @@ -11,7 +11,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$file = dirname(__FILE__)."/002.test.php"; +$file = __DIR__."/002.test.php"; file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); ?>'); diff --git a/sapi/cgi/tests/003.phpt b/sapi/cgi/tests/003.phpt index a4d3058624..4b4d29267d 100644 --- a/sapi/cgi/tests/003.phpt +++ b/sapi/cgi/tests/003.phpt @@ -17,7 +17,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$filename = dirname(__FILE__).'/003.test.php'; +$filename = __DIR__.'/003.test.php'; $code =' <?php /* some test script */ diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt index c41df11acc..b46dce7052 100644 --- a/sapi/cgi/tests/004.phpt +++ b/sapi/cgi/tests/004.phpt @@ -12,7 +12,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$filename = dirname(__FILE__).'/004.test.php'; +$filename = __DIR__.'/004.test.php'; $code =' <?php diff --git a/sapi/cgi/tests/006.phpt b/sapi/cgi/tests/006.phpt index bc98656b49..c78229880c 100644 --- a/sapi/cgi/tests/006.phpt +++ b/sapi/cgi/tests/006.phpt @@ -11,7 +11,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$filename = dirname(__FILE__)."/006.test.php"; +$filename = __DIR__."/006.test.php"; $code = ' <?php diff --git a/sapi/cgi/tests/008.phpt b/sapi/cgi/tests/008.phpt index f0df0bae42..be2fd578e7 100644 --- a/sapi/cgi/tests/008.phpt +++ b/sapi/cgi/tests/008.phpt @@ -10,7 +10,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$filename = dirname(__FILE__)."/008.test.php"; +$filename = __DIR__."/008.test.php"; $code = ' <?php $test = "var"; //var diff --git a/sapi/cgi/tests/apache_request_headers.phpt b/sapi/cgi/tests/apache_request_headers.phpt index 3750600671..bda9ef8b70 100644 --- a/sapi/cgi/tests/apache_request_headers.phpt +++ b/sapi/cgi/tests/apache_request_headers.phpt @@ -13,7 +13,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$file = dirname(__FILE__)."/012.test.php"; +$file = __DIR__."/012.test.php"; file_put_contents($file, '<?php print_r(apache_request_headers()); ?>'); diff --git a/sapi/cgi/tests/apache_response_headers.phpt b/sapi/cgi/tests/apache_response_headers.phpt index 2964ac7bc7..99b1352680 100644 --- a/sapi/cgi/tests/apache_response_headers.phpt +++ b/sapi/cgi/tests/apache_response_headers.phpt @@ -11,7 +11,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$test_file = dirname(__FILE__) . DIRECTORY_SEPARATOR ."apache_response_headers.test.php"; +$test_file = __DIR__ . DIRECTORY_SEPARATOR ."apache_response_headers.test.php"; $code = '<?php'; $code .= ' @@ -34,7 +34,7 @@ passthru( "$php -n -q " . escapeshellarg( $test_file ) ); ===DONE=== --CLEAN-- <?php -@unlink( dirname(__FILE__) . DIRECTORY_SEPARATOR ."apache_response_headers.test.php" ); +@unlink( __DIR__ . DIRECTORY_SEPARATOR ."apache_response_headers.test.php" ); ?> --EXPECTF-- array(3) { diff --git a/sapi/cgi/tests/bug75574_utf8.phpt b/sapi/cgi/tests/bug75574_utf8.phpt index 650d4a75f1..d7f0e3e5ee 100644 --- a/sapi/cgi/tests/bug75574_utf8.phpt +++ b/sapi/cgi/tests/bug75574_utf8.phpt @@ -16,7 +16,7 @@ include "include.inc"; $php = get_cgi_path(); reset_env_vars(); -$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid()); +$fn = __DIR__ . DIRECTORY_SEPARATOR . md5(uniqid()); file_put_contents($fn, "<?php\nvar_dump(putenv('FOO=啊'));\n//var_dump(`echo %FOO%`);\nvar_dump(getenv('FOO'));"); echo shell_exec("$php -n -f $fn"); 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(); ?>"); diff --git a/tests/basic/timeout_variation_0.phpt b/tests/basic/timeout_variation_0.phpt index adc8e6b7cf..be868392b4 100644 --- a/tests/basic/timeout_variation_0.phpt +++ b/tests/basic/timeout_variation_0.phpt @@ -7,7 +7,7 @@ Timeout within while loop --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_1.phpt b/tests/basic/timeout_variation_1.phpt index 51568a7492..238041955e 100644 --- a/tests/basic/timeout_variation_1.phpt +++ b/tests/basic/timeout_variation_1.phpt @@ -7,7 +7,7 @@ Timeout within function --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_10.phpt b/tests/basic/timeout_variation_10.phpt index 030deaf389..59bb289def 100644 --- a/tests/basic/timeout_variation_10.phpt +++ b/tests/basic/timeout_variation_10.phpt @@ -7,7 +7,7 @@ Timeout within shutdown function, variation --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_2.phpt b/tests/basic/timeout_variation_2.phpt index 24574e9c5f..41efe1a907 100644 --- a/tests/basic/timeout_variation_2.phpt +++ b/tests/basic/timeout_variation_2.phpt @@ -7,7 +7,7 @@ Timeout within array_walk --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_3.phpt b/tests/basic/timeout_variation_3.phpt index 795ad6505d..ea48ac97da 100644 --- a/tests/basic/timeout_variation_3.phpt +++ b/tests/basic/timeout_variation_3.phpt @@ -7,7 +7,7 @@ Timeout within eval --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_4.phpt b/tests/basic/timeout_variation_4.phpt index 7a334fd544..e54c8d67d5 100644 --- a/tests/basic/timeout_variation_4.phpt +++ b/tests/basic/timeout_variation_4.phpt @@ -7,7 +7,7 @@ Timeout within call_user_func --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_5.phpt b/tests/basic/timeout_variation_5.phpt index c3b71e89ab..37af60ded4 100644 --- a/tests/basic/timeout_variation_5.phpt +++ b/tests/basic/timeout_variation_5.phpt @@ -7,7 +7,7 @@ Timeout within function containing exception --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_6.phpt b/tests/basic/timeout_variation_6.phpt index c172625f5d..7b0a93d38e 100644 --- a/tests/basic/timeout_variation_6.phpt +++ b/tests/basic/timeout_variation_6.phpt @@ -7,7 +7,7 @@ Timeout within function trowing exception before timeout reached --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_7.phpt b/tests/basic/timeout_variation_7.phpt index df8f897550..526c8f015d 100644 --- a/tests/basic/timeout_variation_7.phpt +++ b/tests/basic/timeout_variation_7.phpt @@ -7,7 +7,7 @@ Timeout within for loop --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_8.phpt b/tests/basic/timeout_variation_8.phpt index d0a8861700..4c0dfaa8f7 100644 --- a/tests/basic/timeout_variation_8.phpt +++ b/tests/basic/timeout_variation_8.phpt @@ -7,7 +7,7 @@ Timeout within foreach loop --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/basic/timeout_variation_9.phpt b/tests/basic/timeout_variation_9.phpt index 390d29b0c0..bfd8ca2b52 100644 --- a/tests/basic/timeout_variation_9.phpt +++ b/tests/basic/timeout_variation_9.phpt @@ -7,7 +7,7 @@ Timeout within shutdown function --FILE-- <?php -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "timeout_config.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; set_time_limit($t); diff --git a/tests/classes/autoload_001.phpt b/tests/classes/autoload_001.phpt index 56e22f5e4a..350e1e0f12 100644 --- a/tests/classes/autoload_001.phpt +++ b/tests/classes/autoload_001.phpt @@ -8,7 +8,7 @@ ZE2 Autoload and class_exists <?php spl_autoload_register(function ($class_name) { - require_once(dirname(__FILE__) . '/' . $class_name . '.inc'); + require_once(__DIR__ . '/' . $class_name . '.inc'); echo 'autoload(' . $class_name . ")\n"; }); diff --git a/tests/classes/autoload_002.phpt b/tests/classes/autoload_002.phpt index 0df897495f..1b049c3414 100644 --- a/tests/classes/autoload_002.phpt +++ b/tests/classes/autoload_002.phpt @@ -8,7 +8,7 @@ ZE2 Autoload and get_class_methods <?php spl_autoload_register(function ($class_name) { - require_once(dirname(__FILE__) . '/' . $class_name . '.inc'); + require_once(__DIR__ . '/' . $class_name . '.inc'); echo 'autoload(' . $class_name . ")\n"; }); diff --git a/tests/classes/autoload_003.phpt b/tests/classes/autoload_003.phpt index 2f173d80ab..52fd264d46 100644 --- a/tests/classes/autoload_003.phpt +++ b/tests/classes/autoload_003.phpt @@ -8,7 +8,7 @@ ZE2 Autoload and derived classes <?php spl_autoload_register(function ($class_name) { - require_once(dirname(__FILE__) . '/' . $class_name . '.inc'); + require_once(__DIR__ . '/' . $class_name . '.inc'); echo 'autoload(' . $class_name . ")\n"; }); diff --git a/tests/classes/autoload_004.phpt b/tests/classes/autoload_004.phpt index 2a71a893d9..6f24f157d2 100644 --- a/tests/classes/autoload_004.phpt +++ b/tests/classes/autoload_004.phpt @@ -9,7 +9,7 @@ ZE2 Autoload and recursion spl_autoload_register(function ($class_name) { var_dump(class_exists($class_name)); - require_once(dirname(__FILE__) . '/' . $class_name . '.inc'); + require_once(__DIR__ . '/' . $class_name . '.inc'); echo 'autoload(' . $class_name . ")\n"; }); diff --git a/tests/classes/autoload_005.phpt b/tests/classes/autoload_005.phpt index 622e1fdee4..67dd23daf7 100644 --- a/tests/classes/autoload_005.phpt +++ b/tests/classes/autoload_005.phpt @@ -9,7 +9,7 @@ ZE2 Autoload from destructor spl_autoload_register(function ($class_name) { var_dump(class_exists($class_name, false)); - require_once(dirname(__FILE__) . '/' . $class_name . '.inc'); + require_once(__DIR__ . '/' . $class_name . '.inc'); echo 'autoload(' . $class_name . ")\n"; }); diff --git a/tests/classes/autoload_006.phpt b/tests/classes/autoload_006.phpt index a7afb3b904..746cbee3f6 100644 --- a/tests/classes/autoload_006.phpt +++ b/tests/classes/autoload_006.phpt @@ -8,7 +8,7 @@ ZE2 Autoload from destructor <?php spl_autoload_register(function ($class_name) { - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.inc'); + require_once(__DIR__ . '/' . strtolower($class_name) . '.inc'); echo 'autoload(' . $class_name . ")\n"; }); diff --git a/tests/func/010.phpt b/tests/func/010.phpt index 6d5c30c9ee..4c28dea1b7 100644 --- a/tests/func/010.phpt +++ b/tests/func/010.phpt @@ -53,8 +53,8 @@ for($i=0; $i< $limit; ++$i) { $str .= ");\n"; -$filename = dirname(__FILE__).'/010-file.php'; -file_put_contents(dirname(__FILE__).'/010-file.php', $str); +$filename = __DIR__.'/010-file.php'; +file_put_contents(__DIR__.'/010-file.php', $str); unset($str); include($filename); @@ -64,7 +64,7 @@ echo "Done\n"; ?> --CLEAN-- <?php -@unlink(dirname(__FILE__).'/010-file.php'); +@unlink(__DIR__.'/010-file.php'); ?> --EXPECT-- bool(true) diff --git a/tests/lang/bug24054.phpt b/tests/lang/bug24054.phpt index fd9a9bf0c7..4ee5d631e6 100644 --- a/tests/lang/bug24054.phpt +++ b/tests/lang/bug24054.phpt @@ -17,7 +17,7 @@ $tests = <<<TESTS $i === $j TESTS; -include(dirname(__FILE__) . '/../quicktester.inc'); +include(__DIR__ . '/../quicktester.inc'); --EXPECT-- 1,1,0,0 OK diff --git a/tests/lang/bug32924.phpt b/tests/lang/bug32924.phpt index 4c6dab0a16..b06a7b065b 100644 --- a/tests/lang/bug32924.phpt +++ b/tests/lang/bug32924.phpt @@ -5,8 +5,8 @@ include_path={PWD} auto_prepend_file=inc.inc --FILE-- <?php -include_once(dirname(__FILE__).'/inc.inc'); -require_once(dirname(__FILE__).'/inc.inc'); +include_once(__DIR__.'/inc.inc'); +require_once(__DIR__.'/inc.inc'); ?> END --EXPECT-- diff --git a/tests/lang/bug38579.phpt b/tests/lang/bug38579.phpt index 3c96e7f50f..0d58eac529 100644 --- a/tests/lang/bug38579.phpt +++ b/tests/lang/bug38579.phpt @@ -8,7 +8,7 @@ if(PHP_OS_FAMILY !== "WIN") { ?> --FILE-- <?php -$file = dirname(__FILE__)."/bug38579.inc"; +$file = __DIR__."/bug38579.inc"; include_once(strtolower($file)); include_once(strtoupper($file)); ?> diff --git a/tests/lang/bug73172.phpt b/tests/lang/bug73172.phpt index 34435e5058..efe98cae15 100644 --- a/tests/lang/bug73172.phpt +++ b/tests/lang/bug73172.phpt @@ -5,7 +5,7 @@ Bug #73172 parse error: Invalid numeric literal setlocale(LC_ALL, 'fr_FR.utf8', 'fra'); -include dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug73172.inc"; +include __DIR__ . DIRECTORY_SEPARATOR . "bug73172.inc"; ?> ==DONE== diff --git a/tests/output/sapi_windows_vt100_support_winko_err.phpt b/tests/output/sapi_windows_vt100_support_winko_err.phpt index 04dbef561e..07c6355dab 100644 --- a/tests/output/sapi_windows_vt100_support_winko_err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt index e83b51dff3..ef2f573584 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDIN STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt index fef672dda5..600c92e704 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDIN STDOUT STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt index f8deab18e5..727d053579 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDIN STDOUT --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt index 7d72d9217e..6448651f71 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDOUT STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winko_out.phpt b/tests/output/sapi_windows_vt100_support_winko_out.phpt index d06a244e82..ce111741c0 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDOUT --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winok_err.phpt b/tests/output/sapi_windows_vt100_support_winok_err.phpt index b05f7de753..9354df4f94 100644 --- a/tests/output/sapi_windows_vt100_support_winok_err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt index 9699d5fd3c..0be05527a9 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDIN STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt index 09bf3d154b..e497c5f55a 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDIN STDOUT STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt index 81b6696b44..363e3ae0fa 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDIN STDOUT --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt index 2062007bf3..8bd6ee6bdd 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDOUT STDERR --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/sapi_windows_vt100_support_winok_out.phpt b/tests/output/sapi_windows_vt100_support_winok_out.phpt index cc1f83fdfd..c649764c4c 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out.phpt @@ -18,7 +18,7 @@ if(PHP_OS_FAMILY !== "Windows") { STDOUT --FILE-- <?php -require dirname(__FILE__).'/sapi_windows_vt100_support.inc'; +require __DIR__.'/sapi_windows_vt100_support.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/stream_isatty_err.phpt b/tests/output/stream_isatty_err.phpt index b071862c93..5513781a09 100644 --- a/tests/output/stream_isatty_err.phpt +++ b/tests/output/stream_isatty_err.phpt @@ -10,7 +10,7 @@ if (getenv("SKIP_IO_CAPTURE_TESTS")) { STDERR --FILE-- <?php -require dirname(__FILE__).'/stream_isatty.inc'; +require __DIR__.'/stream_isatty.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/stream_isatty_in-err.phpt b/tests/output/stream_isatty_in-err.phpt index fac84efb57..de2348a5b5 100644 --- a/tests/output/stream_isatty_in-err.phpt +++ b/tests/output/stream_isatty_in-err.phpt @@ -10,7 +10,7 @@ if (getenv("SKIP_IO_CAPTURE_TESTS")) { STDIN STDERR --FILE-- <?php -require dirname(__FILE__).'/stream_isatty.inc'; +require __DIR__.'/stream_isatty.inc'; testToStdErr(); ?> --EXPECTF-- diff --git a/tests/output/stream_isatty_in-out-err.phpt b/tests/output/stream_isatty_in-out-err.phpt index 56c49f70a8..fea7bc64d7 100644 --- a/tests/output/stream_isatty_in-out-err.phpt +++ b/tests/output/stream_isatty_in-out-err.phpt @@ -10,7 +10,7 @@ if (getenv("SKIP_IO_CAPTURE_TESTS")) { STDIN STDOUT STDERR --FILE-- <?php -require dirname(__FILE__).'/stream_isatty.inc'; +require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt index 70f2c030f4..6ad7a03fc3 100644 --- a/tests/output/stream_isatty_in-out.phpt +++ b/tests/output/stream_isatty_in-out.phpt @@ -10,7 +10,7 @@ if (getenv("SKIP_IO_CAPTURE_TESTS")) { STDIN STDOUT --FILE-- <?php -require dirname(__FILE__).'/stream_isatty.inc'; +require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/stream_isatty_out-err.phpt b/tests/output/stream_isatty_out-err.phpt index 4bd06d124d..ae3af3a300 100644 --- a/tests/output/stream_isatty_out-err.phpt +++ b/tests/output/stream_isatty_out-err.phpt @@ -10,7 +10,7 @@ if (getenv("SKIP_IO_CAPTURE_TESTS")) { STDOUT STDERR --FILE-- <?php -require dirname(__FILE__).'/stream_isatty.inc'; +require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/output/stream_isatty_out.phpt b/tests/output/stream_isatty_out.phpt index 14e1fb8607..dc81577446 100644 --- a/tests/output/stream_isatty_out.phpt +++ b/tests/output/stream_isatty_out.phpt @@ -10,7 +10,7 @@ if (getenv("SKIP_IO_CAPTURE_TESTS")) { STDOUT --FILE-- <?php -require dirname(__FILE__).'/stream_isatty.inc'; +require __DIR__.'/stream_isatty.inc'; testToStdOut(); ?> --EXPECTF-- diff --git a/tests/security/open_basedir_parse_ini_file.phpt b/tests/security/open_basedir_parse_ini_file.phpt index e6aa8b6418..11db63fa50 100644 --- a/tests/security/open_basedir_parse_ini_file.phpt +++ b/tests/security/open_basedir_parse_ini_file.phpt @@ -12,7 +12,7 @@ if(PHP_OS_FAMILY !== "Windows") { <?php require_once "open_basedir.inc"; test_open_basedir_before("parse_ini_file"); -$directory = dirname(__FILE__); +$directory = __DIR__; var_dump(parse_ini_file("../bad")); var_dump(parse_ini_file("../bad/bad.txt")); |