Skip to content

Commit 6a602f9

Browse files
committed
Renamed assertions and constraints (they are dedicated to the SQLite engine)
1 parent 8ea4605 commit 6a602f9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/functional/ServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ public function testLoader(): void
703703
])->getBuilder(),
704704
);
705705

706-
$this->assertTableExists(PDOPool::shared('sqlite::memory:'), 'foo');
706+
$this->assertSQLiteTableExists(PDOPool::shared('sqlite::memory:'), 'foo');
707707
}
708708

709709
public function testLoaderWithAfterQueries(): void
@@ -761,7 +761,7 @@ public function testLoaderWithAfterQueries(): void
761761
])->getBuilder(),
762762
);
763763

764-
$this->assertTableDoesNotExist(PDOPool::shared('sqlite::memory:'), 'foo');
764+
$this->assertSQLiteTableDoesNotExist(PDOPool::shared('sqlite::memory:'), 'foo');
765765
}
766766

767767
public function testLoaderWithTypedParam(): void

tests/utils/AssertTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ trait AssertTrait
1111
{
1212
abstract public static function assertThat($value, Constraint $constraint, string $message = ''): void;
1313

14-
public function assertTableDoesNotExist(\PDO $connection, string $table, string $message = ''): void
14+
public function assertSQLiteTableDoesNotExist(\PDO $connection, string $table, string $message = ''): void
1515
{
1616
$this->assertThat(
1717
false,
18-
new LogicalNot(new TableExists($connection, $table)),
18+
new LogicalNot(new SQLiteTableExists($connection, $table)),
1919
$message
2020
);
2121
}
2222

23-
public function assertTableExists(\PDO $connection, string $table, string $message = ''): void
23+
public function assertSQLiteTableExists(\PDO $connection, string $table, string $message = ''): void
2424
{
2525
$this->assertThat(
2626
false,
27-
new TableExists($connection, $table),
27+
new SQLiteTableExists($connection, $table),
2828
$message
2929
);
3030
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use PHPUnit\Framework\Constraint\Constraint;
88

99
/** @template Type */
10-
final class TableExists extends Constraint
10+
final class SQLiteTableExists extends Constraint
1111
{
1212
public function __construct(
1313
private readonly \PDO $connection,

0 commit comments

Comments
 (0)