]> granicus.if.org Git - php/commitdiff
Commited for Sanjay, reviewed by Pierre. Testfest task 117.
authorZoe Slattery <zoe@php.net>
Fri, 13 Jun 2008 15:22:42 +0000 (15:22 +0000)
committerZoe Slattery <zoe@php.net>
Fri, 13 Jun 2008 15:22:42 +0000 (15:22 +0000)
ext/standard/tests/image/getimagesize_variation_005.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/image/getimagesize_variation_005.phpt b/ext/standard/tests/image/getimagesize_variation_005.phpt
new file mode 100644 (file)
index 0000000..661ad05
--- /dev/null
@@ -0,0 +1,38 @@
+--TEST--
+Test getimagesize() function : basic functionality for shockwave-flash
+--SKIPIF--
+<?php
+       if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
+               die("skip zlib extension is not available or SWC not supported");
+       }
+?>
+--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
+ */
+
+echo "*** Testing getimagesize() : basic functionality ***\n";
+
+var_dump( getimagesize(dirname(__FILE__)."/test13pix.swf", $info) );
+var_dump( $info );
+?>
+===DONE===
+--EXPECTF--
+*** Testing getimagesize() : basic functionality ***
+array(5) {
+  [0]=>
+  int(550)
+  [1]=>
+  int(400)
+  [2]=>
+  int(13)
+  [3]=>
+  unicode(24) "width="550" height="400""
+  [u"mime"]=>
+  unicode(29) "application/x-shockwave-flash"
+}
+array(0) {
+}
+===DONE===