Exemplo n.º 1
0
 /**
  * @covers \examples\statemachines\Door\Door::unlock
  * @covers \examples\statemachines\Door\AbstractDoorState::unlock
  * @expectedException \examples\statemachines\Door\IllegalStateTransitionException
  */
 public function testCannotUnlock()
 {
     $this->door->unlock();
 }
Exemplo n.º 2
0
 /**
  * @covers \examples\statemachines\Door\Door::unlock
  * @covers \examples\statemachines\Door\LockedDoorState::unlock
  * @uses   \examples\statemachines\Door\Door::isClosedDoorState
  */
 public function testCanUnlock()
 {
     $this->door->unlock();
     $this->assertTrue($this->door->isClosedDoorState());
 }