svn: /php/php-src/trunk/ext/standard/tests/image/ getimagesizefromstring1.phpt test.gif
| From: | Pierre Joye | Date: | Wed, 05 May 2010 13:39:35 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/standard/tests/image/ getimagesizefromstring1.phpt test.gif | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62555@lists.php.net to get a copy of this message | ||
pajoye Wed, 05 May 2010 13:39:35 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=299022
Log:
- #51063, news and test
Bug: http://bugs.php.net/51063 (Assigned) Add
getimagesizefromstring
Changed paths:
A php/php-src/trunk/ext/standard/tests/image/getimagesizefromstring1.phpt
A php/php-src/trunk/ext/standard/tests/image/test.gif
Added: php/php-src/trunk/ext/standard/tests/image/getimagesizefromstring1.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/image/getimagesizefromstring1.phpt
(rev 0)
+++ php/php-src/trunk/ext/standard/tests/image/getimagesizefromstring1.phpt 2010-05-05 13:39:35 UTC
(rev 299022)
@@ -0,0 +1,49 @@
+--TEST--
+Compare getimagesize and getimagesizefromstring
+--FILE--
+<?PHP
+$img = __DIR__ . '/test.gif';
+
+$i1 = getimagesize($img);
+
+$data = file_get_contents($img);
+
+$i2 = getimagesizefromstring($data);
+
+var_dump($i1);
+var_dump($i2);
+?>
+--EXPECT--
+array(7) {
+ [0]=>
+ int(120)
+ [1]=>
+ int(67)
+ [2]=>
+ int(1)
+ [3]=>
+ string(23) "width="120" height="67""
+ ["bits"]=>
+ int(7)
+ ["channels"]=>
+ int(3)
+ ["mime"]=>
+ string(9) "image/gif"
+}
+array(7) {
+ [0]=>
+ int(120)
+ [1]=>
+ int(67)
+ [2]=>
+ int(1)
+ [3]=>
+ string(23) "width="120" height="67""
+ ["bits"]=>
+ int(7)
+ ["channels"]=>
+ int(3)
+ ["mime"]=>
+ string(9) "image/gif"
+}
+
Added: php/php-src/trunk/ext/standard/tests/image/test.gif
===================================================================
(Binary files differ)
Property changes on: php/php-src/trunk/ext/standard/tests/image/test.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream