Adding sample.xml and changing the path in tests.

This commit is contained in:
Juan Basso 2010-07-26 23:16:23 -03:00
parent 43d49095ae
commit 9725d12ccb
2 changed files with 11 additions and 2 deletions

View file

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