public function testSetCurrentTube_updatesCurrentTube() { $tubeStatus = new TubeStatus(); $tubeStatus->setCurrentTube(self::TEST_TUBE); $this->assertEquals(self::TEST_TUBE, $tubeStatus->getCurrentTube()); }
/** * @return string */ public function getName() { return $this->tubeStatus->getCurrentTube(); }
/** * @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; }