You are here

public function CasRedirectDataTest::testAllowRedirection in CAS 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/CasRedirectDataTest.php \Drupal\Tests\cas\Unit\CasRedirectDataTest::testAllowRedirection()

Test Force/allow redirectors.

@covers ::willRedirect @covers ::forceRedirection @covers ::preventRedirection

File

tests/src/Unit/CasRedirectDataTest.php, line 68

Class

CasRedirectDataTest
CasRedirectData unit tests.

Namespace

Drupal\Tests\cas\Unit

Code

public function testAllowRedirection() {
  $data = new CasRedirectData();
  $this
    ->assertTrue($data
    ->willRedirect(), 'Default Value');
  $data
    ->forceRedirection();
  $this
    ->assertTrue($data
    ->willRedirect(), 'Forced');
  $data
    ->preventRedirection();
  $this
    ->assertFalse($data
    ->willRedirect(), 'Prevented');
}