-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace ipl\Tests\Sql; | ||
|
||
use ipl\Sql\Select; | ||
use ipl\Tests\Sql\Lib\SqlAssertions; | ||
|
||
abstract class TestCase extends \PHPUnit\Framework\TestCase | ||
{ | ||
use SqlAssertions { | ||
SqlAssertions::setUp as sqlAssertionsSetUp; | ||
} | ||
|
||
/** @var string The statement to use */ | ||
protected $queryClass = Select::class; | ||
|
||
/** @var Select The statement in use */ | ||
protected $query; | ||
|
||
protected function setUp(): void | ||
{ | ||
$this->query = new $this->queryClass(); | ||
$this->sqlAssertionsSetUp(); | ||
} | ||
|
||
/** @deprecated Unused. */ | ||
protected function setupTest() | ||
{ | ||
} | ||
|
||
/** | ||
* @deprecated Use {@see self::assertSql} instead. | ||
* | ||
* @param string $statement | ||
* @param array $values | ||
* | ||
* @return void | ||
*/ | ||
protected function assertCorrectStatementAndValues($statement, $values = null) | ||
{ | ||
$this->assertSql($statement, $this->query, $values); | ||
} | ||
} |