protected function CasUserManagerTest::setUp in CAS 8
Same name and namespace in other branches
- 2.x tests/src/Unit/Service/CasUserManagerTest.php \Drupal\Tests\cas\Unit\Service\CasUserManagerTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Service/ CasUserManagerTest.php, line 96
Class
- CasUserManagerTest
- CasUserManager unit tests.
Namespace
Drupal\Tests\cas\Unit\ServiceCode
protected function setUp() {
parent::setUp();
$this->externalAuth = $this
->getMockBuilder('\\Drupal\\externalauth\\ExternalAuth')
->disableOriginalConstructor()
->getMock();
$this->authmap = $this
->getMockBuilder('\\Drupal\\externalauth\\Authmap')
->disableOriginalConstructor()
->getMock();
$storage = $this
->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage')
->setMethods(NULL)
->getMock();
$this->session = $this
->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Session\\Session')
->setConstructorArgs([
$storage,
])
->getMock();
$this->session
->start();
$this->connection = $this
->getMockBuilder('\\Drupal\\Core\\Database\\Connection')
->disableOriginalConstructor()
->getMock();
$this->eventDispatcher = $this
->getMockBuilder('\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface')
->disableOriginalConstructor()
->getMock();
$this->casHelper = $this
->getMockBuilder('\\Drupal\\cas\\Service\\CasHelper')
->disableOriginalConstructor()
->getMock();
$this->account = $this
->getMockBuilder('Drupal\\user\\UserInterface')
->disableOriginalConstructor()
->getMock();
$this->casProxyHelper = $this
->prophesize(CasProxyHelper::class);
}