]> granicus.if.org Git - php/commitdiff
fix tests
authorRob Richards <rrichards@php.net>
Sat, 6 Aug 2005 18:23:40 +0000 (18:23 +0000)
committerRob Richards <rrichards@php.net>
Sat, 6 Aug 2005 18:23:40 +0000 (18:23 +0000)
ext/xmlwriter/tests/001.phpt
ext/xmlwriter/tests/002.phpt
ext/xmlwriter/tests/003.phpt
ext/xmlwriter/tests/004.phpt
ext/xmlwriter/tests/005.phpt
ext/xmlwriter/tests/OO_001.phpt
ext/xmlwriter/tests/OO_002.phpt
ext/xmlwriter/tests/OO_003.phpt
ext/xmlwriter/tests/OO_004.phpt
ext/xmlwriter/tests/OO_005.phpt

index d26096ed1f68dda4c067c2afbddc0e402f28244b..a9349d2d16c6514e480554197d87008224481dd4 100644 (file)
@@ -8,17 +8,18 @@ XMLWriter: libxml2 XML Writer, file buffer, flush
 
 $doc_dest = '001.xml';
 $xw = xmlwriter_open_uri($doc_dest);
-xmlwriter_start_document($xw, '1.0', 'utf8');
+xmlwriter_start_document($xw, '1.0', 'UTF-8');
 xmlwriter_start_element($xw, "tag1");
 xmlwriter_end_document($xw);
 
 // Force to write and empty the buffer
 $output_bytes = xmlwriter_flush($xw, true);
 echo file_get_contents($doc_dest);
+unset($xw);
 unlink('001.xml');
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <tag1/>
 ===DONE===
index 1d769a5c22522def16f97102f51926f6582a8f6d..f2537a47ff7dd6cf203ed8b90326e1a11a162f5c 100644 (file)
@@ -8,7 +8,7 @@ XMLWriter: libxml2 XML Writer, membuffer, flush
 
 $doc_dest = '001.xml';
 $xw = xmlwriter_open_memory($doc_dest);
-xmlwriter_start_document($xw, '1.0', 'utf8');
+xmlwriter_start_document($xw, '1.0', 'UTF-8');
 xmlwriter_start_element($xw, "tag1");
 xmlwriter_end_document($xw);
 
@@ -17,6 +17,6 @@ echo xmlwriter_flush($xw, true);
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <tag1/>
 ===DONE===
index 2ab3a9d776ffaa99c6dcda9b358756ddea4af331..5415797864e7048a6ff552220d60d361484848a0 100644 (file)
@@ -8,7 +8,7 @@ XMLWriter: libxml2 XML Writer, membuffer, flush, attribute
 
 $doc_dest = '001.xml';
 $xw = xmlwriter_open_memory($doc_dest);
-xmlwriter_start_document($xw, '1.0', 'utf8');
+xmlwriter_start_document($xw, '1.0', 'UTF-8');
 xmlwriter_start_element($xw, "tag1");
 
 
@@ -30,6 +30,6 @@ echo xmlwriter_flush($xw, true);
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <tag1 attr1="attr1_value" att2="att2_value">Test text for tag1<tag2/></tag1>
 ===DONE===
index 13e471da9d2a28c3cbae2a2e18e0dad8ebec8a6a..2d3e8587256a36c5c20e5b36d4c8190132f91383 100644 (file)
@@ -8,7 +8,7 @@ XMLWriter: libxml2 XML Writer, file buffer, flush
 
 $doc_dest = '001.xml';
 $xw = xmlwriter_open_uri($doc_dest);
-xmlwriter_start_document($xw, '1.0', 'utf8');
+xmlwriter_start_document($xw, '1.0', 'UTF-8');
 xmlwriter_start_element($xw, "tag1");
 
 xmlwriter_start_pi($xw, "PHP");
@@ -19,9 +19,10 @@ xmlwriter_end_document($xw);
 // Force to write and empty the buffer
 $output_bytes = xmlwriter_flush($xw, true);
 $md5_out = md5_file($doc_dest);
