mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding sample.xml and changing the path in tests.
This commit is contained in:
parent
43d49095ae
commit
9725d12ccb
2 changed files with 11 additions and 2 deletions
|
@ -43,7 +43,7 @@ class XmlTest extends CakeTestCase {
|
|||
$xml = '<?xml version="1.0"?><tag>value</tag>';
|
||||
$this->assertEqual($obj, Xml::build($xml));
|
||||
|
||||
$xml = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'webroot' . DS . 'sample.xml';
|
||||
$xml = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'fixtures' . DS . 'sample.xml';
|
||||
$obj = Xml::build($xml);
|
||||
$this->assertEqual($obj->getName(), 'tags');
|
||||
$this->assertEqual(count($obj), 2);
|
||||
|
@ -246,7 +246,7 @@ class XmlTest extends CakeTestCase {
|
|||
$obj = Xml::build($xml);
|
||||
$this->assertEqual(Xml::toArray($obj), array('tag' => 'name'));
|
||||
|
||||
$xml = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'webroot' . DS . 'sample.xml';
|
||||
$xml = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'fixtures' . DS . 'sample.xml';
|
||||
$obj = Xml::build($xml);
|
||||
$expected = array(
|
||||
'tags' => array(
|
||||
|
|
9
cake/tests/fixtures/sample.xml
vendored
Normal file
9
cake/tests/fixtures/sample.xml
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0"?>
|
||||
<tags>
|
||||
<tag id="1">
|
||||
<name>defect</name>
|
||||
</tag>
|
||||
<tag id="2">
|
||||
<name>enhancement</name>
|
||||
</tag>
|
||||
</tags>
|
Loading…
Add table
Reference in a new issue