Skip to content

Commit 192cddc

Browse files
authored
Update tests for actual tables
1 parent 10adf37 commit 192cddc

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

tests/system/Database/Live/MetadataTest.php

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,38 @@ class MetadataTest extends CIDatabaseTestCase
1313

1414
public function testCanListTables()
1515
{
16+
$prefix = $this->db->getPRefix();
17+
$expected = [
18+
$prefix . 'migrations',
19+
$prefix . 'user',
20+
$prefix . 'job',
21+
$prefix . 'misc',
22+
$prefix . 'empty',
23+
$prefix . 'secondary'
24+
];
25+
1626
$result = $this->db->listTables();
17-
18-
// user, job, misc, migrations
19-
$this->assertCount(4, $result);
27+
28+
$this->assertEquals($expected, $result);
2029
}
2130

2231
//--------------------------------------------------------------------
2332

2433
public function testCanListTablesConstrainPrefix()
2534
{
35+
$prefix = $this->db->getPRefix();
36+
$expected = [
37+
$prefix . 'migrations',
38+
$prefix . 'user',
39+
$prefix . 'job',
40+
$prefix . 'misc',
41+
$prefix . 'empty',
42+
$prefix . 'secondary'
43+
];
44+
2645
$result = $this->db->listTables(true);
27-
28-
// user, job, misc, migrations
29-
$this->assertCount(4, $result);
46+
47+
$this->assertEquals($expected, $result);
3048
}
3149

3250
//--------------------------------------------------------------------

0 commit comments

Comments
 (0)