LocaleUpdateTest.php in Drupal 8
File
core/modules/locale/tests/src/Kernel/LocaleUpdateTest.php
View source
<?php
namespace Drupal\Tests\locale\Kernel;
use Drupal\KernelTests\KernelTestBase;
class LocaleUpdateTest extends KernelTestBase {
protected static $modules = [
'locale',
'locale_test',
'system',
];
public function testUpdateProjects() {
$this->container
->get('module_handler')
->loadInclude('locale', 'compare.inc');
\Drupal::state()
->set('locale.test_system_info_alter', TRUE);
$projects = locale_translation_project_list();
$this
->assertArrayNotHasKey('locale_test_translate', $projects);
$this
->assertEquals('core/modules/locale/test/test.%language.po', $projects['locale_test']['info']['interface translation server pattern']);
$this
->assertEquals('locale_test', $projects['locale_test']['name']);
}
}