getOptByType( simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type'], ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Textarea', $element); } public function testIfCorrectAttributes() { $parser = new Parser(null, null, null); $obj = $parser->getOptByType( simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type'], ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Textarea', $element); $this->assertEquals('testtext', $element->getDefault()); $this->assertEquals('t60', $element->getId()); $this->assertEquals('', $element->getName()); } }