Commit 88c34f1f authored by Olivier Lequeux's avatar Olivier Lequeux
Browse files

add simpleXMLHydrator test

parent d4d51869
......@@ -2,7 +2,7 @@
namespace Lavoisier\Hydrators;
use \Lavoisier\IHydrator;
use \Lavoisier\Hydrators\IHydrator;
class SimpleXMLHydrator implements IHydrator
{
......
......@@ -3,7 +3,6 @@
namespace Lavoisier\Hydrators;
class EntriesHydratorTest extends \PHPUnit_Framework_TestCase
{
public function testHydrate()
......
<?php
/**
* Created by PhpStorm.
* User: olequeux
* Date: 14/10/14
* Time: 19:26
*/
class SimpleXMLHydratorTest extends PHPUnit_Framework_TestCase
{
public function testGlobal()
{
$input = <<<EOF
<root>
<child1 foo="bar">1st child text node</child1>
<child2 foo="bar">2nd child text node</child2>
</root>
EOF;
$lh = new \Lavoisier\Hydrators\SimpleXMLHydrator();
$simpleXMLObj = $lh->hydrate($input);
$this->assertEquals($simpleXMLObj->child1, '1st child text node');
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment