Skip to content

Commit b67a293

Browse files
committedSep 27, 2024
minor #58374 Remove useless parent method calls in tests (alexandre-daubois)
This PR was merged into the 7.2 branch. Discussion ---------- Remove useless parent method calls in tests | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT The vast majority of tests don't call these parent methods, because they are no op. There are a few places where they are called, let's remove them? Commits ------- b54596f604 Remove useless parent method calls in tests
2 parents 35fb8cb + a7424a2 commit b67a293

6 files changed

+0
-16
lines changed
 

‎Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class CompiledUrlGeneratorDumperTest extends TestCase
3333

3434
protected function setUp(): void
3535
{
36-
parent::setUp();
37-
3836
$this->routeCollection = new RouteCollection();
3937
$this->generatorDumper = new CompiledUrlGeneratorDumper($this->routeCollection);
4038
$this->testTmpFilepath = sys_get_temp_dir().'/php_generator.'.$this->getName().'.php';
@@ -45,8 +43,6 @@ protected function setUp(): void
4543

4644
protected function tearDown(): void
4745
{
48-
parent::tearDown();
49-
5046
@unlink($this->testTmpFilepath);
5147
@unlink($this->largeTestTmpFilepath);
5248
}

‎Tests/Loader/AttributeClassLoaderTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ class AttributeClassLoaderTest extends TestCase
5050

5151
protected function setUp(?string $env = null): void
5252
{
53-
parent::setUp();
54-
5553
$this->loader = new TraceableAttributeClassLoader($env);
5654
}
5755

‎Tests/Loader/AttributeDirectoryLoaderTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class AttributeDirectoryLoaderTest extends TestCase
2727

2828
protected function setUp(): void
2929
{
30-
parent::setUp();
31-
3230
$this->classLoader = new TraceableAttributeClassLoader();
3331
$this->loader = new AttributeDirectoryLoader(new FileLocator(), $this->classLoader);
3432
}

‎Tests/Loader/AttributeFileLoaderTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class AttributeFileLoaderTest extends TestCase
3333

3434
protected function setUp(): void
3535
{
36-
parent::setUp();
37-
3836
$this->classLoader = new TraceableAttributeClassLoader();
3937
$this->loader = new AttributeFileLoader(new FileLocator(), $this->classLoader);
4038
}

‎Tests/Loader/DirectoryLoaderTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ class DirectoryLoaderTest extends TestCase
2626

2727
protected function setUp(): void
2828
{
29-
parent::setUp();
30-
3129
$locator = new FileLocator();
3230
$this->loader = new DirectoryLoader($locator);
3331
$resolver = new LoaderResolver([

‎Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,11 @@ class CompiledUrlMatcherDumperTest extends TestCase
2828

2929
protected function setUp(): void
3030
{
31-
parent::setUp();
32-
3331
$this->dumpPath = tempnam(sys_get_temp_dir(), 'sf_matcher_');
3432
}
3533

3634
protected function tearDown(): void
3735
{
38-
parent::tearDown();
39-
4036
@unlink($this->dumpPath);
4137
}
4238

0 commit comments

Comments
 (0)
Failed to load comments.