]> granicus.if.org Git - php/commitdiff
Move SWC (compressed swf) check into a separate test because this check
authorIlia Alshanetsky <iliaa@php.net>
Fri, 8 Nov 2002 02:50:28 +0000 (02:50 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 8 Nov 2002 02:50:28 +0000 (02:50 +0000)
requires zlib. This separation allows us to skip the test if zlib is
not available and not fail.

ext/standard/tests/image/getimagesize.phpt
ext/standard/tests/image/image_type_to_mime_type.phpt
ext/standard/tests/image/skipif_imagetype.inc

index 8e107a6f4873d80f8655ae30ec90e39f17e1fc39..57310c32f753c4d1ea97dcf0a07916ed38b6980e 100644 (file)
@@ -11,7 +11,7 @@ GetImageSize()
        $result = array();
        $files  = array();
        while (($file = readdir($dir)) !== FALSE) {
-               if (preg_match('/^test.+pix\./',$file)) {
+               if (preg_match('/^test.+pix\./',$file) && $file != "test13pix.swf") {
                        $files[] = $file;
                }
        }
@@ -23,20 +23,7 @@ GetImageSize()
        var_dump($result);
 ?>
 --EXPECT--
-array(11) {
-  ["test13pix.swf"]=>
-  array(5) {
-    [0]=>
-    int(550)
-    [1]=>
-    int(400)
-    [2]=>
-    int(13)
-    [3]=>
-    string(24) "width="550" height="400""
-    ["mime"]=>
-    string(29) "application/x-shockwave-flash"
-  }
+array(10) {
   ["test1pix.bmp"]=>
   array(6) {
     [0]=>
index 1def8fe02a8a63fac688abc5b139cb493ea16d59..0f2eed1e32c2ec0e7f686e1dcb71e90c558cb812 100644 (file)
@@ -12,7 +12,7 @@ image_type_to_mime_type()
        $result = array();
        $files  = array();
        while (($file = readdir($dir)) !== FALSE) {
-               if (preg_match('/^test.+pix\./',$file)) {
+               if (preg_match('/^test.+pix\./',$file) && $file != "test13pix.swf") {
                        $files[] = $file;
                }
        }
@@ -25,9 +25,7 @@ image_type_to_mime_type()
        var_dump($result);
 ?>
 --EXPECT--
-array(11) {
-  ["test13pix.swf"]=>
-  string(29) "application/x-shockwave-flash"
+array(10) {
   ["test1pix.bmp"]=>
   string(9) "image/bmp"
   ["test1pix.jpc"]=>
index 4c0cb3c6ba7d9aecd1e3e6b5338759b8475eac3f..827f10c17992a3940750dffb598e2d659f615c33 100644 (file)
@@ -2,7 +2,7 @@
 if (!defined('IMAGETYPE_GIF'))     die('skip images of type GIF not supported');
 if (!defined('IMAGETYPE_JPEG'))    die('skip images of type JPEG not supported');
 if (!defined('IMAGETYPE_PNG'))     die('skip images of type PNG not supported');
-//if (!defined('IMAGETYPE_SWF'))     die('skip images of type SWF not supported');
+if (!defined('IMAGETYPE_SWF'))     die('skip images of type SWF not supported');
 if (!defined('IMAGETYPE_PSD'))     die('skip images of type PSD not supported');
 if (!defined('IMAGETYPE_BMP'))     die('skip images of type BMP not supported');
 if (!defined('IMAGETYPE_TIFF_II')) die('skip images of type TIFF not supported');
@@ -11,6 +11,5 @@ if (!defined('IMAGETYPE_JPC'))     die('skip images of type JPC not supported');
 //if (!defined('IMAGETYPE_JP2'))     die('skip images of type JP2 not supported');
 //if (!defined('IMAGETYPE_JPX'))     die('skip images of type JPX not supported');
 //if (!defined('IMAGETYPE_JB2'))     die('skip images of type JB2 not supported');
-//if (!defined('IMAGETYPE_SWC'))     die('skip images of type SWC not supported');  // SWC requires zlib
 if (!defined('IMAGETYPE_IFF'))     die('skip images of type IFF not supported');
 ?>