Skip to content

Commit 29a9f63

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: [PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type Update security.nl.xlf [Validator] IBAN Check digits should always between 2 and 98 [Security] Populate translations for trans-unit 20 add missing plural translation messages filter out empty HTTP header parts [String] Fix folded in compat mode Remove calls to `getMockForAbstractClass()` [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode [Serializer] Fix type for missing property add test for JSON response with null as content [Filesystem] Fix dumpFile `stat failed` error hitting custom handler Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder` [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10
2 parents 8a9af46 + 22f15a6 commit 29a9f63

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Tests/Loader/ObjectLoaderTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ public function testExceptionOnBadMethod()
8181
public function testExceptionOnMethodNotReturningCollection()
8282
{
8383
$this->expectException(\LogicException::class);
84-
$service = $this->getMockBuilder(\stdClass::class)
85-
->addMethods(['loadRoutes'])
86-
->getMock();
84+
85+
$service = $this->createMock(CustomRouteLoader::class);
8786
$service->expects($this->once())
8887
->method('loadRoutes')
8988
->willReturn('NOT_A_COLLECTION');
@@ -109,6 +108,11 @@ protected function getObject(string $id): object
109108
}
110109
}
111110

111+
interface CustomRouteLoader
112+
{
113+
public function loadRoutes();
114+
}
115+
112116
class TestObjectLoaderRouteService
113117
{
114118
private RouteCollection $collection;

Tests/Matcher/RedirectableUrlMatcherTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ public function testTrailingRequirementWithDefaultA()
211211

212212
protected function getUrlMatcher(RouteCollection $routes, ?RequestContext $context = null)
213213
{
214-
return $this->getMockForAbstractClass(RedirectableUrlMatcher::class, [$routes, $context ?? new RequestContext()]);
214+
return $this->getMockBuilder(RedirectableUrlMatcher::class)
215+
->setConstructorArgs([$routes, $context ?? new RequestContext()])
216+
->onlyMethods(['redirect'])
217+
->getMock();
215218
}
216219
}

0 commit comments

Comments
 (0)