You are here

public function NodeOptionPremiumHelperTest::testHasFullAccessOnEntityWithNoPremiumField in Node Option Premium 8

Tests full access on an entity without a premium field.

@covers ::hasFullAccess

File

tests/src/Unit/NodeOptionPremiumHelperTest.php, line 83

Class

NodeOptionPremiumHelperTest
@coversDefaultClass \Drupal\nopremium\NodeOptionPremiumHelper

Namespace

Drupal\Tests\nopremium\Unit

Code

public function testHasFullAccessOnEntityWithNoPremiumField() {

  // Configure that the entity has *no* premium field.
  $this->entity
    ->hasField('premium')
    ->willReturn(FALSE);
  $this
    ->assertTrue($this->helper
    ->hasFullAccess($this->entity
    ->reveal(), $this->account
    ->reveal()));
}