public function testApplication() { $app = new \Roku\Application("dev"); $app->setId("dev"); $app->setName("Test App"); $app->setVersion("0.1.0"); $this->assertEquals(new \Roku\Application("dev", "0.1.0", "Test App"), $app); }
/** * Launch Application * * @param Application $app * Application * @param array $params * Params * @throws Exception * * @return string */ public function launch(Application $app, $params = array()) { $response = $this->client->post($this->getUri("launch", $app->getId()), $params); if ($response->code !== 200) { if ($response->code == 204) { throw new Exception("Application already launched"); } elseif ($response->code == 204) { throw new Exception("Application Not Found"); } else { throw new Exception("Command Error - launch"); } } return $response->raw_body; }