diff --git a/docs/en/reference/schema-representation.rst b/docs/en/reference/schema-representation.rst index f5aa7f4e0ac..72d4198915c 100644 --- a/docs/en/reference/schema-representation.rst +++ b/docs/en/reference/schema-representation.rst @@ -93,7 +93,7 @@ and absolutely not portable. - **engine** (string): The DB engine used for the table. Currently only supported on MySQL. - **unlogged** (boolean): Set a PostgreSQL table type as - `unlogged `_ + `unlogged `_ Column ~~~~~~ diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index cac8873a755..3d085ca9314 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -47,11 +47,11 @@ protected function setUp(): void private function getExecuteStatementMockConnection(): Connection&MockObject { - $driverMock = $this->createMock(Driver::class); + $driver = self::createStub(Driver::class); return $this->getMockBuilder(Connection::class) ->onlyMethods(['executeStatement']) - ->setConstructorArgs([[], $driverMock]) + ->setConstructorArgs([[], $driver]) ->getMock(); } @@ -146,9 +146,9 @@ public function testSetAutoCommit(): void public function testConnectStartsTransactionInNoAutoCommitMode(): void { - $driverMock = $this->createMock(Driver::class); + $driver = self::createStub(Driver::class); - $conn = new Connection([], $driverMock); + $conn = new Connection([], $driver); $conn->setAutoCommit(false); @@ -161,9 +161,9 @@ public function testConnectStartsTransactionInNoAutoCommitMode(): void public function testCommitStartsTransactionInNoAutoCommitMode(): void { - $driverMock = $this->createMock(Driver::class); + $driver = self::createStub(Driver::class); - $conn = new Connection([], $driverMock); + $conn = new Connection([], $driver); $conn->setAutoCommit(false); $conn->executeQuery('SELECT 1'); @@ -180,9 +180,9 @@ public static function resultProvider(): array public function testRollBackStartsTransactionInNoAutoCommitMode(): void { - $driverMock = $this->createMock(Driver::class); + $driver = self::createStub(Driver::class); - $conn = new Connection([], $driverMock); + $conn = new Connection([], $driver); $conn->setAutoCommit(false); $conn->executeQuery('SELECT 1'); @@ -198,12 +198,12 @@ public function testSwitchingAutoCommitModeCommitsAllCurrentTransactions(): void ->method('supportsSavepoints') ->willReturn(true); - $driverMock = $this->createMock(Driver::class); - $driverMock + $driver = self::createStub(Driver::class); + $driver ->method('getDatabasePlatform') ->willReturn($platform); - $conn = new Connection([], $driverMock); + $conn = new Connection([], $driver); $conn->beginTransaction(); $conn->beginTransaction(); diff --git a/tests/Query/Expression/ExpressionBuilderTest.php b/tests/Query/Expression/ExpressionBuilderTest.php index 06cc0a7dbd6..4ec5d5badca 100644 --- a/tests/Query/Expression/ExpressionBuilderTest.php +++ b/tests/Query/Expression/ExpressionBuilderTest.php @@ -16,11 +16,11 @@ class ExpressionBuilderTest extends TestCase protected function setUp(): void { - $conn = $this->createMock(Connection::class); + $conn = self::createStub(Connection::class); $this->expr = new ExpressionBuilder($conn); - $conn->expects(self::any()) + $conn ->method('createExpressionBuilder') ->willReturn($this->expr); } diff --git a/tests/Types/DateImmutableTypeTest.php b/tests/Types/DateImmutableTypeTest.php index 31f5cdce1fe..3a3ca8a15cc 100644 --- a/tests/Types/DateImmutableTypeTest.php +++ b/tests/Types/DateImmutableTypeTest.php @@ -90,7 +90,7 @@ public function testConvertsDateStringToPHPValue(): void public function testResetTimeFractionsWhenConvertingToPHPValue(): void { - $this->platform->expects(self::any()) + $this->platform ->method('getDateFormatString') ->willReturn('Y-m-d'); diff --git a/tests/Types/DateTimeImmutableTypeTest.php b/tests/Types/DateTimeImmutableTypeTest.php index cce9557636b..358267895e2 100644 --- a/tests/Types/DateTimeImmutableTypeTest.php +++ b/tests/Types/DateTimeImmutableTypeTest.php @@ -90,7 +90,7 @@ public function testConvertsDateTimeStringToPHPValue(): void public function testConvertsDateTimeStringWithMicrosecondsToPHPValue(): void { - $this->platform->expects(self::any()) + $this->platform ->method('getDateTimeFormatString') ->willReturn('Y-m-d H:i:s'); diff --git a/tests/Types/TimeImmutableTypeTest.php b/tests/Types/TimeImmutableTypeTest.php index f1738546868..103328b0aae 100644 --- a/tests/Types/TimeImmutableTypeTest.php +++ b/tests/Types/TimeImmutableTypeTest.php @@ -90,7 +90,7 @@ public function testConvertsTimeStringToPHPValue(): void public function testResetDateFractionsWhenConvertingToPHPValue(): void { - $this->platform->expects(self::any()) + $this->platform ->method('getTimeFormatString') ->willReturn('H:i:s');