Skip to content

Commit ec6e34d

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: [Serializer] Improve exception message in UnwrappingDenormalizer [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 Return false in isTtySupported() when open_basedir restrictions prevent access to /dev/tty. Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder` [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10
2 parents e866ee8 + 2561221 commit ec6e34d

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
@@ -86,9 +86,8 @@ public function testExceptionOnBadMethod()
8686

8787
public function testExceptionOnMethodNotReturningCollection()
8888
{
89-
$service = $this->getMockBuilder(\stdClass::class)
90-
->addMethods(['loadRoutes'])
91-
->getMock();
89+
$service = $this->createMock(CustomRouteLoader::class);
90+
9291
$service->expects($this->once())
9392
->method('loadRoutes')
9493
->willReturn('NOT_A_COLLECTION');
@@ -117,6 +116,11 @@ protected function getObject(string $id): object
117116
}
118117
}
119118

119+
interface CustomRouteLoader
120+
{
121+
public function loadRoutes();
122+
}
123+
120124
class TestObjectLoaderRouteService
121125
{
122126
private RouteCollection $collection;

Tests/Matcher/RedirectableUrlMatcherTest.php

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

214214
protected function getUrlMatcher(RouteCollection $routes, ?RequestContext $context = null)
215215
{
216-
return $this->getMockForAbstractClass(RedirectableUrlMatcher::class, [$routes, $context ?? new RequestContext()]);
216+
return $this->getMockBuilder(RedirectableUrlMatcher::class)
217+
->setConstructorArgs([$routes, $context ?? new RequestContext()])
218+
->onlyMethods(['redirect'])
219+
->getMock();
217220
}
218221
}

0 commit comments

Comments
 (0)