mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 01:06:48 +02:00
Merge PR #1101 branch 'develop-olympus' into develop
* develop-olympus: [ticket/11219] Coding guidelines and naming consistency changes [ticket/11219] Only update sequences that are affected by a fixture [ticket/11219] Recreate Oracle sequences instead of altering them [ticket/11219] Add unit test for inserting into a sequence column [ticket/11219] Update sequence values after loading fixtures
This commit is contained in:
@@ -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);
|
||||
@@ -28,6 +30,20 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
|
||||
);
|
||||
}
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
// 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)
|
||||
{
|
||||
$db_config = $this->get_database_config();
|
||||
@@ -47,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()
|
||||
|
Reference in New Issue
Block a user