You are here

protected function NodeOptionPremiumHelperTest::setUp in Node Option Premium 8

Overrides UnitTestCase::setUp

File

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

Class

NodeOptionPremiumHelperTest
@coversDefaultClass \Drupal\nopremium\NodeOptionPremiumHelper

Namespace

Drupal\Tests\nopremium\Unit

Code

protected function setUp() {
  parent::setUp();

  // Create the service to test.
  $this->helper = new NodeOptionPremiumHelper();

  // Create the entity to test with.
  $this->entity = $this
    ->prophesize(ContentEntityInterface::class);

  // The entity's bundle is 'foo'.
  $this->entity
    ->bundle()
    ->willReturn('foo');

  // Create the account to test with.
  $this->account = $this
    ->prophesize(AccountInterface::class);
}