wharmby Fri Jan 23 11:18:37 2009 UTC Removed files: /php-src/ext/standard/tests/image 200x100.TIF 200x100.JPG 200x100.GIF 200x100.PNG
Modified files: /php-src/ext/standard/tests/image 200x100.tif 200x100.jpg 200x100.gif 200x100.png getimagesize_basic.phpt Log: Fix names of new image files.
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.tif?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/image/200x100.tif http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.jpg?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/image/200x100.jpg http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.gif?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/image/200x100.gif http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/200x100.png?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/image/200x100.png http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/getimagesize_basic.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/image/getimagesize_basic.phpt diff -u php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2 php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.3 --- php-src/ext/standard/tests/image/getimagesize_basic.phpt:1.2 Fri Jun 13 13:33:15 2008 +++ php-src/ext/standard/tests/image/getimagesize_basic.phpt Fri Jan 23 11:18:37 2009 @@ -1,220 +1,219 @@ ---TEST-- -Test getimagesize() function : basic functionality ---FILE-- -<?php -/* Prototype : array getimagesize(string imagefile [, array info]) - * Description: Get the size of an image as 4-element array - * Source code: ext/standard/image.c - */ - -$imagetype_filenames = array( - // GIF file - "GIF image file" => "200x100.GIF", - - //JPEG file - "JPEG image file" => "200x100.JPG", - - //PNG file - "PNG image file" => "200x100.PNG", - - //SWF file - "SWF image file" => "200x100.swf", - - //BMP file - "BMP image file" => "200x100.bmp", - - //TIFF intel byte order - "TIFF intel byte order image file" => "200x100.TIF", - - //JPC file - "JPC image file" => "test1pix.jpc", - - //JP2 file - "JP2 image file" => "test1pix.jp2", - - //IFF file - "IFF image file" => "test4pix.iff" -); - - -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( $info ); -}; -?> -===DONE=== ---EXPECTF-- -*** Testing getimagesize() : basic functionality *** - --- GIF image file (200x100.GIF) -- -array(7) { - [0]=> - int(200) - [1]=> - int(100) - [2]=> - int(1) - [3]=> - unicode(24) "width="200" height="100"" - [u"bits"]=> - int(8) - [u"channels"]=> - int(3) - [u"mime"]=> - unicode(9) "image/gif" -} -array(0) { -} - --- JPEG image file (200x100.JPG) -- -array(7) { - [0]=> - int(200) - [1]=> - int(100) - [2]=> - int(2) - [3]=> - unicode(24) "width="200" height="100"" - [u"bits"]=> - int(8) - [u"channels"]=> - int(3) - [u"mime"]=> - unicode(10) "image/jpeg" -} -array(1) { - [u"APP0"]=> - unicode(14)%sJFIF%s -} - --- PNG image file (200x100.PNG) -- -array(6) { - [0]=> - int(200) - [1]=> - int(100) - [2]=> - int(3) - [3]=> - unicode(24) "width="200" height="100"" - [u"bits"]=> - int(8) - [u"mime"]=> - unicode(9) "image/png" -} -array(0) { -} - --- SWF image file (200x100.swf) -- -array(5) { - [0]=> - int(200) - [1]=> - int(100) - [2]=> - int(4) - [3]=> - unicode(24) "width="200" height="100"" - [u"mime"]=> - unicode(29) "application/x-shockwave-flash" -} -array(0) { -} - --- BMP image file (200x100.bmp) -- -array(6) { - [0]=> - int(200) - [1]=> - int(100) - [2]=> - int(6) - [3]=> - unicode(24) "width="200" height="100"" - [u"bits"]=> - int(24) - [u"mime"]=> - unicode(9) "image/bmp" -} -array(0) { -} - --- TIFF intel byte order image file (200x100.TIF) -- -array(5) { - [0]=> - int(200) - [1]=> - int(100) - [2]=> - int(7) - [3]=> - unicode(24) "width="200" height="100"" - [u"mime"]=> - unicode(10) "image/tiff" -} -array(0) { -} - --- JPC image file (test1pix.jpc) -- -array(7) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(9) - [3]=> - unicode(20) "width="1" height="1"" - [u"bits"]=> - int(8) - [u"channels"]=> - int(3) - [u"mime"]=> - unicode(24) "application/octet-stream" -} -array(0) { -} - --- JP2 image file (test1pix.jp2) -- -array(7) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(10) - [3]=> - unicode(20) "width="1" height="1"" - [u"bits"]=> - int(8) - [u"channels"]=> - int(3) - [u"mime"]=> - unicode(9) "image/jp2" -} -array(0) { -} - --- IFF image file (test4pix.iff) -- -array(6) { - [0]=> - int(4) - [1]=> - int(1) - [2]=> - int(14) - [3]=> - unicode(20) "width="4" height="1"" - [u"bits"]=> - int(4) - [u"mime"]=> - unicode(9) "image/iff" -} -array(0) { -} +--TEST-- +Test getimagesize() function : basic functionality +--FILE-- +<?php +/* Prototype : array getimagesize(string imagefile [, array info]) + * Description: Get the size of an image as 4-element array + * Source code: ext/standard/image.c + */ + +$imagetype_filenames = array( + // GIF file + "GIF image file" => "200x100.gif", + + //JPEG file + "JPEG image file" => "200x100.jpg", + + //PNG file + "PNG image file" => "200x100.png", + + //SWF file + "SWF image file" => "200x100.swf", + + //BMP file + "BMP image file" => "200x100.bmp", + + //TIFF intel byte order + "TIFF intel byte order image file" => "200x100.tif", + + //JPC file + "JPC image file" => "test1pix.jpc", + + //JP2 file + "JP2 image file" => "test1pix.jp2", + + //IFF file + "IFF image file" => "test4pix.iff" +); + +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( $info ); +}; +?> +===DONE=== +--EXPECTF-- +*** Testing getimagesize() : basic functionality *** + +-- GIF image file (200x100.gif) -- +array(7) { + [0]=> + int(200) + [1]=> + int(100) + [2]=> + int(1) + [3]=> + unicode(24) "width="200" height="100"" + [u"bits"]=> + int(8) + [u"channels"]=> + int(3) + [u"mime"]=> + unicode(9) "image/gif" +} +array(0) { +} + +-- JPEG image file (200x100.jpg) -- +array(7) { + [0]=> + int(200) + [1]=> + int(100) + [2]=> + int(2) + [3]=> + unicode(24) "width="200" height="100"" + [u"bits"]=> + int(8) + [u"channels"]=> + int(3) + [u"mime"]=> + unicode(10) "image/jpeg" +} +array(1) { + [u"APP0"]=> + unicode(14) "JFIF%s" +} + +-- PNG image file (200x100.png) -- +array(6) { + [0]=> + int(200) + [1]=> + int(100) + [2]=> + int(3) + [3]=> + unicode(24) "width="200" height="100"" + [u"bits"]=> + int(8) + [u"mime"]=> + unicode(9) "image/png" +} +array(0) { +} + +-- SWF image file (200x100.swf) -- +array(5) { + [0]=> + int(200) + [1]=> + int(100) + [2]=> + int(4) + [3]=> + unicode(24) "width="200" height="100"" + [u"mime"]=> + unicode(29) "application/x-shockwave-flash" +} +array(0) { +} + +-- BMP image file (200x100.bmp) -- +array(6) { + [0]=> + int(200) + [1]=> + int(100) + [2]=> + int(6) + [3]=> + unicode(24) "width="200" height="100"" + [u"bits"]=> + int(24) + [u"mime"]=> + unicode(9) "image/bmp" +} +array(0) { +} + +-- TIFF intel byte order image file (200x100.tif) -- +array(5) { + [0]=> + int(200) + [1]=> + int(100) + [2]=> + int(7) + [3]=> + unicode(24) "width="200" height="100"" + [u"mime"]=> + unicode(10) "image/tiff" +} +array(0) { +} + +-- JPC image file (test1pix.jpc) -- +array(7) { + [0]=> + int(1) + [1]=> + int(1) + [2]=> + int(9) + [3]=> + unicode(20) "width="1" height="1"" + [u"bits"]=> + int(8) + [u"channels"]=> + int(3) + [u"mime"]=> + unicode(24) "application/octet-stream" +} +array(0) { +} + +-- JP2 image file (test1pix.jp2) -- +array(7) { + [0]=> + int(1) + [1]=> + int(1) + [2]=> + int(10) + [3]=> + unicode(20) "width="1" height="1"" + [u"bits"]=> + int(8) + [u"channels"]=> + int(3) + [u"mime"]=> + unicode(9) "image/jp2" +} +array(0) { +} + +-- IFF image file (test4pix.iff) -- +array(6) { + [0]=> + int(4) + [1]=> + int(1) + [2]=> + int(14) + [3]=> + unicode(20) "width="4" height="1"" + [u"bits"]=> + int(4) + [u"mime"]=> + unicode(9) "image/iff" +} +array(0) { +} ===DONE=== \ No newline at end of file
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php