summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-05-05 13:39:35 +0000
committerPierre Joye <pajoye@php.net>2010-05-05 13:39:35 +0000
commitbd2f9d56ec2e84ffdc0e022af2e94d8652ccfa45 (patch)
tree11def880f1e8b5a12c1784d76a9e3fb59fc3612c
parentb9730786a7018c31b1b31e12e28fc617c00564fe (diff)
downloadphp-git-bd2f9d56ec2e84ffdc0e022af2e94d8652ccfa45.tar.gz
- #51063, news and test
-rw-r--r--ext/standard/tests/image/getimagesizefromstring1.phpt49
-rw-r--r--ext/standard/tests/image/test.gifbin0 -> 2523 bytes
2 files changed, 49 insertions, 0 deletions
diff --git a/ext/standard/tests/image/getimagesizefromstring1.phpt b/ext/standard/tests/image/getimagesizefromstring1.phpt
new file mode 100644
index 0000000000..df75be518b
--- /dev/null
+++ b/ext/standard/tests/image/getimagesizefromstring1.phpt
@@ -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"
+}
+
diff --git a/ext/standard/tests/image/test.gif b/ext/standard/tests/image/test.gif
new file mode 100644
index 0000000000..f352c7308f
--- /dev/null
+++ b/ext/standard/tests/image/test.gif
Binary files differ