diff --git a/tests/ConnectionTest.php b/tests/ConnectionTest.php index 719647989f9..10e1ea4d77b 100644 --- a/tests/ConnectionTest.php +++ b/tests/ConnectionTest.php @@ -59,7 +59,7 @@ private function getExecuteStatementMockConnection(): Connection { $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -184,7 +184,7 @@ public function testTransactionBeginDispatchEvent(): void { $eventManager = new EventManager(); $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -210,7 +210,7 @@ public function testTransactionCommitDispatchEvent(): void { $eventManager = new EventManager(); $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -237,7 +237,7 @@ public function testTransactionCommitEventNotCalledAfterRollBack(): void { $eventManager = new EventManager(); $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -273,7 +273,7 @@ public function testTransactionRollBackDispatchEvent(): void { $eventManager = new EventManager(); $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -307,7 +307,7 @@ public function testEventManagerPassedToPlatform(): void ->with($eventManager); $driver = $this->createMock(Driver::class); - $driver->expects(self::any()) + $driver ->method('getDatabasePlatform') ->willReturn($platform); @@ -380,7 +380,7 @@ public function testSetAutoCommit(): void public function testConnectStartsTransactionInNoAutoCommitMode(): void { $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -399,7 +399,7 @@ public function testConnectStartsTransactionInNoAutoCommitMode(): void public function testCommitStartsTransactionInNoAutoCommitMode(): void { $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -421,7 +421,7 @@ public function testCommitReturn(bool $expectedResult): void ->method('commit')->willReturn($expectedResult); $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn($driverConnection); @@ -442,7 +442,7 @@ public static function resultProvider(): array public function testRollBackStartsTransactionInNoAutoCommitMode(): void { $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), @@ -459,7 +459,7 @@ public function testRollBackStartsTransactionInNoAutoCommitMode(): void public function testSwitchingAutoCommitModeCommitsAllCurrentTransactions(): void { $driverMock = $this->createMock(Driver::class); - $driverMock->expects(self::any()) + $driverMock ->method('connect') ->willReturn( $this->createMock(DriverConnection::class), diff --git a/tests/Query/Expression/ExpressionBuilderTest.php b/tests/Query/Expression/ExpressionBuilderTest.php index 4ecfeb9fa08..8ccd37994ad 100644 --- a/tests/Query/Expression/ExpressionBuilderTest.php +++ b/tests/Query/Expression/ExpressionBuilderTest.php @@ -17,7 +17,7 @@ protected function setUp(): void $this->expr = new ExpressionBuilder($conn); - $conn->expects(self::any()) + $conn ->method('getExpressionBuilder') ->willReturn($this->expr); } diff --git a/tests/Schema/Visitor/DropSchemaSqlCollectorTest.php b/tests/Schema/Visitor/DropSchemaSqlCollectorTest.php index a0fb23d0fb3..ddd28fcd00a 100644 --- a/tests/Schema/Visitor/DropSchemaSqlCollectorTest.php +++ b/tests/Schema/Visitor/DropSchemaSqlCollectorTest.php @@ -43,15 +43,15 @@ private function getStubKeyConstraint(string $name): ForeignKeyConstraint { $constraint = $this->createMock(ForeignKeyConstraint::class); - $constraint->expects(self::any()) + $constraint ->method('getName') ->willReturn($name); - $constraint->expects(self::any()) + $constraint ->method('getForeignColumns') ->willReturn([]); - $constraint->expects(self::any()) + $constraint ->method('getColumns') ->willReturn([]); diff --git a/tests/StatementTest.php b/tests/StatementTest.php index 1c91859c2cd..c248f0f0dde 100644 --- a/tests/StatementTest.php +++ b/tests/StatementTest.php @@ -36,11 +36,11 @@ protected function setUp(): void ->getMock(); $this->configuration = $this->createMock(Configuration::class); - $this->conn->expects(self::any()) + $this->conn ->method('getConfiguration') ->willReturn($this->configuration); - $this->conn->expects(self::any()) + $this->conn ->method('getDriver') ->willReturn($driver); } diff --git a/tests/Types/DateImmutableTypeTest.php b/tests/Types/DateImmutableTypeTest.php index f21c2802b12..15f0ad8a110 100644 --- a/tests/Types/DateImmutableTypeTest.php +++ b/tests/Types/DateImmutableTypeTest.php @@ -97,7 +97,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 ffe8ec91e1c..00179f1fd87 100644 --- a/tests/Types/DateTimeImmutableTypeTest.php +++ b/tests/Types/DateTimeImmutableTypeTest.php @@ -98,7 +98,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/GuidTypeTest.php b/tests/Types/GuidTypeTest.php index aa9adc05314..c6d756ff72a 100644 --- a/tests/Types/GuidTypeTest.php +++ b/tests/Types/GuidTypeTest.php @@ -35,7 +35,7 @@ public function testNativeGuidSupport(): void { self::assertTrue($this->type->requiresSQLCommentHint($this->platform)); - $this->platform->expects(self::any()) + $this->platform ->method('hasNativeGuidType') ->willReturn(true); diff --git a/tests/Types/TimeImmutableTypeTest.php b/tests/Types/TimeImmutableTypeTest.php index 3e67ed02169..75baa66459c 100644 --- a/tests/Types/TimeImmutableTypeTest.php +++ b/tests/Types/TimeImmutableTypeTest.php @@ -97,7 +97,7 @@ public function testConvertsTimeStringToPHPValue(): void public function testResetDateFractionsWhenConvertingToPHPValue(): void { - $this->platform->expects(self::any()) + $this->platform ->method('getTimeFormatString') ->willReturn('H:i:s');