Skip to content

Commit

Permalink
Adding sample.xml and changing the path in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Jul 27, 2010
1 parent 43d4909 commit 9725d12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cake/tests/cases/libs/xml.test.php
Expand Up @@ -43,7 +43,7 @@ function testBuild() {
$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);
Expand Down Expand Up @@ -246,7 +246,7 @@ function testToArray() {
$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(
Expand Down
9 changes: 9 additions & 0 deletions cake/tests/fixtures/sample.xml
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<tags>
<tag id="1">
<name>defect</name>
</tag>
<tag id="2">
<name>enhancement</name>
</tag>
</tags>

0 comments on commit 9725d12

Please sign in to comment.