
| Current Path : /var/www/html1/web/core/modules/language/tests/src/Functional/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/web/core/modules/language/tests/src/Functional/LanguageEntityFieldAccessHookTest.php |
<?php
namespace Drupal\Tests\language\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* Tests language picker compatibility with hook_entity_field_access.
*
* @group language
*/
class LanguageEntityFieldAccessHookTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = [
'node',
'text',
'field',
'filter',
'language',
'language_entity_field_access_test',
];
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests compatibility with hook_entity_field_access().
*/
public function testHookEntityFieldAccess() {
// Create an admin user and do the login.
$user = $this->drupalCreateUser([], NULL, TRUE);
$this->drupalLogin($user);
// Assess the field is not visible.
$this->drupalGet('node/add/page');
$this->assertSession()->fieldNotExists('langcode[0][value]');
$this->drupalLogout();
}
}