You are here

protected function LocaleConfigSubscriberTest::assertNoTranslation in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php \Drupal\locale\Tests\LocaleConfigSubscriberTest::assertNoTranslation()

Ensures no translation exists.

Parameters

string $config_name: The configuration name.

string $langcode: The language code.

Return value

bool TRUE if the assertion succeeded, FALSE otherwise.

2 calls to LocaleConfigSubscriberTest::assertNoTranslation()
LocaleConfigSubscriberTest::setUpNoTranslation in core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php
Sets up a configuration string without a translation.
LocaleConfigSubscriberTest::testLocaleDeleteTranslation in core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php
Tests deleting community translations of shipped configuration.

File

core/modules/locale/src/Tests/LocaleConfigSubscriberTest.php, line 443
Contains \Drupal\locale\Tests\LocaleConfigSubscriberTest.

Class

LocaleConfigSubscriberTest
Tests that shipped configuration translations are updated correctly.

Namespace

Drupal\locale\Tests

Code

protected function assertNoTranslation($config_name, $langcode) {
  $strings = $this->stringStorage
    ->getTranslations([
    'type' => 'configuration',
    'name' => $config_name,
    'language' => $langcode,
    'translated' => TRUE,
  ]);
  return $this
    ->assertIdentical([], $strings);
}