Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 199287e

Browse files
minor #58415 [Cache][Routing] do not use TestCase::getName() when possible (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Cache][Routing] do not use `TestCase::getName()` when possible | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT The method has been removed in PHPUnit 10. Commits ------- 9dd993c do not use TestCase::getName() when possible
2 parents e6e545c + 9dd993c commit 199287e

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)