Skip to content

Commit 761cdce

Browse files
committed
minor symfony#58191 Mitigate PHPUnit deprecations (6.4) (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- Mitigate PHPUnit deprecations (6.4) | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Like symfony#58190, but for sources added since 6.0. Commits ------- cfe67b6 Mitigate PHPUnit deprecations
2 parents b11e8a2 + cfe67b6 commit 761cdce

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Symfony/Bridge/Doctrine/Tests/ArgumentResolver/EntityValueResolverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public function testResolveWithConversionFailedException()
173173
$repository->expects($this->once())
174174
->method('find')
175175
->with('test')
176-
->will($this->throwException(new ConversionException()));
176+
->willThrowException(new ConversionException());
177177

178178
$manager->expects($this->once())
179179
->method('getRepository')
@@ -381,7 +381,7 @@ public function testExpressionSyntaxErrorThrowsException()
381381

382382
$language->expects($this->once())
383383
->method('evaluate')
384-
->will($this->throwException(new SyntaxError('syntax error message', 10)));
384+
->willThrowException(new SyntaxError('syntax error message', 10));
385385

386386
$this->expectException(\LogicException::class);
387387
$this->expectExceptionMessage('syntax error message around position 10');

src/Symfony/Component/Messenger/Tests/Command/SetupTransportsCommandTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ public function testThrowsExceptionOnTransportSetup()
101101
$serviceLocator = $this->createMock(ServiceLocator::class);
102102
$serviceLocator->expects($this->exactly(1))
103103
->method('get')
104-
->will($this->onConsecutiveCalls(
105-
$amqpTransport
106-
));
104+
->willReturn($amqpTransport);
107105
$serviceLocator
108106
->method('has')
109107
->willReturn(true);

0 commit comments

Comments
 (0)