require_once 'core/includes/install.inc';
// Prime the \Drupal\Core\Extension\ExtensionList::getPathname() static
// cache with the location of the testing profile as it isn't the currently
// active profile and we don't yet have any cached way to retrieve its
// location.
// @todo Remove as part of https://www.drupal.org/node/2186491
$profile_list = \Drupal::
service('extension.list.profile'
);
assert($profile_list instanceof ProfileExtensionList
);
$profile_list->
setPathname('testing', 'core/profiles/testing/testing.info.yml'
);
$info_en =
install_profile_info('testing', 'en'
);
$info_nl =
install_profile_info('testing', 'nl'
);
$this->
assertNotContains('locale',
$info_en['install'
], 'Locale is not set when installing in English.'
);
$this->
assertContains('locale',
$info_nl['install'
], 'Locale is set when installing in Dutch.'
);
}}