getUnauthorizedStrategy() публичный Метод

Get the unauthorized strategy options
public getUnauthorizedStrategy ( ) : UnauthorizedStrategyOptions
Результат UnauthorizedStrategyOptions
Пример #1
0
 public function testSettersAndGetters()
 {
     $moduleOptions = new ModuleOptions(['identity_provider' => 'IdentityProvider', 'guest_role' => 'unknown', 'guards' => [], 'protection_policy' => 'deny', 'role_provider' => [], 'assertion_map' => ['foo' => 'bar'], 'unauthorized_strategy' => ['template' => 'error/unauthorized'], 'redirect_strategy' => ['redirect_to_route_connected' => 'home', 'redirect_to_route_disconnected' => 'login']]);
     $this->assertEquals('IdentityProvider', $moduleOptions->getIdentityProvider());
     $this->assertEquals('unknown', $moduleOptions->getGuestRole());
     $this->assertEquals([], $moduleOptions->getGuards());
     $this->assertEquals('deny', $moduleOptions->getProtectionPolicy());
     $this->assertEquals([], $moduleOptions->getRoleProvider());
     $this->assertEquals(['foo' => 'bar'], $moduleOptions->getAssertionMap());
     $this->assertInstanceOf('ZfcRbac\\Options\\UnauthorizedStrategyOptions', $moduleOptions->getUnauthorizedStrategy());
     $this->assertInstanceOf('ZfcRbac\\Options\\RedirectStrategyOptions', $moduleOptions->getRedirectStrategy());
 }