@@ -183,12 +183,12 @@ public function testTransactionIsNotActiveAfterTransactionalInAutoCommitMode():
183183
184184 public function testTransactionIsActiveAfterTransactionalInNoAutoCommitMode (): void
185185 {
186- $ platformMock = $ this -> createMock (AbstractPlatform::class);
186+ $ platformMock = self :: createStub (AbstractPlatform::class);
187187 $ platformMock
188188 ->method ('supportsSavepoints ' )
189189 ->willReturn (true );
190190
191- $ driverMock = $ this -> createMock (Driver::class);
191+ $ driverMock = self :: createStub (Driver::class);
192192 $ driverMock
193193 ->method ('connect ' )
194194 ->willReturn (
@@ -470,7 +470,7 @@ public function testFetch(string $method, callable $invoke, mixed $expected): vo
470470 ->willReturn ($ expected );
471471
472472 $ driver = $ this ->createConfiguredMock (Driver::class, [
473- 'connect ' => $ this -> createMock (DriverConnection::class),
473+ 'connect ' => self :: createStub (DriverConnection::class),
474474 ]);
475475
476476 $ conn = $ this ->getMockBuilder (Connection::class)
@@ -565,7 +565,7 @@ public function testPlatformDetectionTriggersConnectionIfRequiredByTheDriver():
565565 ->method ('getServerVersion ' )
566566 ->willReturn ('6.6.6 ' );
567567
568- $ platform = $ this -> createMock (AbstractPlatform::class);
568+ $ platform = self :: createStub (AbstractPlatform::class);
569569
570570 $ driver = $ this ->createMock (Driver::class);
571571 $ driver ->expects (self ::once ())
@@ -590,7 +590,7 @@ public function testPlatformDetectionDoesNotTriggerConnectionIfNotRequiredByTheD
590590 $ driverConnection ->expects (self ::never ())
591591 ->method ('getServerVersion ' );
592592
593- $ platform = $ this -> createMock (AbstractPlatform::class);
593+ $ platform = self :: createStub (AbstractPlatform::class);
594594
595595 $ driver = $ this ->createMock (Driver::class);
596596 $ driver ->expects (self ::never ())
@@ -608,9 +608,9 @@ public function testPlatformDetectionFetchedFromParameters(): void
608608 {
609609 $ driverMock = $ this ->createMock (Driver::class);
610610
611- $ driverConnectionMock = $ this -> createMock (Driver \Connection::class);
611+ $ driverConnectionMock = self :: createStub (Driver \Connection::class);
612612
613- $ platformMock = $ this -> createMock (AbstractPlatform::class);
613+ $ platformMock = self :: createStub (AbstractPlatform::class);
614614
615615 $ connection = new Connection (['serverVersion ' => '8.0 ' ], $ driverMock );
616616
@@ -630,9 +630,9 @@ public function testPlatformDetectionFetchedFromPrimaryReplicaParameters(): void
630630 {
631631 $ driverMock = $ this ->createMock (Driver::class);
632632
633- $ driverConnectionMock = $ this -> createMock (Driver \Connection::class);
633+ $ driverConnectionMock = self :: createStub (Driver \Connection::class);
634634
635- $ platformMock = $ this -> createMock (AbstractPlatform::class);
635+ $ platformMock = self :: createStub (AbstractPlatform::class);
636636
637637 $ connection = new Connection (['primary ' => ['serverVersion ' => '8.0 ' ]], $ driverMock );
638638
@@ -650,7 +650,7 @@ public function testPlatformDetectionFetchedFromPrimaryReplicaParameters(): void
650650
651651 public function testConnectionParamsArePassedToTheQueryCacheProfileInExecuteCacheQuery (): void
652652 {
653- $ cacheItemMock = $ this -> createMock (CacheItemInterface::class);
653+ $ cacheItemMock = self :: createStub (CacheItemInterface::class);
654654 $ cacheItemMock ->method ('isHit ' )->willReturn (true );
655655 $ cacheItemMock ->method ('get ' )->willReturn (['realKey ' => [[], []]]);
656656
@@ -682,7 +682,7 @@ public function testConnectionParamsArePassedToTheQueryCacheProfileInExecuteCach
682682 ->with ($ query , $ params , $ types , $ expectedConnectionParams )
683683 ->willReturn (['cacheKey ' , 'realKey ' ]);
684684
685- $ driver = $ this -> createMock (Driver::class);
685+ $ driver = self :: createStub (Driver::class);
686686
687687 (new Connection (self ::CONNECTION_PARAMS , $ driver ))
688688 ->executeCacheQuery ($ query , $ params , $ types , $ queryCacheProfileMock );
0 commit comments