Ejemplo n.º 1
0
 public function testSetCurrentTube_updatesCurrentTube()
 {
     $tubeStatus = new TubeStatus();
     $tubeStatus->setCurrentTube(self::TEST_TUBE);
     $this->assertEquals(self::TEST_TUBE, $tubeStatus->getCurrentTube());
 }
Ejemplo n.º 2
0
 /**
  * @return string
  */
 public function getName()
 {
     return $this->tubeStatus->getCurrentTube();
 }
Ejemplo n.º 3
0
 /**
  * @param TubeStatus $goal
  * @param int $mode
  * @return \Beanie\Command\CommandInterface[]
  */
 public function calculateTransformationTo(TubeStatus $goal, $mode = self::TRANSFORM_BOTH)
 {
     $commands = [];
     if ($mode & self::TRANSFORM_WATCHED) {
         $commands = $this->calculateTransformWatched($goal->getWatchedTubes());
     }
     if ($mode & self::TRANSFORM_USE && $goal->getCurrentTube() !== $this->currentTube) {
         $commands[] = $this->commandFactory->create(CommandInterface::COMMAND_USE, [$goal->getCurrentTube()]);
     }
     return $commands;
 }