public function setup() { $this->runner = \Mockery::mock("Silktide\\Teamster\\Pool\\Runner\\RunnerInterface"); $this->runnerFactory = \Mockery::mock("Silktide\\Teamster\\Pool\\Runner\\RunnerFactory"); $this->runnerFactory->shouldReceive("createRunner")->andReturn($this->runner); $this->pid = \Mockery::mock("Silktide\\Teamster\\Pool\\Pid\\PidInterface")->shouldIgnoreMissing(true); $this->pidFactory = \Mockery::mock("Silktide\\Teamster\\Pool\\Pid\\PidFactoryInterface"); $this->pidFactory->shouldReceive("create")->andReturn($this->pid); $this->inputDefinition = \Mockery::mock("Symfony\\Component\\Console\\Input\\InputDefinition"); $this->input = \Mockery::mock("Symfony\\Component\\Console\\Input\\InputInterface"); $this->output = \Mockery::mock("Symfony\\Component\\Console\\Output\\OutputInterface")->shouldIgnoreMissing(); vfsStreamWrapper::register(); vfsStreamWrapper::setRoot(new vfsStreamDirectory($this->testDir)); }
public function setup() { $this->runner = \Mockery::mock("Silktide\\Teamster\\Pool\\Runner\\RunnerInterface")->shouldIgnoreMissing(); $this->runner->shouldReceive("isRunning")->andReturn(true); $this->completedRunner = \Mockery::mock("Silktide\\Teamster\\Pool\\Runner\\RunnerInterface")->shouldIgnoreMissing(); $this->completedRunner->shouldReceive("isRunning")->andReturn(false); $this->runnerFactory = \Mockery::mock("Silktide\\Teamster\\Pool\\Runner\\RunnerFactory"); $this->runnerFactory->shouldReceive("createRunner")->withArgs(["console", "/^(?!completed-).*/", \Mockery::type("int")])->andReturn($this->runner); $this->runnerFactory->shouldReceive("createRunner")->withArgs(["console", "/^completed-/", \Mockery::type("int")])->andReturn($this->completedRunner); $this->pid = \Mockery::mock("Silktide\\Teamster\\Pool\\Pid\\PidInterface")->shouldIgnoreMissing(true); $this->pidFactory = \Mockery::mock("Silktide\\Teamster\\Pool\\Pid\\PidFactoryInterface"); $this->pidFactory->shouldReceive("create")->andReturn($this->pid); $this->inputDefinition = \Mockery::mock("Symfony\\Component\\Console\\Input\\InputDefinition"); $this->input = \Mockery::mock("Symfony\\Component\\Console\\Input\\InputInterface"); $this->output = \Mockery::mock("Symfony\\Component\\Console\\Output\\OutputInterface")->shouldIgnoreMissing(); }