You are here

protected function CasProxyHelperTest::setUp in CAS 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/Service/CasProxyHelperTest.php \Drupal\Tests\cas\Unit\Service\CasProxyHelperTest::setUp()

Overrides UnitTestCase::setUp

File

tests/src/Unit/Service/CasProxyHelperTest.php, line 46

Class

CasProxyHelperTest
CasHelper unit tests.

Namespace

Drupal\Tests\cas\Unit\Service

Code

protected function setUp() {
  parent::setUp();
  $storage = $this
    ->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage')
    ->setMethods(NULL)
    ->getMock();
  $this->session = $this
    ->getMockBuilder('\\Symfony\\Component\\HttpFoundation\\Session\\Session')
    ->setConstructorArgs([
    $storage,
  ])
    ->setMethods(NULL)
    ->getMock();
  $this->session
    ->start();
  $this->casHelper = $this
    ->getMockBuilder('\\Drupal\\cas\\Service\\CasHelper')
    ->disableOriginalConstructor()
    ->getMock();
  $this->database = $this
    ->getMockBuilder('\\Drupal\\Core\\Database\\Connection')
    ->disableOriginalConstructor()
    ->getMock();
}