Creates a new XMLDataSet with the given $xmlFile. (absolute path.)
protected createXMLDataSet ( string $xmlFile ) : PHPUnit_Extensions_Database_DataSet_XmlDataSet | ||
$xmlFile | string | |
return | PHPUnit_Extensions_Database_DataSet_XmlDataSet |
public function createXMLDataSet($path) { $db_config = $this->get_database_config(); // Firebird requires table and column names to be uppercase if ($db_config['dbms'] == '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; }
public function createXMLDataSet($path) { $this->fixture_xml_data = parent::createXMLDataSet($path); return $this->fixture_xml_data; }