BUG 0000 "PHPUNIT instantiation classwsResponseTest.php" SOLVED

- Instantiation of the class
- Formatting file to PSR2
This commit is contained in:
Victor Saisa Lopez
2012-07-13 18:40:15 -04:00
parent f43d5fe6f1
commit 06809e2e96

View File

@@ -26,7 +26,7 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new wsResponse();
$this->object = new wsResponse(0, null);
}
/**
@@ -38,12 +38,13 @@ class classwsResponseTest 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('wsResponse'); $this->assertTrue( count($methods) == 3);
$methods = get_class_methods('wsResponse');
$this->assertTrue(count($methods) == 3);
}
/**
@@ -62,7 +63,7 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'message');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers wsResponse::getPayloadString
@@ -77,7 +78,7 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'operation');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers wsResponse::getPayloadArray
@@ -89,6 +90,6 @@ class classwsResponseTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('getPayloadArray', $methods ), 'exists method getPayloadArray' );
$r = new ReflectionMethod('wsResponse', 'getPayloadArray');
$params = $r->getParameters();
}
}
}
}