/**
  * @test
  */
 public function getPreCommitConfigurationReturnsSuccesfull()
 {
     $data = array('pre-commit' => array('execute' => array('phpunit' => true)));
     $this->configFileValidator->shouldReceive('validate');
     $this->configFileReader->setData($data);
     $this->assertTrue(is_array($this->configFile->getPreCommitConfiguration()));
 }
Exemplo n.º 2
0
 /**
  * @throws InvalidConfigStructureException
  *
  * @test
  */
 public function getPreCommitConfigurationThrowsException()
 {
     $this->setExpectedException(InvalidConfigStructureException::class);
     $this->configFileReader->fileContents = [];
     $this->configFile->getPreCommitConfiguration();
 }