mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Don't assume an empty table in e_db_abstractTest::testIsEmpty()
This commit is contained in:
@@ -851,11 +851,17 @@ abstract class e_db_abstractTest extends \Codeception\Test\Unit
|
|||||||
|
|
||||||
public function testIsEmpty()
|
public function testIsEmpty()
|
||||||
{
|
{
|
||||||
$result = $this->db->isEmpty('plugin');
|
$this->db->copyTable('user', 'test_is_empty', true, true);
|
||||||
|
|
||||||
|
$result = $this->db->isEmpty('test_is_empty');
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
|
|
||||||
// $result = $this->db->isEmpty('comments');
|
$this->db->truncate('test_is_empty');
|
||||||
// $this->assertTrue($result);
|
|
||||||
|
$result = $this->db->isEmpty('test_is_empty');
|
||||||
|
$this->assertTrue($result);
|
||||||
|
|
||||||
|
$this->db->dropTable('test_is_empty');
|
||||||
|
|
||||||
$result = $this->db->isEmpty();
|
$result = $this->db->isEmpty();
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
|
Reference in New Issue
Block a user