MDL-35479 document unit test debugging() changes

This commit is contained in:
Petr Škoda
2012-09-17 13:00:36 +02:00
parent a3b6e311b8
commit 94c9db5493
3 changed files with 17 additions and 6 deletions
@@ -136,7 +136,7 @@ abstract class database_driver_testcase extends PHPUnit_Framework_TestCase {
/**
* Return debugging messages from the current test.
* @return array
* @return array with instances having 'message', 'level' and 'stacktrace' property.
*/
public function getDebuggingMessages() {
return phpunit_util::get_debugging_messages();
@@ -144,10 +144,9 @@ abstract class database_driver_testcase extends PHPUnit_Framework_TestCase {
/**
* Clear all previous debugging messages in current test.
* @return array
*/
public function resetDebugging() {
return phpunit_util::reset_debugging();
phpunit_util::reset_debugging();
}
/**
@@ -188,6 +187,10 @@ abstract class database_driver_testcase extends PHPUnit_Framework_TestCase {
phpunit_util::reset_debugging();
}
/**
* Call when no debugging() messages expected.
* @param string $message
*/
public function assertDebuggingNotCalled($message = '') {
$debugging = phpunit_util::get_debugging_messages();
$count = count($debugging);