Annotation of embedaddon/php/ext/standard/tests/image/getimagesize_jpgapp.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test getimagesize() function : basic functionality - load APP info from jpeg.
                      3: --SKIPIF--
                      4: <?php
                      5:        if (!defined("IMAGETYPE_JPEG")) {
                      6:                die("skip jpeg format is not available");
                      7:        }
                      8: ?>
                      9: --FILE--
                     10: <?php
                     11: /* Prototype  : proto array getimagesize(string imagefile [, array info])
                     12:  * Description: Get the size of an image as 4-element array 
                     13:  * Source code: ext/standard/image.c
                     14:  * Alias to functions: 
                     15:  */
                     16: 
                     17: /*
                     18:  * Load APP info from jpeg
                     19:  */
                     20: 
                     21: $arr['this'] = "will";
                     22: $arr['all'] = "be destroyed!";
                     23: $arr['APP1'] = "and this too";
                     24: 
                     25: getimagesize( dirname(__FILE__)."/testAPP.jpg", $arr);
                     26: 
                     27: foreach ($arr as $key => $value) {
                     28:        echo "$key - length: ". strlen($value) ."; md5: " . md5($value) .  "\n" ;
                     29: }
                     30: 
                     31: ?>
                     32: ===DONE===
                     33: --EXPECTF--
                     34: APP1 - length: 1717; md5: 02cbf4ba6640c131422483138c968516
                     35: APP2 - length: 7275; md5: f5036ccca2031e8bf932bcbd4aca4355
                     36: APP13 - length: 42; md5: 2202998bd05e78bcb419f08c070d6f61
                     37: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>