You are here

public function GingerbreadTest::testAccessors in Bakery Single Sign-On System 8.2

@covers ::getAccountName @covers ::getOrEmail @covers ::getChild @covers ::getChildUid @dataProvider provideTestData

File

tests/src/Unit/Cookies/GingerbreadTest.php, line 37

Class

GingerbreadTest
@coversDefaultClass \Drupal\bakery\Cookies\Gingerbread

Namespace

Drupal\Tests\bakery\Unit\Cookies

Code

public function testAccessors($data) {
  $cookie = Gingerbread::fromData($data);
  $this
    ->assertEquals($data['name'], $cookie
    ->getAccountName());
  $this
    ->assertEquals($data['or_email'], $cookie
    ->getOrEmail());
  $this
    ->assertEquals($data['slave'], $cookie
    ->getChild());
  $this
    ->assertEquals($data['uid'], $cookie
    ->getChildUid());
}