public function testXSDMustBeConvertedToXML() { $xml = $this->tclass->getXML(); $actual = $xml->saveXml(); //file_put_contents($this->expectedDir.'/ParsedSchema.xml', $xml->saveXml()); $expected = file_get_contents($this->expectedDir . '/ParsedSchema.xml'); $this->assertEquals($expected, $actual); }
public function testContactCompany() { $expPath = dirname(__FILE__) . '/data/expected/ContactCompany/'; $genPath = dirname(__FILE__) . '/data/generated/ContactCompany/'; $this->tclass = new xsd2php\Xsd2Php("../resources/ContactCompany/ContactCompany.xsd"); $xml = $this->tclass->getXML(); //file_put_contents($expPath.'generated.xml', $xml->saveXml()); $expectedXml = file_get_contents($expPath . 'generated.xml'); $this->assertEquals($expectedXml, $xml->saveXml()); if (file_exists($genPath)) { rmdir_recursive(realpath($genPath)); } $this->tclass->saveClasses($genPath, true); //$cp = new ContactCompany\ContactCompany(); //$id = new CommonBasicComponents_2\ID(); if (file_exists($genPath)) { rmdir_recursive(realpath($genPath)); } }