diff --git a/tests/QueryTest.php b/tests/QueryTest.php index 3df3a828..b5ca5eb3 100644 --- a/tests/QueryTest.php +++ b/tests/QueryTest.php @@ -43,8 +43,6 @@ public function testQueryWithPrefix() 'prefix' => 'PREFIX_' ]); - $database->type = "sqlite"; - $database->query("SELECT FROM "); $this->assertQuery( @@ -68,8 +66,6 @@ public function testQueryTableWithPrefix() 'prefix' => 'PREFIX_' ]); - $database->type = "sqlite"; - $database->query("DROP TABLE IF EXISTS "); $this->assertQuery( @@ -80,6 +76,28 @@ public function testQueryTableWithPrefix() ); } + /** + * @covers ::query() + * @covers ::isRaw() + * @covers ::buildRaw() + */ + public function testQueryShowTableWithPrefix() + { + $database = new Medoo([ + 'testMode' => true, + 'prefix' => 'PREFIX_' + ]); + + $database->query("SHOW TABLES LIKE "); + + $this->assertQuery( + <<queryString + ); + } + /** * @covers ::query() * @covers ::isRaw() @@ -120,8 +138,6 @@ public function testQueryEscape() 'prefix' => 'PREFIX_' ]); - $database->type = "sqlite"; - $database->query("SELECT * FROM WHERE = ''"); $this->assertQuery(