Skip to content

Commit

Permalink
[update] Add test case for #1033
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelaon committed May 8, 2022
1 parent 62fdb93 commit e5b4486
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/DropTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Medoo\Tests;

use Medoo\Medoo;

/**
* @coversDefaultClass \Medoo\Medoo
*/
Expand All @@ -24,4 +26,26 @@ public function testDrop($type)
$this->database->queryString
);
}

/**
* @covers ::drop()
*/
public function testDropWithPrefix()
{
$database = new Medoo([
'testMode' => true,
'prefix' => 'PREFIX_'
]);

$database->type = "sqlite";

$database->drop("account");

$this->assertQuery(
<<<EOD
DROP TABLE IF EXISTS "PREFIX_account"
EOD,
$database->queryString
);
}
}

0 comments on commit e5b4486

Please sign in to comment.