diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php index 5c1a19c94..fff3bd6ab 100644 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php +++ b/tests/automated/workflow/engine/classes/classXmlForm_Field_TextareaPMTest.php @@ -26,7 +26,10 @@ class classXmlForm_Field_TextareaPMTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $this->object = new XmlForm_Field_TextareaPM(); + $attributes = array("type" => "input"); + $xmlNode = new Xml_Node("node1", "type1", "value1", $attributes); + + $this->object = new XmlForm_Field_TextareaPM($xmlNode); } /** @@ -38,12 +41,13 @@ class classXmlForm_Field_TextareaPMTest extends PHPUnit_Framework_TestCase } /** - * This is the default method to test, if the class still having + * 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_TextareaPM'); $this->assertTrue( count($methods) == 24); + $methods = get_class_methods('XmlForm_Field_TextareaPM'); + $this->assertTrue(count($methods) == 24); } /** @@ -62,7 +66,7 @@ class classXmlForm_Field_TextareaPMTest extends PHPUnit_Framework_TestCase $this->assertTrue( $params[1]->getName() == 'owner'); $this->assertTrue( $params[1]->isArray() == false); $this->assertTrue( $params[1]->isOptional () == false); - } + } /** * @covers XmlForm_Field_TextareaPM::renderGrid @@ -73,13 +77,14 @@ class classXmlForm_Field_TextareaPMTest extends PHPUnit_Framework_TestCase $methods = get_class_methods($this->object); $this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' ); $r = new ReflectionMethod('XmlForm_Field_TextareaPM', 'renderGrid'); - $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'values'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'owner'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - } - } + $params = $r->getParameters(); + $this->assertTrue($params[0]->getName() == 'values'); + $this->assertTrue($params[0]->isArray() == false); + $this->assertTrue($params[0]->isOptional () == false); + $this->assertTrue($params[1]->getName() == 'owner'); + $this->assertTrue($params[1]->isArray() == false); + $this->assertTrue($params[1]->isOptional () == false); + } +} +