public function CookieMonsterTest::setUp in Bakery Single Sign-On System 8.2
Overrides UnitTestCase::setUp
File
- tests/src/ Unit/ EventSubscriber/ CookieMonsterTest.php, line 46 
Class
- CookieMonsterTest
- @coversDefaultClass \Drupal\bakery\EventSubscriber\CookieMonster
Namespace
Drupal\Tests\bakery\Unit\EventSubscriberCode
public function setUp() {
  parent::setUp();
  $this->request = new RequestStack();
  $this->request
    ->push(new Request());
  $this->time = new Time($this->request);
  $config = new Config('config.test', new MemoryStorage(), new EventDispatcher(), $this
    ->prophesize(TypedConfigManagerInterface::class)
    ->reveal());
  $config
    ->set('bakery_domain', '.example.com');
  $config
    ->set('bakery_freshness', 3600);
  $cf = $this
    ->prophesize(ConfigFactoryInterface::class);
  $cf
    ->get('bakery.settings')
    ->willReturn($config);
  $this->cookieJar = new ParameterBag();
  $this->sot = new CookieMonster($this->time, $cf
    ->reveal(), $this->cookieJar);
}