Ejemplo n.º 1
0
 /**
  * Test setting the login status.
  *
  * @covers ::setLoginStatus
  */
 public function testSetLoginStatus()
 {
     $bag = new CasPropertyBag($this->randomMachineName(8));
     $bag->setLoginStatus(FALSE);
     $this->assertEquals(FALSE, \PHPUnit_Framework_Assert::readAttribute($bag, 'loginStatus'));
 }
Ejemplo n.º 2
0
 /**
  * Provides parameters and exceptions for testLoginToDrupalListenerDenied
  *
  * @return array
  *   Parameters and exceptions
  *
  * @see \Drupal\Tests\cas\Unit\Service\CasLoginTest::testLoginToDrupalListenerDenied
  */
 public function loginToDrupalListenerDeniedDataProvider()
 {
     // Test denying login access.
     $bag1 = new CasPropertyBag($this->randomMachineName(8));
     $bag1->setLoginStatus(FALSE);
     $message1 = 'Cannot login, an event listener denied access.';
     // Test denying register access.
     $bag2 = new CasPropertyBag($this->randomMachineName(8));
     $bag2->setRegisterStatus(FALSE);
     $message2 = 'Cannot register user, an event listener denied access.';
     return array(array($bag1, $message1), array($bag2, $message2));
 }