Example #1
0
 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;
 }
Example #2
0
 public function register(Service $service)
 {
     $this->services[$service->getName()] = $service;
     return $this;
 }
Example #3
0
 public function getListName()
 {
     $names = Service::getName();
     return Response::json($names);
 }
Example #4
0
 public function requires(Service $dependenceService)
 {
     $this->_dependencies[$dependenceService->getName()] = $dependenceService;
     return $this;
 }
Example #5
0
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}");
    }
}