Skip to content

Commit

Permalink
make QueryBuilderTestCase abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Mar 8, 2024
1 parent 9872169 commit 98834ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/inc/QueryBuilderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

namespace NextrasTests\Dbal;


use Mockery;
use Mockery\MockInterface;
use Nextras\Dbal\Platforms\IPlatform;
use Nextras\Dbal\QueryBuilder\QueryBuilder;
use Tester\Assert;


class QueryBuilderTestCase extends TestCase
abstract class QueryBuilderTestCase extends TestCase
{
/** @var IPlatform|MockInterface */
protected $platform;
Expand All @@ -22,17 +23,16 @@ public function setUp()
}


protected function builder()
protected function builder(): QueryBuilder
{
return new QueryBuilder($this->platform);
}


protected function assertBuilder($expected, QueryBuilder $builder)
protected function assertBuilder(array $expected, QueryBuilder $builder): void
{
$args = $builder->getQueryParameters();
array_unshift($args, $builder->getQuerySql());
Assert::same($expected, $args);
}

}

0 comments on commit 98834ac

Please sign in to comment.