public function LanguageAccessPermissionsTest::testPermissions in Language access 8
Test the permissions created by LanguageAccessPermissions.
@covers ::permissions
File
- tests/
src/ Kernel/ LanguageAccessPermissionsTest.php, line 48
Class
- LanguageAccessPermissionsTest
- Test the LanguageAccessPermissions class.
Namespace
Drupal\Tests\language_access\KernelCode
public function testPermissions() {
$this
->assertEquals([
'access language en',
], array_keys($this->languageAccessPermissions
->permissions()));
ConfigurableLanguage::createFromLangcode('nl')
->save();
$this
->assertEquals([
'access language nl',
'access language en',
], array_keys($this->languageAccessPermissions
->permissions()));
ConfigurableLanguage::load('nl')
->delete();
$this
->assertEquals([
'access language en',
], array_keys($this->languageAccessPermissions
->permissions()));
}