diff options
author | Patrick Webster <noxwizard@phpbb.com> | 2012-12-01 22:34:03 -0600 |
---|---|---|
committer | Patrick Webster <noxwizard@phpbb.com> | 2012-12-01 22:34:03 -0600 |
commit | 720ef233b122d00ef9d2128c9a0a518ff017b0d7 (patch) | |
tree | ba25333b19534a191e2a2a94d9c36a0af3a8493f /tests/test_framework/phpbb_database_test_case.php | |
parent | 1dff6d1bf988bb0d11a393fad0c0d0183366a5c9 (diff) | |
download | forums-720ef233b122d00ef9d2128c9a0a518ff017b0d7.tar forums-720ef233b122d00ef9d2128c9a0a518ff017b0d7.tar.gz forums-720ef233b122d00ef9d2128c9a0a518ff017b0d7.tar.bz2 forums-720ef233b122d00ef9d2128c9a0a518ff017b0d7.tar.xz forums-720ef233b122d00ef9d2128c9a0a518ff017b0d7.zip |
[ticket/11219] Only update sequences that are affected by a fixture
PHPBB3-11219
Diffstat (limited to 'tests/test_framework/phpbb_database_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_database_test_case.php | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php index 0916679108..429bb92bf1 100644 --- a/tests/test_framework/phpbb_database_test_case.php +++ b/tests/test_framework/phpbb_database_test_case.php @@ -13,6 +13,8 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test protected $test_case_helpers; + protected $fixture_xml_data; + public function __construct($name = NULL, array $data = array(), $dataName = '') { parent::__construct($name, $data, $dataName); @@ -32,10 +34,14 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test { parent::setUp(); - $config = $this->get_database_config(); - $manager = $this->create_connection_manager($config); - $manager->connect(); - $manager->post_setup_synchronisation(); + // Resynchronise tables if a fixture was loaded + if (isset($this->fixture_xml_data)) + { + $config = $this->get_database_config(); + $manager = $this->create_connection_manager($config); + $manager->connect(); + $manager->post_setup_synchronisation($this->fixture_xml_data); + } } public function createXMLDataSet($path) @@ -57,7 +63,9 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test $path = $meta_data['uri']; } - return parent::createXMLDataSet($path); + $this->fixture_xml_data = parent::createXMLDataSet($path); + + return $this->fixture_xml_data; } public function get_test_case_helpers() |