Skip to content

Commit d67a0bb

Browse files
committed
minor symfony#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 ------- b54596f Remove useless parent method calls in tests
2 parents b4bde0a + b54596f commit d67a0bb

File tree

39 files changed

+0
-89
lines changed

39 files changed

+0
-89
lines changed

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class DoctrineExtensionTest extends TestCase
2828

2929
protected function setUp(): void
3030
{
31-
parent::setUp();
32-
3331
$this->extension = $this
3432
->getMockBuilder(AbstractDoctrineExtension::class)
3533
->onlyMethods([

src/Symfony/Bridge/Doctrine/Tests/Middleware/Debug/MiddlewareTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ class MiddlewareTest extends TestCase
3838

3939
protected function setUp(): void
4040
{
41-
parent::setUp();
42-
4341
if (!interface_exists(MiddlewareInterface::class)) {
4442
$this->markTestSkipped(\sprintf('%s needed to run this test', MiddlewareInterface::class));
4543
}

src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ protected function getExtensions()
5858
protected function tearDown(): void
5959
{
6060
\Locale::setDefault($this->defaultLocale);
61-
62-
parent::tearDown();
6361
}
6462

6563
protected function assertWidgetMatchesXpath(FormView $view, array $vars, $xpath)

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/UidTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ class UidTest extends AbstractWebTestCase
2020
{
2121
protected function setUp(): void
2222
{
23-
parent::setUp();
24-
2523
self::deleteTmpDir();
2624
}
2725

src/Symfony/Bundle/WebProfilerBundle/Tests/DependencyInjection/WebProfilerExtensionTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ public static function assertSaneContainer(Container $container)
5454

5555
protected function setUp(): void
5656
{
57-
parent::setUp();
58-
5957
$this->kernel = $this->createMock(KernelInterface::class);
6058

6159
$profiler = $this->createMock(Profiler::class);
@@ -88,8 +86,6 @@ protected function setUp(): void
8886

8987
protected function tearDown(): void
9088
{
91-
parent::tearDown();
92-
9389
$this->container = null;
9490
}
9591

src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ class TemplateManagerTest extends TestCase
3030

3131
protected function setUp(): void
3232
{
33-
parent::setUp();
34-
3533
$this->profiler = $this->createMock(Profiler::class);
3634
$twigEnvironment = $this->mockTwigEnvironment();
3735
$templates = [

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ abstract class AdapterTestCase extends CachePoolTest
2323
{
2424
protected function setUp(): void
2525
{
26-
parent::setUp();
27-
2826
if (!\array_key_exists('testPrune', $this->skippedTests) && !$this->createCachePool() instanceof PruneableInterface) {
2927
$this->skippedTests['testPrune'] = 'Not a pruneable cache pool.';
3028
}

src/Symfony/Component/Cache/Tests/Psr16CacheProxyTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class Psr16CacheProxyTest extends SimpleCacheTest
2121
{
2222
protected function setUp(): void
2323
{
24-
parent::setUp();
25-
2624
try {
2725
\assert(false === true, new \Exception());
2826
$this->skippedTests['testGetInvalidKeys'] =

src/Symfony/Component/Cache/Tests/Psr16CacheTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ class Psr16CacheTest extends SimpleCacheTest
2424
{
2525
protected function setUp(): void
2626
{
27-
parent::setUp();
28-
2927
if (\array_key_exists('testPrune', $this->skippedTests)) {
3028
return;
3129
}

src/Symfony/Component/Cache/Tests/Psr16CacheWithExternalAdapter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ class Psr16CacheWithExternalAdapter extends SimpleCacheTest
2323
{
2424
protected function setUp(): void
2525
{
26-
parent::setUp();
27-
2826
$this->skippedTests['testSetTtl'] =
2927
$this->skippedTests['testSetMultipleTtl'] = 'The ExternalAdapter test class does not support TTLs.';
3028
}

0 commit comments

Comments
 (0)