You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
681 B

  1. --TEST--
  2. DOMDocument::saveHTMLFile() should fail if no parameter is given
  3. --CREDITS--
  4. Knut Urdalen <knut@php.net>
  5. #PHPTestFest2009 Norway 2009-06-09 \o/
  6. --SKIPIF--
  7. <?php
  8. require_once('skipif.inc');
  9. ?>
  10. --FILE--
  11. <?php
  12. $doc = new DOMDocument('1.0');
  13. $root = $doc->createElement('html');
  14. $root = $doc->appendChild($root);
  15. $head = $doc->createElement('head');
  16. $head = $root->appendChild($head);
  17. $title = $doc->createElement('title');
  18. $title = $head->appendChild($title);
  19. $text = $doc->createTextNode('This is the title');
  20. $text = $title->appendChild($text);
  21. $doc->saveHTMLFile();
  22. ?>
  23. --EXPECTF--
  24. Warning: DOMDocument::saveHTMLFile() expects exactly 1 parameter, 0 given in %s on line %d