Skip to content

Commit

Permalink
Adding some missing doc blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 8, 2010
1 parent 79c0011 commit f5cfc32
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 4 deletions.
55 changes: 51 additions & 4 deletions cake/tests/lib/cake_test_case.php
Expand Up @@ -389,38 +389,85 @@ private function __array_permute($items, $perms = array()) {
}
}

/**
* 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';
}
$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);
}
}
?>
5 changes: 5 additions & 0 deletions cake/tests/lib/test_manager.php
Expand Up @@ -414,6 +414,11 @@ protected function getTestSuite($name = '') {
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;
Expand Down

0 comments on commit f5cfc32

Please sign in to comment.