object = new XmlForm_Field_Xmlform(); } /** * 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('XmlForm_Field_Xmlform'); $this->assertTrue( count($methods) == 26); } /** * @covers XmlForm_Field_Xmlform::XmlForm_Field_Xmlform * @todo Implement testXmlForm_Field_Xmlform(). */ public function testXmlForm_Field_Xmlform() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('XmlForm_Field_Xmlform', $methods ), 'exists method XmlForm_Field_Xmlform' ); $r = new ReflectionMethod('XmlForm_Field_Xmlform', 'XmlForm_Field_Xmlform'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'xmlnode'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue( $params[1]->getName() == 'language'); $this->assertTrue( $params[1]->isArray() == false); $this->assertTrue( $params[1]->isOptional () == false); $this->assertTrue( $params[2]->getName() == 'home'); $this->assertTrue( $params[2]->isArray() == false); $this->assertTrue( $params[2]->isOptional () == false); } /** * @covers XmlForm_Field_Xmlform::parseFile * @todo Implement testparseFile(). */ public function testparseFile() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('parseFile', $methods ), 'exists method parseFile' ); $r = new ReflectionMethod('XmlForm_Field_Xmlform', 'parseFile'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'home'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue( $params[1]->getName() == 'language'); $this->assertTrue( $params[1]->isArray() == false); $this->assertTrue( $params[1]->isOptional () == false); } /** * @covers XmlForm_Field_Xmlform::render * @todo Implement testrender(). */ public function testrender() { $methods = get_class_methods($this->object); $this->assertTrue( in_array('render', $methods ), 'exists method render' ); $r = new ReflectionMethod('XmlForm_Field_Xmlform', 'render'); $params = $r->getParameters(); $this->assertTrue( $params[0]->getName() == 'values'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); } }