Skip to content
Permalink
Browse files

Adding sample.xml and changing the path in tests.

  • Loading branch information...
jrbasso committed Jul 27, 2010
1 parent 43d4909 commit 9725d12ccb7772965b04662fd826f7f9715ea205
Showing with 11 additions and 2 deletions.
  1. +2 −2 cake/tests/cases/libs/xml.test.php
  2. +9 −0 cake/tests/fixtures/sample.xml
@@ -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);
@@ -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(
@@ -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.
You can’t perform that action at this time.