public function testDashboard() { $this->manager->publish(new TemperatureMessage(1), Log::TOPIC_HLT_CURR_TEMP); $this->manager->publish(new TemperatureMessage(2), Log::TOPIC_MLT_CURR_TEMP); $this->manager->publish(new TemperatureMessage(3), Log::TOPIC_BLT_CURR_TEMP); $this->brewControlManager->setMashTemperature(4); $this->manager->publish(new PumpModeMessage(Pump::MODE_AUTOMATIC), Log::TOPIC_PUMP_CURR_MODE); usleep(500000); $this->manager->publish(new PumpModeMessage(Pump::MODE_MANUAL), Log::TOPIC_PUMP_CURR_MODE); usleep(500000); $this->manager->publish(new PumpStateMessage(Pump::STATE_ON), Log::TOPIC_PUMP_CURR_STATE); usleep(500000); $this->manager->publish(new PumpStateMessage(Pump::STATE_OFF), Log::TOPIC_PUMP_CURR_STATE); usleep(500000); $this->manager->publish(new PumpModeMessage(Pump::MODE_AUTOMATIC), Log::TOPIC_PUMP_CURR_MODE); usleep(500000); $this->manager->publish(new PumpModeMessage(Pump::MODE_MANUAL), Log::TOPIC_PUMP_CURR_MODE); }
/** * @expectedException \InvalidArgumentException */ public function testInvalidPumpMode() { $this->brewControlManager->setPumpMode('test'); }
/** * Visual test: * - PUMP led should be inactive * - PUMP led should become active * - PUMP led should become inactive */ public function testRelaisLEDs() { $this->brewControlManager->setMashTemperature(22); }