diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2014-06-22 23:41:26 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2014-06-22 23:41:26 +0200 |
| commit | 80e0851189fa599a36c15659641b5ddfe82715a5 (patch) | |
| tree | 9a3bda48036018e43e0d9d62717293db180d4b54 /tests/test_framework/phpbb_database_test_case.php | |
| parent | d18d3b30c70c0fb48cad14576376ee51671d094e (diff) | |
| parent | 4f2acbaed2028cc1b5ad96f6eada97b1cc94532f (diff) | |
| download | forums-80e0851189fa599a36c15659641b5ddfe82715a5.tar forums-80e0851189fa599a36c15659641b5ddfe82715a5.tar.gz forums-80e0851189fa599a36c15659641b5ddfe82715a5.tar.bz2 forums-80e0851189fa599a36c15659641b5ddfe82715a5.tar.xz forums-80e0851189fa599a36c15659641b5ddfe82715a5.zip | |
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus:
[ticket/12747] Remove some methods which are not used anymore
[ticket/12747] Drop support for Firebird
Diffstat (limited to 'tests/test_framework/phpbb_database_test_case.php')
| -rw-r--r-- | tests/test_framework/phpbb_database_test_case.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php index 1f3a564205..46276bcfcb 100644 --- a/tests/test_framework/phpbb_database_test_case.php +++ b/tests/test_framework/phpbb_database_test_case.php @@ -145,25 +145,7 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test public function createXMLDataSet($path) { - $db_config = $this->get_database_config(); - - // Firebird requires table and column names to be uppercase - if ($db_config['dbms'] == 'phpbb\db\driver\firebird') - { - $xml_data = file_get_contents($path); - $xml_data = preg_replace_callback('/(?:(<table name="))([a-z_]+)(?:(">))/', 'phpbb_database_test_case::to_upper', $xml_data); - $xml_data = preg_replace_callback('/(?:(<column>))([a-z_]+)(?:(<\/column>))/', 'phpbb_database_test_case::to_upper', $xml_data); - - $new_fixture = tmpfile(); - fwrite($new_fixture, $xml_data); - fseek($new_fixture, 0); - - $meta_data = stream_get_meta_data($new_fixture); - $path = $meta_data['uri']; - } - $this->fixture_xml_data = parent::createXMLDataSet($path); - return $this->fixture_xml_data; } @@ -244,19 +226,6 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test return new phpbb_database_test_connection_manager($config); } - /** - * Converts a match in the middle of a string to uppercase. - * This is necessary for transforming the fixture information for Firebird tests - * - * @param $matches The array of matches from a regular expression - * - * @return string The string with the specified match converted to uppercase - */ - static public function to_upper($matches) - { - return $matches[1] . strtoupper($matches[2]) . $matches[3]; - } - public function assert_array_content_equals($one, $two) { // http://stackoverflow.com/questions/3838288/phpunit-assert-two-arrays-are-equal-but-order-of-elements-not-important |
