Skip to content

Commit

Permalink
minor #58374 Remove useless parent method calls in tests (alexandre-d…
Browse files Browse the repository at this point in the history
…aubois)

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
  • Loading branch information
fabpot committed Sep 27, 2024
2 parents 08008d9 + 0ef2896 commit 4d6fe10
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions Tests/Command/TranslationProviderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ abstract class TranslationProviderTestCase extends TestCase

protected function setUp(): void
{
parent::setUp();
$this->defaultLocale = \Locale::getDefault();
\Locale::setDefault('en');
$this->fs = new Filesystem();
Expand All @@ -42,7 +41,6 @@ protected function tearDown(): void
{
\Locale::setDefault($this->defaultLocale);
$this->fs->remove($this->translationAppDir);
parent::tearDown();
}

protected function getProviderCollection(ProviderInterface $provider, array $providerNames = ['loco'], array $locales = ['en'], array $domains = ['messages']): TranslationProviderCollection
Expand Down
4 changes: 0 additions & 4 deletions Tests/LocaleSwitcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ class LocaleSwitcherTest extends TestCase

protected function setUp(): void
{
parent::setUp();

$this->intlLocale = \Locale::getDefault();
}

protected function tearDown(): void
{
parent::tearDown();

\Locale::setDefault($this->intlLocale);
}

Expand Down

0 comments on commit 4d6fe10

Please sign in to comment.