public function testConstructInitialisesAllTheFields() { $nameMock = uniqid(); $repositoryMock = uniqid(); $tagMock = uniqid(); $configMock = array('test' => uniqid()); $serviceMock = new Service($nameMock, $repositoryMock, $tagMock, $configMock); $this->assertSame($nameMock, $serviceMock->getName()); $this->assertSame($repositoryMock, $serviceMock->getRepository()); $this->assertSame($tagMock, $serviceMock->getTag()); $this->assertSame($configMock, $serviceMock->getConfig()); return $serviceMock; }
public function register(Service $service) { $this->services[$service->getName()] = $service; return $this; }
public function getListName() { $names = Service::getName(); return Response::json($names); }
public function requires(Service $dependenceService) { $this->_dependencies[$dependenceService->getName()] = $dependenceService; return $this; }
function createActionResult(Service $service, Workflows $w, $command, $commandQuery = '') { if (strlen($commandQuery) === 0 || strpos($command, $commandQuery) !== false) { $w->result('', "{$service->getName()} {$command}", $command, ucfirst($command) . " {$service->getName()} service", "assets/{$command}.png", 'yes', "{$service->getName()} > {$command}"); } }