Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Jul 21, 2017
1 parent dc547af commit 3a7b967
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/api/Db/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public function testCoreTables()
'schema_migrations',
'settings',
'tables',
'ui',
'users'
]);

Expand All @@ -79,11 +78,12 @@ public function testPickTableName()
'databases'
];

$filteredTables = $schema->getDirectusTables(array_merge($pickCoreTables, $notExistingTable));
$tables = array_merge($pickCoreTables, $notExistingTable);
$filteredTables = $schema->getDirectusTables($tables);

foreach ($pickCoreTables as $pickCoreTable) {
$result = in_array($schema->addCoreTablePrefix($pickCoreTable), $filteredTables);
if (!in_array($pickCoreTable, $notExistingTable)) {
foreach ($tables as $table) {
$result = in_array($schema->addCoreTablePrefix($table), $filteredTables);
if (in_array($table, $notExistingTable)) {
$this->assertFalse($result);
} else {
$this->assertTrue($result);
Expand Down

0 comments on commit 3a7b967

Please sign in to comment.