mirror of
https://github.com/php/php-src.git
synced 2024-10-05 00:36:17 +00:00
4be7f4aecd
- com_dotnet gets a .cvsignore - Ulf will take care of mysql extensions, rest complete
33 lines
706 B
PHP
33 lines
706 B
PHP
--TEST--
|
|
DOMDocument::save Test basic function of save method
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipif.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$doc = new DOMDocument('1.0');
|
|
$doc->formatOutput = true;
|
|
|
|
$root = $doc->createElement('book');
|
|
|
|
$root = $doc->appendChild($root);
|
|
|
|
$title = $doc->createElement('title');
|
|
$title = $root->appendChild($title);
|
|
|
|
$text = $doc->createTextNode('This is the title');
|
|
$text = $title->appendChild($text);
|
|
|
|
$temp_filename = dirname(__FILE__)."/DomDocument_save_basic.tmp";
|
|
|
|
echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes
|
|
?>
|
|
--CLEAN--
|
|
<?php
|
|
$temp_filename = dirname(__FILE__)."/DomDocument_save_basic.tmp";
|
|
unlink($temp_filename);
|
|
?>
|
|
--EXPECT--
|
|
Wrote: 72 bytes
|