You are here

protected function ExternalAuthTest::setUp in External Authentication 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Unit/ExternalAuthTest.php \Drupal\Tests\externalauth\Unit\ExternalAuthTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/ExternalAuthTest.php, line 52

Class

ExternalAuthTest
ExternalAuth unit tests.

Namespace

Drupal\Tests\externalauth\Unit

Code

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

  // Create a mock EntityTypeManager object.
  $this->entityTypeManager = $this
    ->createMock(EntityTypeManagerInterface::class);

  // Create a Mock Logger object.
  $this->logger = $this
    ->getMockBuilder('\\Psr\\Log\\LoggerInterface')
    ->disableOriginalConstructor()
    ->getMock();

  // Create a Mock EventDispatcher object.
  $this->eventDispatcher = $this
    ->getMockBuilder('\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface')
    ->disableOriginalConstructor()
    ->getMock();

  // Create a Mock Authmap object.
  $this->authmap = $this
    ->getMockBuilder('\\Drupal\\externalauth\\Authmap')
    ->disableOriginalConstructor()
    ->getMock();
}