BUG 0000 "PHPUNIT instantiation classXmlForm_Field_TextPMTest.php" SOLVED

- Instantiation of the class
- Formatting file to PSR2
This commit is contained in:
Victor Saisa Lopez
2012-07-13 11:29:57 -04:00
parent a9b7dbff69
commit 9de427a4e3

View File

@@ -26,7 +26,10 @@ class classXmlForm_Field_TextPMTest extends PHPUnit_Framework_TestCase
*/ */
protected function setUp() protected function setUp()
{ {
$this->object = new XmlForm_Field_TextPM(); $attributes = array("type" => "input");
$xmlNode = new Xml_Node("node1", "type1", "value1", $attributes);
$this->object = new XmlForm_Field_TextPM($xmlNode);
} }
/** /**
@@ -43,7 +46,8 @@ class classXmlForm_Field_TextPMTest extends PHPUnit_Framework_TestCase
*/ */
public function testNumberOfMethodsInThisClass() public function testNumberOfMethodsInThisClass()
{ {
$methods = get_class_methods('XmlForm_Field_TextPM'); $this->assertTrue( count($methods) == 24); $methods = get_class_methods('XmlForm_Field_TextPM');
$this->assertTrue(count($methods) == 24);
} }
/** /**
@@ -98,5 +102,5 @@ class classXmlForm_Field_TextPMTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue( $params[0]->isOptional () == false);
} }
} }