From 9de427a4e3960124d58da2c164a5ecb62844dbfa Mon Sep 17 00:00:00 2001 From: Victor Saisa Lopez Date: Fri, 13 Jul 2012 11:29:57 -0400 Subject: [PATCH] BUG 0000 "PHPUNIT instantiation classXmlForm_Field_TextPMTest.php" SOLVED - Instantiation of the class - Formatting file to PSR2 --- .../classes/classXmlForm_Field_TextPMTest.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php b/tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php index aeb2eb480..f3bd9c213 100644 --- a/tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php +++ b/tests/automated/workflow/engine/classes/classXmlForm_Field_TextPMTest.php @@ -26,7 +26,10 @@ class classXmlForm_Field_TextPMTest extends PHPUnit_Framework_TestCase */ 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); } /** @@ -38,12 +41,13 @@ class classXmlForm_Field_TextPMTest 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_TextPM'); $this->assertTrue( count($methods) == 24); + $methods = get_class_methods('XmlForm_Field_TextPM'); + $this->assertTrue(count($methods) == 24); } /** @@ -64,7 +68,7 @@ class classXmlForm_Field_TextPMTest extends PHPUnit_Framework_TestCase $this->assertTrue( $params[1]->isArray() == false); $this->assertTrue( $params[1]->isOptional () == true); $this->assertTrue( $params[1]->getDefaultValue() == ''); - } + } /** * @covers XmlForm_Field_TextPM::renderGrid @@ -82,7 +86,7 @@ class classXmlForm_Field_TextPMTest 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_TextPM::attachEvents @@ -97,6 +101,6 @@ class classXmlForm_Field_TextPMTest extends PHPUnit_Framework_TestCase $this->assertTrue( $params[0]->getName() == 'element'); $this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isOptional () == false); - } + } +} - }