mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
Use separate output files in xmlreader tests
This commit is contained in:
parent
26dfce7f36
commit
cf8a4b03dc
@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2
|
||||
// Set up test data in a new file
|
||||
$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<books><book num="1" idx="2">book1</book></books>';
|
||||
$filename = __DIR__ . '/_014.xml';
|
||||
$filename = __DIR__ . '/003-get-errors.xml';
|
||||
file_put_contents($filename, $xmlstring);
|
||||
|
||||
// Load test data into a new XML Reader
|
||||
@ -60,7 +60,7 @@ $reader->close();
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__.'/_014.xml');
|
||||
unlink(__DIR__.'/003-get-errors.xml');
|
||||
?>
|
||||
--EXPECTF--
|
||||
book
|
||||
|
@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2
|
||||
// Set up test data in a new file
|
||||
$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<books><book num="1" idx="2">book1</book></books>';
|
||||
$filename = __DIR__ . '/_014.xml';
|
||||
$filename = __DIR__ . '/003-move-errors.xml';
|
||||
file_put_contents($filename, $xmlstring);
|
||||
|
||||
// Load test data into a new XML Reader
|
||||
@ -59,7 +59,7 @@ $reader->close();
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__.'/_014.xml');
|
||||
unlink(__DIR__.'/003-move-errors.xml');
|
||||
?>
|
||||
--EXPECTF--
|
||||
book
|
||||
|
@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2
|
||||
// Set up test data in a new file
|
||||
$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<books xmlns:ns1="http://www.ns1.namespace.org/" xmlns:ns2="http://www.ns2.namespace.org/"><book ns1:num="1" ns2:idx="2" ns1:idx="3" ns2:isbn="4">book1</book></books>';
|
||||
$filename = __DIR__ . '/_014.xml';
|
||||
$filename = __DIR__ . '/015-get-errors.xml';
|
||||
file_put_contents($filename, $xmlstring);
|
||||
|
||||
// Load test data into a new XML Reader
|
||||
@ -40,7 +40,7 @@ $reader->close();
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__.'/_014.xml');
|
||||
unlink(__DIR__.'/015-get-errors.xml');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: XMLReader::getAttributeNs(): Attribute Name and Namespace URI cannot be empty in %s on line %d
|
||||
|
@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2
|
||||
// Set up test data in a new file
|
||||
$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<books xmlns:ns1="http://www.ns1.namespace.org/" xmlns:ns2="http://www.ns2.namespace.org/"><book ns1:num="1" ns2:idx="2" ns1:idx="3" ns2:isbn="4">book1</book></books>';
|
||||
$filename = __DIR__ . '/_014.xml';
|
||||
$filename = __DIR__ . '/015-move-errors.xml';
|
||||
file_put_contents($filename, $xmlstring);
|
||||
|
||||
// Load test data into a new XML Reader
|
||||
@ -35,7 +35,7 @@ $reader->close();
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__.'/_014.xml');
|
||||
unlink(__DIR__.'/015-move-errors.xml');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: XMLReader::moveToAttributeNs(): Attribute Name and Namespace URI cannot be empty in %s on line %d
|
||||
|
@ -9,7 +9,7 @@ Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2
|
||||
// Set up test data in a new file
|
||||
$xmlstring = '<?xml version="1.0" encoding="UTF-8"?>
|
||||
<books xmlns:ns1="http://www.ns1.namespace.org/" xmlns:ns2="http://www.ns2.namespace.org/"><book ns1:num="1" ns2:idx="2" ns1:idx="3" ns2:isbn="4">book1</book></books>';
|
||||
$filename = __DIR__ . '/_014.xml';
|
||||
$filename = __DIR__ . '/015.xml';
|
||||
file_put_contents($filename, $xmlstring);
|
||||
|
||||
// Load test data into a new XML Reader
|
||||
@ -55,7 +55,7 @@ $reader->close();
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__.'/_014.xml');
|
||||
unlink(__DIR__.'/015.xml');
|
||||
?>
|
||||
--EXPECT--
|
||||
ns1:idx: 3
|
||||
|
Loading…
Reference in New Issue
Block a user