object = new Xml_document(); } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. */ protected function tearDown() { } /** * This is the default method to test, if the class still having * the same number of methods. */ public function testNumberOfMethodsInThisClass() { $methods = get_class_methods('Xml_document'); $this->assertTrue( count($methods) == 11); } /** * @covers Xml_document::Xml_document * @todo Implement testXml_document(). */ public function testXml_document() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('Xml_document', $methods ), 'exists method Xml_document' ); $r = new ReflectionMethod('Xml_document', 'Xml_document'); $params = $r->getParameters(); } /** * @covers Xml_document::parseXmlFile * @todo Implement testparseXmlFile(). */ public function testparseXmlFile() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('parseXmlFile', $methods ), 'exists method parseXmlFile' ); $r = new ReflectionMethod('Xml_document', 'parseXmlFile'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'filename'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue( $params[1]->getName() == 'content'); $this->assertTrue( $params[1]->isArray() == false); $this->assertTrue( $params[1]->isOptional () == true); $this->assertTrue( $params[1]->getDefaultValue() == ''); } /** * @covers Xml_document::findNode * @todo Implement testfindNode(). */ public function testfindNode() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('findNode', $methods ), 'exists method findNode' ); $r = new ReflectionMethod('Xml_document', 'findNode'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'xpath'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); } /** * @covers Xml_document::getXML * @todo Implement testgetXML(). */ public function testgetXML() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('getXML', $methods ), 'exists method getXML' ); $r = new ReflectionMethod('Xml_document', 'getXML'); $params = $r->getParameters(); } /** * @covers Xml_document::save * @todo Implement testsave(). */ public function testsave() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('save', $methods ), 'exists method save' ); $r = new ReflectionMethod('Xml_document', 'save'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'filename'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); } }