コード例 #1
0
 /**
  * @test
  */
 public function isEnabledAndThrow()
 {
     $this->setExpectedException(UnitTestsException::class);
     $this->phpunitRandomizerBuilder->shouldReceive('setOutput');
     $this->phpunitRandomizerBuilder->shouldReceive('run');
     $this->preCommitConfig->setExtraOptions(['enabled' => true, 'random-mode' => false]);
     $this->process->shouldReceive('isSuccessful')->andReturn(false);
     $this->enabledMocks();
     $this->phpunitProcessBuilder->shouldReceive('getProcessBuilder')->andReturn($this->processBuilder);
     $this->phpunitProcessBuilder->shouldReceive('executeProcess');
     $this->unitTestPreCommitExecutor->run($this->outputInterface);
 }
 /**
  * @test
  */
 public function isEnabled()
 {
     $this->preCommitConfig->setExtraOptions(['enabled' => true, 'level' => 'psr0']);
     $this->fixCodeStyleCsFixerPreCommitExecutor->run($this->outputInterface, array(), 'neddle');
 }
 /**
  * @test
  */
 public function isEnabled()
 {
     $this->preCommitConfig->setExtraOptions(['enabled' => true, 'standard' => 'PSR2']);
     $this->checkCodeStyleCodeSnifferPreCommitExecutor->run($this->outputInterface, array(), 'neddle');
 }