public function EditEntityFieldAccessCheckTest::testAccessForbidden in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/quickedit/tests/src/Unit/Access/EditEntityFieldAccessCheckTest.php \Drupal\Tests\quickedit\Unit\Access\EditEntityFieldAccessCheckTest::testAccessForbidden()
Tests checking access to routes that result in AccessResult::isForbidden().
@dataProvider providerTestAccessForbidden
File
- core/
modules/ quickedit/ tests/ src/ Unit/ Access/ EditEntityFieldAccessCheckTest.php, line 106 - Contains \Drupal\Tests\quickedit\Unit\Access\EditEntityFieldAccessCheckTest.
Class
- EditEntityFieldAccessCheckTest
- @coversDefaultClass \Drupal\quickedit\Access\EditEntityFieldAccessCheck @group Access @group quickedit
Namespace
Drupal\Tests\quickedit\Unit\AccessCode
public function testAccessForbidden($field_name, $langcode) {
$account = $this
->getMock('Drupal\\Core\\Session\\AccountInterface');
$entity = $this
->createMockEntity();
$this
->assertEquals(AccessResult::forbidden(), $this->editAccessCheck
->access($entity, $field_name, $langcode, $account));
}