You are here

public function BrowserCookieTraitTest::testGetIsMain in Bakery Single Sign-On System 8.2

@covers ::getIsMain @covers ::getBakeryService

File

tests/src/Unit/Cookies/BrowserCookieTraitTest.php, line 40

Class

BrowserCookieTraitTest
@coversDefaultClass \Drupal\bakery\Cookies\BrowserCookieTrait

Namespace

Drupal\Tests\bakery\Unit\Cookies

Code

public function testGetIsMain() {
  $this->bakeryService
    ->isMain()
    ->shouldBeCalledOnce()
    ->willReturn(TRUE);
  $this
    ->assertTrue((new class {
    use BrowserCookieTrait;
    public function test() {
      return $this
        ->getIsMain();
    }

  })
    ->test());
}