public function CasPropertyBagTest::testGetPgt in CAS 8
Same name and namespace in other branches
- 2.x tests/src/Unit/CasPropertyBagTest.php \Drupal\Tests\cas\Unit\CasPropertyBagTest::testGetPgt()
Test getting the proxy granting ticket.
@covers ::getPgt
File
- tests/
src/ Unit/ CasPropertyBagTest.php, line 93
Class
- CasPropertyBagTest
- CasPropertyBag unit tests.
Namespace
Drupal\Tests\cas\UnitCode
public function testGetPgt() {
$bag = new CasPropertyBag($this
->randomMachineName(8));
$reflection = new \ReflectionClass($bag);
$property = $reflection
->getProperty('pgt');
$property
->setAccessible(TRUE);
$pgt = $this
->randomMachineName(24);
$property
->setValue($bag, $pgt);
$this
->assertEquals($pgt, $bag
->getPgt());
}