Skip to content

Commit e5b4486

Browse files
committed
[update] Add test case for catfan#1033
1 parent 62fdb93 commit e5b4486

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/DropTest.php

+24
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Medoo\Tests;
44

5+
use Medoo\Medoo;
6+
57
/**
68
* @coversDefaultClass \Medoo\Medoo
79
*/
@@ -24,4 +26,26 @@ public function testDrop($type)
2426
$this->database->queryString
2527
);
2628
}
29+
30+
/**
31+
* @covers ::drop()
32+
*/
33+
public function testDropWithPrefix()
34+
{
35+
$database = new Medoo([
36+
'testMode' => true,
37+
'prefix' => 'PREFIX_'
38+
]);
39+
40+
$database->type = "sqlite";
41+
42+
$database->drop("account");
43+
44+
$this->assertQuery(
45+
<<<EOD
46+
DROP TABLE IF EXISTS "PREFIX_account"
47+
EOD,
48+
$database->queryString
49+
);
50+
}
2751
}

0 commit comments

Comments
 (0)