protected function SimplesamlphpDrupalAuthTest::setUp in simpleSAMLphp Authentication 8.3
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Service/ SimplesamlphpDrupalAuthTest.php, line 80
Class
- SimplesamlphpDrupalAuthTest
- SimplesamlphpDrupalAuth unit tests.
Namespace
Drupal\Tests\simplesamlphp_auth\Unit\ServiceCode
protected function setUp() {
parent::setUp();
$this->entityTypeManager = $this
->createMock('\\Drupal\\Core\\Entity\\EntityTypeManagerInterface');
$this->logger = $this
->getMockBuilder('\\Psr\\Log\\LoggerInterface')
->disableOriginalConstructor()
->getMock();
$this->messenger = $this
->getMockBuilder(MessengerInterface::class)
->disableOriginalConstructor()
->getMock();
$this->moduleHandler = $this
->getMockBuilder(ModuleHandlerInterface::class)
->disableOriginalConstructor()
->getMock();
$this->moduleHandler
->expects($this
->any())
->method('alter');
$this->simplesaml = $this
->getMockBuilder('\\Drupal\\simplesamlphp_auth\\Service\\SimplesamlphpAuthManager')
->disableOriginalConstructor()
->getMock();
$this->configFactory = $this
->getConfigFactoryStub([
'simplesamlphp_auth.settings' => [
'register_users' => TRUE,
'activate' => TRUE,
'mail_attr' => 'mail',
],
]);
$this->externalauth = $this
->createMock('\\Drupal\\externalauth\\ExternalAuthInterface');
// Create a Mock User object to test against.
$this->entityAccount = $this
->createMock('Drupal\\user\\UserInterface');
}