From bf2be08c9f3b6957a3327929a169eb6204e84cd0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 25 Jan 2018 11:23:12 +0100 Subject: Fix risky tests without assertions Signed-off-by: Joas Schilling --- tests/lib/DB/ConnectionTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/lib/DB/ConnectionTest.php') diff --git a/tests/lib/DB/ConnectionTest.php b/tests/lib/DB/ConnectionTest.php index 2a0cd70f83a..3a4a80bdbd9 100644 --- a/tests/lib/DB/ConnectionTest.php +++ b/tests/lib/DB/ConnectionTest.php @@ -58,7 +58,7 @@ class ConnectionTest extends \Test\TestCase { public function assertTableExist($table) { if ($this->connection->getDatabasePlatform() instanceof SqlitePlatform) { // sqlite removes the tables after closing the DB - $this->assertTrue(true); + $this->addToAssertionCount(1); } else { $this->assertTrue($this->connection->tableExists($table), 'Table ' . $table . ' exists.'); } @@ -70,7 +70,7 @@ class ConnectionTest extends \Test\TestCase { public function assertTableNotExist($table) { if ($this->connection->getDatabasePlatform() instanceof SqlitePlatform) { // sqlite removes the tables after closing the DB - $this->assertTrue(true); + $this->addToAssertionCount(1); } else { $this->assertFalse($this->connection->tableExists($table), 'Table ' . $table . " doesn't exist."); } @@ -195,5 +195,7 @@ class ConnectionTest extends \Test\TestCase { ], [ 'textfield' => 'foo' ]); + + $this->addToAssertionCount(1); } } -- cgit v1.2.3