From aed2e72c11cccda54007beb8fb4bfb3dd866977a Mon Sep 17 00:00:00 2001 From: Hector Cortez Date: Fri, 13 Jul 2012 12:27:54 -0400 Subject: [PATCH 1/2] BUG 0000 Adjustment in te class classtaskExtendedPropertyTest.php - phpunit and phpcs tested in the class classtaskExtendedPropertyTest.php --- .../classes/classtaskExtendedPropertyTest.php | 57 ++++++++++--------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php b/tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php index 3cce70e04..da9cf59bb 100644 --- a/tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php +++ b/tests/automated/workflow/engine/classes/classtaskExtendedPropertyTest.php @@ -1,4 +1,5 @@ object = new taskExtendedProperty(); + $this->object = new taskExtendedProperty('sNamespace', 'sPage', 'sName', 'sIcon'); } /** * 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 + * This is the default method to test, if the class still having * the same number of methods. - */ + */ public function testNumberOfMethodsInThisClass() { - $methods = get_class_methods('taskExtendedProperty'); $this->assertTrue( count($methods) == 1); + $methods = get_class_methods('taskExtendedProperty'); + $this->assertTrue(count($methods) == 1); } /** - * @covers taskExtendedProperty::__construct - * @todo Implement test__construct(). - */ + * @covers taskExtendedProperty::__construct + * @todo Implement test__construct(). + */ public function test__construct() { $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); + $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); $r = new ReflectionMethod('taskExtendedProperty', '__construct'); $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sPage'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sIcon'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } + $this->assertTrue($params[0]->getName() == 'sNamespace'); + $this->assertTrue($params[0]->isArray() == false); + $this->assertTrue($params[0]->isOptional() == false); + $this->assertTrue($params[1]->getName() == 'sPage'); + $this->assertTrue($params[1]->isArray() == false); + $this->assertTrue($params[1]->isOptional() == false); + $this->assertTrue($params[2]->getName() == 'sName'); + $this->assertTrue($params[2]->isArray() == false); + $this->assertTrue($params[2]->isOptional() == false); + $this->assertTrue($params[3]->getName() == 'sIcon'); + $this->assertTrue($params[3]->isArray() == false); + $this->assertTrue($params[3]->isOptional() == false); + } +} - } From a456a7a41fef51e6d75279151fdc385286ae12c3 Mon Sep 17 00:00:00 2001 From: Hector Cortez Date: Fri, 13 Jul 2012 12:42:03 -0400 Subject: [PATCH 2/2] BUG 0000 Adjustment in te class classdashboardPageTest.php - phpunit and phpcs tested in the class classdashboardPageTest.php --- .../engine/classes/classdashboardPageTest.php | 57 ++++++++++--------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/tests/automated/workflow/engine/classes/classdashboardPageTest.php b/tests/automated/workflow/engine/classes/classdashboardPageTest.php index a8db69b16..605a1eabc 100644 --- a/tests/automated/workflow/engine/classes/classdashboardPageTest.php +++ b/tests/automated/workflow/engine/classes/classdashboardPageTest.php @@ -1,4 +1,5 @@ object = new dashboardPage(); + $this->object = new dashboardPage('sNamespace', 'sPage', 'sName', 'sIcon'); } /** * 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 + * This is the default method to test, if the class still having * the same number of methods. - */ + */ public function testNumberOfMethodsInThisClass() { - $methods = get_class_methods('dashboardPage'); $this->assertTrue( count($methods) == 1); + $methods = get_class_methods('dashboardPage'); + $this->assertTrue(count($methods) == 1); } /** - * @covers dashboardPage::__construct - * @todo Implement test__construct(). - */ + * @covers dashboardPage::__construct + * @todo Implement test__construct(). + */ public function test__construct() { $methods = get_class_methods($this->object); - $this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' ); + $this->assertTrue(in_array('__construct', $methods), 'exists method __construct'); $r = new ReflectionMethod('dashboardPage', '__construct'); $params = $r->getParameters(); - $this->assertTrue( $params[0]->getName() == 'sNamespace'); - $this->assertTrue( $params[0]->isArray() == false); - $this->assertTrue( $params[0]->isOptional () == false); - $this->assertTrue( $params[1]->getName() == 'sPage'); - $this->assertTrue( $params[1]->isArray() == false); - $this->assertTrue( $params[1]->isOptional () == false); - $this->assertTrue( $params[2]->getName() == 'sName'); - $this->assertTrue( $params[2]->isArray() == false); - $this->assertTrue( $params[2]->isOptional () == false); - $this->assertTrue( $params[3]->getName() == 'sIcon'); - $this->assertTrue( $params[3]->isArray() == false); - $this->assertTrue( $params[3]->isOptional () == false); - } + $this->assertTrue($params[0]->getName() == 'sNamespace'); + $this->assertTrue($params[0]->isArray() == false); + $this->assertTrue($params[0]->isOptional() == false); + $this->assertTrue($params[1]->getName() == 'sPage'); + $this->assertTrue($params[1]->isArray() == false); + $this->assertTrue($params[1]->isOptional() == false); + $this->assertTrue($params[2]->getName() == 'sName'); + $this->assertTrue($params[2]->isArray() == false); + $this->assertTrue($params[2]->isOptional() == false); + $this->assertTrue($params[3]->getName() == 'sIcon'); + $this->assertTrue($params[3]->isArray() == false); + $this->assertTrue($params[3]->isOptional() == false); + } +} - }