Nimut / testing-framework

TYPO3 testing framework that provides base classes and configuration for PHPUnit tests
GNU General Public License v2.0
52 stars 25 forks source link

Records of ext_tables_static+adt.sql were inserted just once #151

Open froemken opened 2 years ago

froemken commented 2 years ago

Hello,

for one of my functional tests I have added static_info_tables to $this->testExtensionsToLoad. All records of ext_tables_static+adt.sql were added successfully, but after tearDown() of first test, all tables of static_info_tables will be truncated, so for all further tests I have to add the needed record on my own.

Would be helpful, I you could load ext_tables_static+adt.sql for each test case.

Current solution:

// Seems that records of ext_tables_static+adt.sql will be included just once for all tests in this class.
// So, for all tests (except the first one), we have to add the record ourselves.
$country = $this->getDatabaseConnection()->selectSingleRow('*', 'static_countries', 'uid=54');
if ($country === false) {
    $this->importDataSet(__DIR__ . '/../Fixtures/static_countries.xml');
}

Nice greetings

Stefan

oliverklee commented 2 years ago

This ticket seems to be related to #105 and #106.

oliverklee commented 2 years ago

And this code snippet seems familiar to me. Is it from one of my extensions? :-)

lolli42 commented 2 years ago

Note: We fixed this in typo3/TF by not importing ext_tables_static+adt.sql at all anymore. See https://github.com/TYPO3/testing-framework/issues/377