Skip to content

Commit

Permalink
test: Skip running tests if DB is not MySQLi
Browse files Browse the repository at this point in the history
  • Loading branch information
ducng99 committed Jun 24, 2024
1 parent 16fe250 commit 9efac84
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/system/Database/Live/MySQLi/FoundRowsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ final class FoundRowsTest extends CIUnitTestCase
use DatabaseTestTrait;

/**
* @var array<string,mixed>
* Database config for tests
*
* @var array<string, mixed>
*/
private $tests;

Expand All @@ -37,15 +39,15 @@ final class FoundRowsTest extends CIUnitTestCase

protected function setUp(): void
{
parent::setUp();

$config = config('Database');

$this->tests = $config->tests;

if ($this->tests['DBDriver'] !== 'MySQLi') {
$this->markTestSkipped('Only MySQLi can complete this test.');
}

parent::setUp();
}

public function testEnableFoundRows(): void
Expand Down

0 comments on commit 9efac84

Please sign in to comment.