Skip to content

Commit a3ef161

Browse files
committed
Remove useless uniqid in tempnam calls
1 parent a3e0c68 commit a3ef161

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function setUp(): void
3030
{
3131
parent::setUp();
3232

33-
$this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_matcher.'.uniqid('CompiledUrlMatcher').'.php';
33+
$this->dumpPath = tempnam(sys_get_temp_dir(), 'sf_matcher_');
3434
}
3535

3636
protected function tearDown(): void

Tests/RouterTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ protected function setUp(): void
3535
$this->loader = $this->createMock(LoaderInterface::class);
3636
$this->router = new Router($this->loader, 'routing.yml');
3737

38-
$this->cacheDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('router_', true);
38+
$this->cacheDir = tempnam(sys_get_temp_dir(), 'sf_router_');
39+
unlink($this->cacheDir);
40+
mkdir($this->cacheDir);
3941
}
4042

4143
protected function tearDown(): void

0 commit comments

Comments
 (0)