function LocaleTranslationTest::testDestruct

Same name and namespace in other branches
  1. 9 core/modules/locale/tests/src/Unit/LocaleTranslationTest.php \Drupal\Tests\locale\Unit\LocaleTranslationTest::testDestruct()
  2. 8.9.x core/modules/locale/tests/src/Unit/LocaleTranslationTest.php \Drupal\Tests\locale\Unit\LocaleTranslationTest::testDestruct()
  3. 10 core/modules/locale/tests/src/Unit/LocaleTranslationTest.php \Drupal\Tests\locale\Unit\LocaleTranslationTest::testDestruct()

Tests for \Drupal\locale\LocaleTranslation::destruct().

File

core/modules/locale/tests/src/Unit/LocaleTranslationTest.php, line 70

Class

LocaleTranslationTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21locale%21src%21LocaleTranslation.php/class/LocaleTranslation/11.x" title="String translator using the locale module." class="local">\Drupal\locale\LocaleTranslation</a> @group locale

Namespace

Drupal\Tests\locale\Unit

Code

public function testDestruct() : void {
    $translation = new LocaleTranslation($this->storage, $this->cache, $this->lock, $this->getConfigFactoryStub(), $this->languageManager, $this->requestStack);
    // Prove that destruction works without errors when translations are empty.
    $this->assertNull($translation->destruct());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.