Chris@0: storage = $this->getMock('Drupal\locale\StringStorageInterface'); Chris@0: $this->cache = $this->getMock('Drupal\Core\Cache\CacheBackendInterface'); Chris@0: $this->lock = $this->getMock('Drupal\Core\Lock\LockBackendInterface'); Chris@0: $this->languageManager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface'); Chris@0: $this->requestStack = new RequestStack(); Chris@0: } Chris@0: Chris@0: /** Chris@0: * Tests for \Drupal\locale\LocaleTranslation::destruct(). Chris@0: */ Chris@0: public function testDestruct() { Chris@0: $translation = new LocaleTranslation($this->storage, $this->cache, $this->lock, $this->getConfigFactoryStub(), $this->languageManager, $this->requestStack); Chris@0: // Prove that destruction works without errors when translations are empty. Chris@0: $this->assertAttributeEmpty('translations', $translation); Chris@0: $translation->destruct(); Chris@0: } Chris@0: Chris@0: }