コード例 #1
0
 /**
  * @todo Separate to tests for ExecutionLoop
  */
 public function testShouldExitSuccessfullyIfNoProcessArePreparedOrQueued()
 {
     $seleniumAdapterMock = $this->getSeleniumAdapterMock();
     $processSetMock = $this->getMockBuilder(ProcessSet::class)->disableOriginalConstructor()->getMock();
     $processSetMock->expects($this->any())->method('count')->willReturn(333);
     $creatorMock = $this->getMockBuilder(ProcessSetCreator::class)->disableOriginalConstructor()->getMock();
     $creatorMock->expects($this->once())->method('createFromFiles')->willReturn($processSetMock);
     $this->command->setSeleniumAdapter($seleniumAdapterMock);
     $this->command->setProcessSetCreator($creatorMock);
     $this->tester->execute(['command' => $this->command->getName(), 'environment' => 'staging', 'browser' => 'firefox', '--tests-dir' => __DIR__ . '/Fixtures/DummyTests']);
     $this->assertContains('No tasks left, exiting the execution loop...', $this->tester->getDisplay());
     $this->assertSame(0, $this->tester->getStatusCode());
 }