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