Skip to content

Commit 9dd993c

Browse files
committed
do not use TestCase::getName() when possible
The method has been removed in PHPUnit 10.
1 parent fe74ff3 commit 9dd993c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function createCachePool(int $defaultLifetime = 0): CacheItemPoolInterfac
3030
$this->markTestSkipped('APCu extension is required.');
3131
}
3232
if ('cli' === \PHP_SAPI && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) {
33-
if ('testWithCliSapi' !== $this->getName()) {
33+
if ('testWithCliSapi' !== (method_exists($this, 'name') ? $this->name() : $this->getName())) {
3434
$this->markTestSkipped('apc.enable_cli=1 is required.');
3535
}
3636
}

src/Symfony/Component/Routing/Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ protected function setUp(): void
5252

5353
$this->routeCollection = new RouteCollection();
5454
$this->generatorDumper = new CompiledUrlGeneratorDumper($this->routeCollection);
55-
$this->testTmpFilepath = sys_get_temp_dir().'/php_generator.'.$this->getName().'.php';
56-
$this->largeTestTmpFilepath = sys_get_temp_dir().'/php_generator.'.$this->getName().'.large.php';
55+
$this->testTmpFilepath = sys_get_temp_dir().'/php_generator.php';
56+
$this->largeTestTmpFilepath = sys_get_temp_dir().'/php_generator.large.php';
5757
@unlink($this->testTmpFilepath);
5858
@unlink($this->largeTestTmpFilepath);
5959
}

0 commit comments

Comments
 (0)