1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11469] Do not repeat assert_config_count(2). Also move to setUp().

PHPBB3-11469
This commit is contained in:
Andreas Fischer
2013-03-27 23:46:39 +01:00
parent b48c4d9549
commit c909d9602b

View File

@@ -18,6 +18,7 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
$this->db = $this->new_dbal();
$this->buffer = new phpbb_db_sql_insert_buffer($this->db, 'phpbb_config', 2);
$this->assert_config_count(2);
}
public function getDataSet()
@@ -29,8 +30,6 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
{
$this->db->multi_insert = false;
$this->assert_config_count(2);
// This call can be buffered
$this->assertTrue($this->buffer->insert($this->get_row(1)));
@@ -49,8 +48,6 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
$this->markTestSkipped('Database does not support multi_insert');
}
$this->assert_config_count(2);
// This call can be buffered
$this->assertFalse($this->buffer->insert($this->get_row(1)));
@@ -66,8 +63,6 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
{
$this->db->multi_insert = false;
$this->assert_config_count(2);
$this->assertTrue($this->buffer->insert($this->get_row(1)));
// This call flushes the values
@@ -83,8 +78,6 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
$this->markTestSkipped('Database does not support multi_insert');
}
$this->assert_config_count(2);
$this->assertFalse($this->buffer->insert($this->get_row(1)));
// This call flushes the values
@@ -97,8 +90,6 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
{
$this->db->multi_insert = false;
$this->assert_config_count(2);
$this->assertTrue($this->buffer->insert_all($this->get_three_rows()));
$this->assert_config_count(5);
@@ -111,8 +102,6 @@ class phpbb_dbal_sql_insert_buffer_test extends phpbb_database_test_case
$this->markTestSkipped('Database does not support multi_insert');
}
$this->assert_config_count(2);
$this->assertTrue($this->buffer->insert_all($this->get_three_rows()));
$this->assert_config_count(4);