Annotation of embedaddon/php/ext/gd/tests/imagecolorclosesthwb.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: imagecolorclosesthwb() test
        !             3: --SKIPIF--
        !             4: <?php
        !             5:        if(!extension_loaded('gd')){ die('skip: gd extension not available'); }
        !             6:        if(!function_exists('imagecolorclosesthwb')){ die('skip: imagecolorclosesthwb() not available'); }
        !             7: ?>
        !             8: --FILE--
        !             9: <?php
        !            10:        $im = imagecreatefrompng(dirname(__FILE__).'/test.png');
        !            11: 
        !            12:        var_dump(imagecolorclosesthwb($im, 255, 50, 0));
        !            13: 
        !            14:        var_dump(imagecolorclosesthwb(NULL));
        !            15:        var_dump(imagecolorclosesthwb(NULL, NULL, NULL, NULL));
        !            16:        var_dump(imagecolorclosesthwb($im, "hello", "from", "gd"));
        !            17: 
        !            18:        imagedestroy($im);
        !            19: ?>
        !            20: --EXPECTF--
        !            21: int(16724480)
        !            22: 
        !            23: Warning: imagecolorclosesthwb() expects exactly 4 parameters, 1 given in %s on line %d
        !            24: NULL
        !            25: 
        !            26: Warning: imagecolorclosesthwb() expects parameter 1 to be resource, null given in %s on line %d
        !            27: NULL
        !            28: 
        !            29: Warning: imagecolorclosesthwb() expects parameter 2 to be long, string given in %s on line %d
        !            30: NULL

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