You are here

public function CasPropertyBagTest::testConstruct in CAS 2.x

Same name and namespace in other branches
  1. 8 tests/src/Unit/CasPropertyBagTest.php \Drupal\Tests\cas\Unit\CasPropertyBagTest::testConstruct()

Test constructing a bag with a username.

@covers ::__construct

File

tests/src/Unit/CasPropertyBagTest.php, line 23

Class

CasPropertyBagTest
CasPropertyBag unit tests.

Namespace

Drupal\Tests\cas\Unit

Code

public function testConstruct() {
  $name = $this
    ->randomMachineName(8);
  $bag = new CasPropertyBag($name);
  $this
    ->assertEquals($name, $bag
    ->getUsername());
  $this
    ->assertEquals($name, $bag
    ->getOriginalUsername());
}