コード例 #1
0
 /**
  * @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()));
 }
コード例 #2
0
 /**
  * @throws InvalidConfigStructureException
  *
  * @test
  */
 public function getPreCommitConfigurationThrowsException()
 {
     $this->setExpectedException(InvalidConfigStructureException::class);
     $this->configFileReader->fileContents = [];
     $this->configFile->getPreCommitConfiguration();
 }