-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more tests
- Loading branch information
Roger Hughes
committed
Jan 7, 2022
1 parent
21f19e2
commit 88783a3
Showing
5 changed files
with
51 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
final class DBTest extends TestCase | ||
{ | ||
public function testConnection(): void | ||
{ | ||
$db = new GraftPHP\Framework\DB(); | ||
|
||
$this->assertInstanceOf( | ||
GraftPHP\Framework\DB::class, | ||
$db, | ||
); | ||
} | ||
|
||
public function testTableDoesntExist(): void | ||
{ | ||
$this->assertEquals( | ||
false, | ||
GraftPHP\Framework\DB::tableExists('testtable') | ||
); | ||
} | ||
|
||
public function testCreateTable(): void | ||
{ | ||
$db = new GraftPHP\Framework\DB(); | ||
$db->createTable('testtable'); | ||
$this->assertEquals( | ||
false, | ||
GraftPHP\Framework\DB::tableExists('testtable') | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters