Ejemplo n.º 1
0
 /**
  * @return array
  */
 public function dataProvider()
 {
     $object = new \stdClass();
     $userDisabled = new User();
     $userDisabled->setEnabled(false);
     $userEnabled = new User();
     return [[null, false], [$object, false], [$userDisabled, false], [$userEnabled, true]];
 }
Ejemplo n.º 2
0
 public function testIsEnabled()
 {
     $user = new User();
     $this->assertTrue($user->isEnabled());
     $this->assertTrue($user->isAccountNonExpired());
     $this->assertTrue($user->isAccountNonLocked());
     $user->setEnabled(false);
     $this->assertFalse($user->isEnabled());
     $this->assertFalse($user->isAccountNonLocked());
 }