diff options
Diffstat (limited to 'ext/standard/tests/image')
17 files changed, 23 insertions, 23 deletions
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); |