Skip to content

Commit 8fdab64

Browse files
Merge branch '5.4' into 6.2
* 5.4: [Tests] Replace `setMethods()` by `onlyMethods()` and `addMethods()`
2 parents fa643fa + e40da45 commit 8fdab64

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Tests/Loader/ObjectLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function testExceptionOnMethodNotReturningCollection()
8282
{
8383
$this->expectException(\LogicException::class);
8484
$service = $this->getMockBuilder(\stdClass::class)
85-
->setMethods(['loadRoutes'])
85+
->addMethods(['loadRoutes'])
8686
->getMock();
8787
$service->expects($this->once())
8888
->method('loadRoutes')

Tests/Matcher/CompiledRedirectableUrlMatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function getUrlMatcher(RouteCollection $routes, RequestContext $contex
2626

2727
return $this->getMockBuilder(TestCompiledRedirectableUrlMatcher::class)
2828
->setConstructorArgs([$compiledRoutes, $context ?? new RequestContext()])
29-
->setMethods(['redirect'])
29+
->onlyMethods(['redirect'])
3030
->getMock();
3131
}
3232
}

Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ private function generateDumpedMatcher(RouteCollection $collection)
490490

491491
return $this->getMockBuilder(TestCompiledUrlMatcher::class)
492492
->setConstructorArgs([$compiledRoutes, new RequestContext()])
493-
->setMethods(['redirect'])
493+
->onlyMethods(['redirect'])
494494
->getMock();
495495
}
496496

0 commit comments

Comments
 (0)