You are here

protected function WardenManagerTest::setUp in Warden 8

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

Overrides UnitTestCase::setUp

File

tests/src/Unit/Service/WardenManagerTest.php, line 38

Class

WardenManagerTest
@coversDefaultClass \Drupal\warden\Service\WardenManager @group warden

Namespace

Drupal\Tests\warden\Unit\Service

Code

protected function setUp() {
  parent::setUp();
  $this->token = hash('sha256', 42);
  $this->infoParser = $this
    ->getMock('Drupal\\Core\\Extension\\InfoParser', array(), array(), '', FALSE);
  $this->configFactory = $this
    ->getMock('Drupal\\Core\\Config\\ConfigFactory', array(), array(), '', FALSE);
  $this
    ->expectConfigFactoryAccess();
  $this->wardenManager = new WardenManager($this->configFactory);
  $this->wardenManager
    ->setBaseUrl('http://www.example.com')
    ->setTime(12345678)
    ->setInfoParser($this->infoParser)
    ->setThemes([])
    ->setModules([]);
}