/** * @covers \examples\statemachines\Door\Door::unlock * @covers \examples\statemachines\Door\AbstractDoorState::unlock * @expectedException \examples\statemachines\Door\IllegalStateTransitionException */ public function testCannotUnlock() { $this->door->unlock(); }
/** * @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()); }