You are here

public function FootermapBlockTest::testAccess in footermap: a footer site map 8

Asserts the access callback for block access based on anonymous user.

File

tests/src/Unit/Plugin/Block/FootermapBlockTest.php, line 251

Class

FootermapBlockTest
Test footermap block methods.

Namespace

Drupal\Tests\footermap\Unit\Plugin\Block

Code

public function testAccess() {
  $block = $this
    ->getPlugin();
  $account = $this->container
    ->get('footermap.anonymous_user');
  $this
    ->assertInstanceOf('\\Drupal\\Core\\Access\\AccessResultAllowed', $block
    ->access($account, TRUE));
  $this
    ->assertTrue($block
    ->access($account));
}