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