Esempio n. 1
0
 /**
  * @covers Door::open
  * @covers AbstractDoorState::open
  * @expectedException IllegalStateTransitionException
  */
 public function testCannotBeOpened()
 {
     $this->door->open();
 }
Esempio n. 2
0
<?php

include "door.php";
$door1 = new Door();
$door2 = new Door();
$door1->height = 15;
$door1->setColor("black");
//$door1->color = "black";
$door2->open();
echo "The height of door1 is: " . $door1->height;
echo "<br>The color of door1 is: " . $door1->getColor();
Esempio n. 3
0
 /**
  * @covers Door::open
  * @covers ClosedDoorState::open
  * @uses   Door::isOpen
  */
 public function testCanBeOpened()
 {
     $this->door->open();
     $this->assertTrue($this->door->isOpen());
 }