Merge remote-tracking branch 'nickvergessen/ticket/11501' into develop

* nickvergessen/ticket/11501:
  [ticket/11501] Remove test_ prefix from data provider methods
  [ticket/11501] Assert the variables instead of fail() with the condition
This commit is contained in:
Andreas Fischer 2013-04-18 21:18:55 -04:00
commit ae240930cd
3 changed files with 6 additions and 13 deletions

View file

@ -144,15 +144,8 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
$this->migrator->update();
}
if ($migrator_test_if_true_failed)
{
$this->fail('True test failed');
}
if ($migrator_test_if_false_failed)
{
$this->fail('False test failed');
}
$this->assertFalse($migrator_test_if_true_failed, 'True test failed');
$this->assertFalse($migrator_test_if_false_failed, 'False test failed');
}
public function test_recall()

View file

@ -16,7 +16,7 @@ class phpbb_log_function_add_log_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/empty_log.xml');
}
public static function test_add_log_function_data()
public static function add_log_function_data()
{
return array(
/**
@ -138,7 +138,7 @@ class phpbb_log_function_add_log_test extends phpbb_database_test_case
}
/**
* @dataProvider test_add_log_function_data
* @dataProvider add_log_function_data
*/
public function test_add_log_function($expected, $user_id, $mode, $required1, $additional1 = null, $additional2 = null, $additional3 = null)
{

View file

@ -22,7 +22,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/full_log.xml');
}
public static function test_view_log_function_data()
public static function view_log_function_data()
{
global $phpEx, $phpbb_dispatcher;
$phpbb_dispatcher = new phpbb_mock_event_dispatcher();
@ -296,7 +296,7 @@ class phpbb_log_function_view_log_test extends phpbb_database_test_case
}
/**
* @dataProvider test_view_log_function_data
* @dataProvider view_log_function_data
*/
public function test_view_log_function($expected, $expected_returned, $mode, $log_count, $limit = 5, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $limit_days = 0, $sort_by = 'l.log_id ASC', $keywords = '')
{