public function CasRedirectDataTest::testServiceParmaeters in CAS 8
Same name and namespace in other branches
- 2.x tests/src/Unit/CasRedirectDataTest.php \Drupal\Tests\cas\Unit\CasRedirectDataTest::testServiceParmaeters()
Test Service parameter setters and getters.
@covers ::setServiceParameter @covers ::getServiceParameter @covers ::getAllServiceParameters
File
- tests/
src/ Unit/ CasRedirectDataTest.php, line 48
Class
- CasRedirectDataTest
- CasRedirectData unit tests.
Namespace
Drupal\Tests\cas\UnitCode
public function testServiceParmaeters() {
$data = new CasRedirectData();
$data
->setServiceParameter('returnto', 'node/1');
$parms = $data
->getAllServiceParameters();
$this
->assertEquals('node/1', $parms['returnto']);
$this
->assertEquals('node/1', $data
->getServiceParameter('returnto'), 'Getter');
$data
->setServiceParameter('returnto', NULL);
$parms = $data
->getAllServiceParameters();
$this
->assertArrayNotHasKey('returnto', $parms, 'Service parameter removal');
}