Skip to content

Commit 9d5f112

Browse files
committed
Migrate to willReturn()
self::returnValue() and self::onConsecutiveCalls() has been deprecated.
1 parent b7423c9 commit 9d5f112

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/Tests/ORM/Query/QueryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ private function createConnection(Result ...$results): Connection
596596
{
597597
$driverConnection = $this->createMock(Driver\Connection::class);
598598
$driverConnection->method('query')
599-
->will($this->onConsecutiveCalls(...$results));
599+
->willReturnOnConsecutiveCalls(...$results);
600600

601601
$platform = $this->getMockBuilder(AbstractPlatform::class)
602602
->setConstructorArgs(enum_exists(UnquotedIdentifierFolding::class) ? [UnquotedIdentifierFolding::UPPER] : [])

tests/Tests/ORM/Repository/DefaultRepositoryFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function testCachesDistinctRepositoriesPerDistinctEntityManager(): void
111111
private function buildClassMetadata(string $className): ClassMetadata&MockObject
112112
{
113113
$metadata = $this->createMock(ClassMetadata::class);
114-
$metadata->method('getName')->will(self::returnValue($className));
114+
$metadata->method('getName')->willReturn($className);
115115
$metadata->name = $className;
116116

117117
$metadata->customRepositoryClassName = null;

0 commit comments

Comments
 (0)