function DependentAccessTest::setUp

Same name in other branches
  1. 8.9.x core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php \Drupal\Tests\block_content\Unit\Access\DependentAccessTest::setUp()
  2. 10 core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php \Drupal\Tests\block_content\Unit\Access\DependentAccessTest::setUp()
  3. 11.x core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php \Drupal\Tests\block_content\Unit\Access\DependentAccessTest::setUp()

Overrides UnitTestCase::setUp

File

core/modules/block_content/tests/src/Unit/Access/DependentAccessTest.php, line 37

Class

DependentAccessTest
@coversDefaultClass \Drupal\block_content\Access\RefinableDependentAccessTrait

Namespace

Drupal\Tests\block_content\Unit\Access

Code

protected function setUp() : void {
    parent::setUp();
    $this->account = $this->prophesize(AccountInterface::class)
        ->reveal();
    $this->forbidden = $this->createAccessibleDouble(AccessResult::forbidden('Because I said so'));
    $this->neutral = $this->createAccessibleDouble(AccessResult::neutral('I have no opinion'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.