Commit d4d51869 authored by Olivier Lequeux's avatar Olivier Lequeux
Browse files

fix all tests suite

parent da78a05f
......@@ -30,12 +30,6 @@ class Entries extends \ArrayObject implements IEntries
}
}
public function __construct()
{
$this->useLavoisierXMLNS = true;
}
public function init()
{
}
......@@ -79,9 +73,9 @@ class Entries extends \ArrayObject implements IEntries
static protected function convertToEntries($data , $useLavoisierXMLNS = true)
{
$xml = sprintf('<e:entries xmlns:e="%s">', self::getXMLNS($useLavoisierXMLNS));
$xml = sprintf('<e:entries xmlns:e="%s">', self::getXMLNS($useLavoisierXMLNS));
foreach ($data as $key => $entry) {
if (is_array($entry)) {
if (is_array($entry)) {
$xml .= self::convertToEntries($entry);
} else {
$xml .= '<e:entry key ="' . $key . '">' . $entry . '</e:entry>';
......
......@@ -2,7 +2,6 @@
namespace Lavoisier\Hydrators;
use Lavoisier\Hydrators\EntriesHydrator;
class EntriesHydratorTest extends \PHPUnit_Framework_TestCase
......
......@@ -29,7 +29,6 @@ class EntriesTest extends \PHPUnit_Framework_TestCase
$ouput_obtained = $lh->asXmlEntries();
$this->assertXmlStringEqualsXmlString($output_expected, $ouput_obtained);
}
......@@ -44,4 +43,11 @@ class EntriesTest extends \PHPUnit_Framework_TestCase
}
public function getXMLNStest()
{
$this->assertEquals("http://software.in2p3.fr/lavoisier/entries.xsd", Entries::getXMLNS());
$this->assertEquals("https://gitlab.in2p3.fr/opsportal/lavoisiercli/raw/master/resources/ex_entries.xsd", Entries::getXMLNS(true));
}
}
\ 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