Use separate output files in xmlreader tests

This commit is contained in:
Fabien Villepinte 2019-03-15 21:46:35 +01:00 committed by Peter Kokot
parent 26dfce7f36
commit cf8a4b03dc
5 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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