Skip to content

Commit

Permalink
drop tables if available
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jul 24, 2022
1 parent de4a810 commit 99cb37a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Backend/Api/Generator/ProviderTest.php
Expand Up @@ -39,6 +39,24 @@
*/
class ProviderTest extends ControllerDbTestCase
{
protected function setUp(): void
{
parent::setUp();

$tableNames = [
'app_location_0',
'app_category_0',
'app_human_0',
];

foreach ($tableNames as $tableName) {
if ($this->connection->getSchemaManager()->tablesExist($tableName)) {
$this->connection->executeQuery('DELETE FROM ' . $tableName . ' WHERE 1=1');
$this->connection->executeQuery('DROP TABLE ' . $tableName);
}
}
}

public function getDataSet()
{
return Fixture::getDataSet();
Expand Down

0 comments on commit 99cb37a

Please sign in to comment.