-$md5_res = md5('<?xml version="1.0" encoding="utf8"?>
+$md5_res = md5('<?xml version="1.0" encoding="UTF-8"?>
 <tag1><?PHP echo $a;?></tag1>
 ');
+unset($xw);
 unlink('001.xml');
 if ($md5_out != $md5_res) {
        echo "failed: $md5_res != $md5_out\n";
index 6874c5d2c3c7d20b335fc62473ceec331bb50db7..ab933c6f564b9d9882f6c7d03dc4a462e57105da 100644 (file)
@@ -11,7 +11,7 @@ if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ requi
 
 $doc_dest = '001.xml';
 $xw = xmlwriter_open_uri($doc_dest);
-xmlwriter_start_document($xw, '1.0', 'utf8');
+xmlwriter_start_document($xw, '1.0', 'UTF-8');
 xmlwriter_start_element($xw, "tag1");
 
 xmlwriter_start_comment($xw);
@@ -23,10 +23,11 @@ xmlwriter_end_document($xw);
 // Force to write and empty the buffer
 $output_bytes = xmlwriter_flush($xw, true);
 echo file_get_contents($doc_dest);
+unset($xw);
 unlink('001.xml');
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <tag1><!--comment--><!--comment #2--></tag1>
 ===DONE===
index 333a16a41cb22d919371f0f8bbd21a11a54fcbb4..be448b9c65bb3ad4f20cf3f284d36046ad6c72a6 100644 (file)
@@ -9,17 +9,18 @@ XMLWriter: libxml2 XML Writer, file buffer, flush
 $doc_dest = '001.xml';
 $xw = new XMLWriter();
 $xw->openUri($doc_dest);
-$xw->startDocument('1.0', 'utf8', 'standalonearg');
+$xw->startDocument('1.0', 'UTF-8', 'standalonearg');
 $xw->startElement("tag1");
 $xw->endDocument();
 
 // Force to write and empty the buffer
 $output_bytes = $xw->flush(true);
 echo file_get_contents($doc_dest);
+unset($xw);
 unlink('001.xml');
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8" standalone="standalonearg"?>
+<?xml version="1.0" encoding="UTF-8" standalone="standalonearg"?>
 <tag1/>
 ===DONE===
index 515ebbb35960af832a95861797796a1eadd01d05..ec605f50a4ab994269f828c5d486adab8269aeeb 100644 (file)
@@ -8,7 +8,7 @@ XMLWriter: libxml2 XML Writer, membuffer, flush
 
 $xw = new XMLWriter();
 $xw->openMemory();
-$xw->startDocument('1.0', 'utf8', 'standalone');
+$xw->startDocument('1.0', 'UTF-8', 'standalone');
 $xw->startElement("tag1");
 $xw->endDocument();
 
@@ -17,6 +17,6 @@ echo $xw->flush(true);
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8" standalone="standalone"?>
+<?xml version="1.0" encoding="UTF-8" standalone="standalone"?>
 <tag1/>
 ===DONE===
index c0e5585fc6ecef9e38a163806b6592611f32244d..7fb47910f0f929035a19774884e37b1cdec8329a 100644 (file)
@@ -8,7 +8,7 @@ XMLWriter: libxml2 XML Writer, membuffer, flush, text, attribute
 
 $xw = new XMLWriter();
 $xw->openMemory();
-$xw->startDocument('1.0', 'utf8');
+$xw->startDocument('1.0', 'UTF-8');
 $xw->startElement("tag1");
 
 $res = $xw->startAttribute('attr1');
@@ -32,6 +32,6 @@ echo $xw->flush(true);
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <tag1 attr1="attr1_value" attr2="attr2_value">Test text for tag1<tag2/></tag1>
 ===DONE===
index 0effec37b8ca772a9b0bfcc2e97b68f639e63685..08b423ccef29dbc99f91389049b1424be9747dd5 100644 (file)
@@ -9,7 +9,7 @@ XMLWriter: libxml2 XML Writer, file buffer, flush
 $doc_dest = '001.xml';
 $xw = new XMLWriter();
 $xw->openUri($doc_dest);
-$xw->startDocument('1.0', 'utf8');
+$xw->startDocument('1.0', 'UTF-8');
 $xw->startElement("tag1");
 
 $xw->startPi("PHP");
@@ -20,9 +20,10 @@ $xw->endDocument();
 // Force to write and empty the buffer
 $xw->flush(true);
 $md5_out = md5_file($doc_dest);
-$md5_res = md5('<?xml version="1.0" encoding="utf8"?>
+$md5_res = md5('<?xml version="1.0" encoding="UTF-8"?>
 <tag1><?PHP echo $a;?></tag1>
 ');
+unset($xw);
 unlink('001.xml');
 if ($md5_out != $md5_res) {
        echo "failed: $md5_res != $md5_out\n";
index 8037fc62f19c4bdc354109caffc235dfce35145a..2c6d2f43339ec58485bf045abdd9a6c6b9397486 100644 (file)
@@ -12,7 +12,7 @@ if (!function_exists("xmlwriter_start_comment")) die("skip: libxml2 2.6.7+ requi
 $doc_dest = '001.xml';
 $xw = new XMLWriter();
 $xw->openUri($doc_dest);
-$xw->startDocument('1.0', 'utf8');
+$xw->startDocument('1.0', 'UTF-8');
 $xw->startElement("tag1");
 $xw->startComment();
 $xw->text('comment');
@@ -23,10 +23,11 @@ $xw->endDocument();
 // Force to write and empty the buffer
 $output_bytes = $xw->flush(true);
 echo file_get_contents($doc_dest);
+unset($xw);
 unlink('001.xml');
 ?>
 ===DONE===
 --EXPECT--
-<?xml version="1.0" encoding="utf8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <tag1><!--comment--><!--comment #2--></tag1>
 ===DONE===