mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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:
commit
ae240930cd
3 changed files with 6 additions and 13 deletions
|
@ -144,15 +144,8 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
||||||
$this->migrator->update();
|
$this->migrator->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($migrator_test_if_true_failed)
|
$this->assertFalse($migrator_test_if_true_failed, 'True test failed');
|
||||||
{
|
$this->assertFalse($migrator_test_if_false_failed, 'False test failed');
|
||||||
$this->fail('True test failed');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($migrator_test_if_false_failed)
|
|
||||||
{
|
|
||||||
$this->fail('False test failed');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_recall()
|
public function test_recall()
|
||||||
|
|
|
@ -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');
|
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(
|
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)
|
public function test_add_log_function($expected, $user_id, $mode, $required1, $additional1 = null, $additional2 = null, $additional3 = null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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');
|
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;
|
global $phpEx, $phpbb_dispatcher;
|
||||||
$phpbb_dispatcher = new phpbb_mock_event_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 = '')
|
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 = '')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue