readgzfile_variation3.phpt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --TEST--
  2. Test function readgzfile() by substituting argument 1 with emptyUnsetUndefNull values.
  3. --SKIPIF--
  4. <?php
  5. if (!extension_loaded('zlib')) die ('skip zlib extension not available in this build');
  6. ?>
  7. --FILE--
  8. <?php
  9. $use_include_path = false;
  10. $unset_var = 10;
  11. unset($unset_var);
  12. $variation = array(
  13. 'unset var' => @$unset_var,
  14. 'undefined var' => @$undefined_var,
  15. 'empty string DQ' => "",
  16. 'empty string SQ' => '',
  17. 'uppercase NULL' => NULL,
  18. 'lowercase null' => null,
  19. );
  20. foreach ( $variation as $var ) {
  21. var_dump(readgzfile( $var , $use_include_path ) );
  22. }
  23. ?>
  24. ===DONE===
  25. --EXPECTF--
  26. Warning: readgzfile(): Filename cannot be empty in %s on line %d
  27. bool(false)
  28. Warning: readgzfile(): Filename cannot be empty in %s on line %d
  29. bool(false)
  30. Warning: readgzfile(): Filename cannot be empty in %s on line %d
  31. bool(false)
  32. Warning: readgzfile(): Filename cannot be empty in %s on line %d
  33. bool(false)
  34. Warning: readgzfile(): Filename cannot be empty in %s on line %d
  35. bool(false)
  36. Warning: readgzfile(): Filename cannot be empty in %s on line %d
  37. bool(false)
  38. ===DONE===