1--TEST--
2DOMDocument::saveHTMLFile() should fail with invalid filename
3--CREDITS--
4Knut Urdalen <knut@php.net>
5#PHPTestFest2009 Norway 2009-06-09 \o/
6--SKIPIF--
7<?php
8require_once __DIR__ .'/skipif.inc';
9?>
10--FILE--
11<?php
12$filename = null;
13$doc = new DOMDocument('1.0');
14$root = $doc->createElement('html');
15$root = $doc->appendChild($root);
16$head = $doc->createElement('head');
17$head = $root->appendChild($head);
18$title = $doc->createElement('title');
19$title = $head->appendChild($title);
20$text = $doc->createTextNode('This is the title');
21$text = $title->appendChild($text);
22try {
23    $doc->saveHTMLFile($filename);
24} catch (ValueError $exception) {
25    echo $exception->getMessage() . "\n";
26}
27?>
28--EXPECT--
29DOMDocument::saveHTMLFile(): Argument #1 ($filename) must not be empty
30