You are here

public function BaseFieldAccessTest::testProtectedField in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php \Drupal\Tests\views\Functional\Entity\BaseFieldAccessTest::testProtectedField()

Tests access to protected base fields.

File

core/modules/views/tests/src/Functional/Entity/BaseFieldAccessTest.php, line 67

Class

BaseFieldAccessTest
Tests views base field access.

Namespace

Drupal\Tests\views\Functional\Entity

Code

public function testProtectedField() {
  $this
    ->drupalGet('test-entity-protected-access');
  $this
    ->assertSession()
    ->pageTextContains('ok to see this one');
  $this
    ->assertSession()
    ->pageTextNotContains('no access value');
}