Ejemplo n.º 1
0
 /**
  * @covers \examples\statemachines\Door\Door::lock
  * @covers \examples\statemachines\Door\ClosedDoorState::lock
  * @uses   \examples\statemachines\Door\Door::isLockedDoorState
  */
 public function testCanLock()
 {
     $this->door->lock();
     $this->assertTrue($this->door->isLockedDoorState());
 }
Ejemplo n.º 2
0
 /**
  * @covers \examples\statemachines\Door\Door::lock
  * @covers \examples\statemachines\Door\AbstractDoorState::lock
  * @expectedException \examples\statemachines\Door\IllegalStateTransitionException
  */
 public function testCannotLock()
 {
     $this->door->lock();
 }