imageantialias_error2.phpt 604 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Testing wrong parameter passing in imageantialias() of GD library
  3. --CREDITS--
  4. Guilherme Blanco <guilhermeblanco [at] hotmail [dot] com>
  5. #testfest PHPSP on 2009-06-20
  6. --SKIPIF--
  7. <?php
  8. if (!extension_loaded("gd")) die("skip GD not present");
  9. if (!GD_BUNDLED) die("skip requires bundled GD library\n");
  10. ?>
  11. --FILE--
  12. <?php
  13. /*
  14. It seems the second argument passing is not being correclty checked.
  15. This test is failing due to this wrogn check
  16. */
  17. $image = imagecreatetruecolor(180, 30);
  18. var_dump(imageantialias($image, 'wrong param')); // 'wrogn param' is converted to true
  19. ?>
  20. --EXPECTF--
  21. bool(true)