diff --git a/tests/SprykerTest/Zed/Propel/Business/Model/PropelConfigConverterJsonTest.php b/tests/SprykerTest/Zed/Propel/Business/Model/PropelConfigConverterJsonTest.php index de87ff7..36dee84 100644 --- a/tests/SprykerTest/Zed/Propel/Business/Model/PropelConfigConverterJsonTest.php +++ b/tests/SprykerTest/Zed/Propel/Business/Model/PropelConfigConverterJsonTest.php @@ -142,7 +142,7 @@ public function testConvertConfigThrowsExceptionIfFileNotCreated(): void protected function getPropelConfigConvertJsonMock(): PropelConfigConverterInterface { $propelConfigConverterJsonMock = $this->getMockBuilder(PropelConfigConverterJson::class) - ->setMethods(['writeToFile']) + ->onlyMethods(['writeToFile']) ->setConstructorArgs([$this->getTestConfiguration()]) ->getMock(); diff --git a/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/DatabaseCreatorCollectionTest.php b/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/DatabaseCreatorCollectionTest.php index 2c73f96..e07ce3c 100644 --- a/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/DatabaseCreatorCollectionTest.php +++ b/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/DatabaseCreatorCollectionTest.php @@ -82,7 +82,7 @@ public function testGet(): void */ private function getDatabaseCreatorMock(): DatabaseCreatorInterface { - $databaseCreatorMock = $this->getMockBuilder(DatabaseCreatorInterface::class)->setMethods(['getEngine', 'createIfNotExists'])->getMock(); + $databaseCreatorMock = $this->getMockBuilder(DatabaseCreatorInterface::class)->onlyMethods(['getEngine', 'createIfNotExists'])->getMock(); $databaseCreatorMock->expects($this->once())->method('getEngine')->willReturn(static::TEST_ENGINE); return $databaseCreatorMock; diff --git a/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/PostgreSqlDatabaseCreatorTest.php b/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/PostgreSqlDatabaseCreatorTest.php index 44e6fde..3d29f46 100644 --- a/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/PostgreSqlDatabaseCreatorTest.php +++ b/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabase/PostgreSqlDatabaseCreatorTest.php @@ -70,7 +70,7 @@ protected function getPostgreSqlDatabaseCreatorMock(array $methods = []): Postgr { return $this->getMockBuilder(PostgreSqlDatabaseCreator::class) ->disableOriginalConstructor() - ->setMethods($methods) + ->onlyMethods($methods) ->getMock(); } diff --git a/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabaseTest.php b/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabaseTest.php index e255c96..313969e 100644 --- a/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabaseTest.php +++ b/tests/SprykerTest/Zed/Propel/Business/Model/PropelDatabaseTest.php @@ -41,10 +41,10 @@ public function testInitialization(): void */ public function testCreateIfNotExists(): void { - $databaseCreatorMock = $this->getMockBuilder(DatabaseCreatorInterface::class)->setMethods(['createIfNotExists', 'getEngine'])->getMock(); + $databaseCreatorMock = $this->getMockBuilder(DatabaseCreatorInterface::class)->onlyMethods(['createIfNotExists', 'getEngine'])->getMock(); $databaseCreatorMock->expects($this->once())->method('createIfNotExists'); - $databaseCreatorCollectionMock = $this->getMockBuilder(DatabaseCreatorCollectionInterface::class)->setMethods(['has', 'get', 'add'])->getMock(); + $databaseCreatorCollectionMock = $this->getMockBuilder(DatabaseCreatorCollectionInterface::class)->onlyMethods(['has', 'get', 'add'])->getMock(); $databaseCreatorCollectionMock->expects($this->once())->method('has')->willReturn(true); $databaseCreatorCollectionMock->expects($this->once())->method('get')->willReturn($databaseCreatorMock); diff --git a/tests/SprykerTest/Zed/Propel/Business/PropelConfigTest.php b/tests/SprykerTest/Zed/Propel/Business/PropelConfigTest.php index 910baae..b4386ac 100644 --- a/tests/SprykerTest/Zed/Propel/Business/PropelConfigTest.php +++ b/tests/SprykerTest/Zed/Propel/Business/PropelConfigTest.php @@ -104,7 +104,7 @@ public function testGetCurrentDatabaseEngineNameThrowsException(): void */ protected function getPropelConfigMock(): PropelConfig { - $propelConfigMock = $this->getMockBuilder(PropelConfig::class)->setMethods(['getCurrentDatabaseEngine'])->getMock(); + $propelConfigMock = $this->getMockBuilder(PropelConfig::class)->onlyMethods(['getCurrentDatabaseEngine'])->getMock(); $propelConfigMock->expects($this->once())->method('getCurrentDatabaseEngine')->willReturn('Un supported database engine'); return $propelConfigMock;