コード例 #1
0
ファイル: OpenDoorTest.php プロジェクト: anis-marrouchi/state
 /**
  * @covers Door::unlock
  * @covers AbstractDoorState::unlock
  * @expectedException IllegalStateTransitionException
  */
 public function testCannotBeUnlocked()
 {
     $this->door->unlock();
 }
コード例 #2
0
 /**
  * @covers Door::unlock
  * @covers LockedDoorState::unlock
  * @uses   Door::isClosed
  */
 public function testCanBeUnlocked()
 {
     $this->door->unlock();
     $this->assertTrue($this->door->isClosed());
 }