LanguageEntityFieldAccessHookTest.php in Drupal 9
File
core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php
View source
<?php
namespace Drupal\Tests\language\Functional;
use Drupal\Tests\BrowserTestBase;
class LanguageEntityFieldAccessHookTest extends BrowserTestBase {
protected static $modules = [
'node',
'text',
'field',
'filter',
'language',
'language_entity_field_access_test',
];
protected $defaultTheme = 'stark';
public function testHookEntityFieldAccess() {
$user = $this
->drupalCreateUser([], NULL, TRUE);
$this
->drupalLogin($user);
$this
->drupalGet('node/add/page');
$this
->assertSession()
->fieldNotExists('langcode[0][value]');
$this
->drupalLogout();
}
}