From f5cfc325f8660bcf83cfa7dd742fe37346cac829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Sat, 8 May 2010 17:29:33 -0430 Subject: [PATCH] Adding some missing doc blocks --- cake/tests/lib/cake_test_case.php | 55 ++++++++++++++++++++++++++++--- cake/tests/lib/test_manager.php | 5 +++ 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/cake/tests/lib/cake_test_case.php b/cake/tests/lib/cake_test_case.php index e35350383..e577581f5 100644 --- a/cake/tests/lib/cake_test_case.php +++ b/cake/tests/lib/cake_test_case.php @@ -389,29 +389,70 @@ 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); } 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); } } ?> \ No newline at end of file diff --git a/cake/tests/lib/test_manager.php b/cake/tests/lib/test_manager.php index 496e9be93..749bd8cce 100644 --- a/cake/tests/lib/test_manager.php +++ b/cake/tests/lib/test_manager.php @@ -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;