Adding some missing doc blocks

This commit is contained in:
José Lorenzo Rodríguez 2010-05-08 17:29:33 -04:30
parent 79c001197d
commit f5cfc325f8
2 changed files with 56 additions and 4 deletions

View file

@ -389,22 +389,57 @@ class CakeTestCase extends PHPUnit_Framework_TestCase {
}
}
/**
* Compatibility wrapper function for assertEquals
* @param mixed $a
* @param mixed $b
* @param string $message the text to display if the assertion is not correct
* @return void
*/
protected function assertEqual($a, $b, $message = '') {
return $this->assertEquals($a, $b, $message);
}
/**
* Compatibility wrapper function for assertNotEquals
* @param mixed $a
* @param mixed $b
* @param string $message the text to display if the assertion is not correct
* @return void
*/
protected function assertNotEqual($a, $b, $message = '') {
return $this->assertNotEquals($a, $b, $message);
}
/**
* Compatibility wrapper function for assertRegexp
* @param mixed $pattern a regular expression
* @param string $string the text to be matched
* @param string $message the text to display if the assertion is not correct
* @return void
*/
protected function assertPattern($pattern, $string, $message = '') {
return $this->assertRegExp($pattern, $string, $message);
}
/**
* Compatibility wrapper function for assertSame
* @param mixed $expected
* @param mixed $actual
* @param string $message the text to display if the assertion is not correct
* @return void
*/
protected function assertIdentical($expected, $actual, $message = '') {
return $this->assertSame($expected, $actual, $message);
}
/**
* Compatibility wrapper function for assertNotRegExp
* @param mixed $pattern a regular expression
* @param string $string the text to be matched
* @param string $message the text to display if the assertion is not correct
* @return void
*/
protected function assertNoPattern($pattern, $string, $message = '') {
return $this->assertNotRegExp($pattern, $string, $message);
}
@ -412,6 +447,12 @@ class CakeTestCase extends PHPUnit_Framework_TestCase {
protected function assertNoErrors() {
}
/**
* Compatibility wrapper function for setExpectedException
* @param mixed $expected the name of the Exception or error
* @param string $message the text to display if the assertion is not correct
* @return void
*/
protected function expectError($expected = false, $message = '') {
if (!$expected) {
$expected = 'Exception';
@ -419,8 +460,14 @@ class CakeTestCase extends PHPUnit_Framework_TestCase {
$this->setExpectedException($expected, $message);
}
protected function expectException($name = null) {
$this->setExpectedException($name);
/**
* Compatibility wrapper function for setExpectedException
* @param mixed $expected the name of the Exception
* @param string $message the text to display if the assertion is not correct
* @return void
*/
protected function expectException($name = null, $message = '') {
$this->setExpectedException($name, $message);
}
}
?>

View file

@ -414,6 +414,11 @@ class TestManager {
return $this->_testSuite = new CakeTestSuite($name);
}
/**
* Get an instance of a Fixture manager to be used by the test cases
*
* @return CakeFixtureManager fixture manager
*/
protected function getFixtureManager() {
if (!empty($this->_fixtureManager)) {
return $this->_fixtureManager;