Skip to content

Commit e31f940

Browse files
committed
Add test
1 parent 3fba9f3 commit e31f940

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/PhpGitHooks/Tests/Application/Config/ConfigFileTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,19 @@ public function getCommitMsgConfigurationThrowsException()
7575

7676
$this->configFile->getMessageCommitConfiguration();
7777
}
78+
79+
/**
80+
* @throws InvalidConfigStructureException
81+
*
82+
* @test
83+
*/
84+
public function getCommitMsgConfigurationWithoutRegExpThrowsException()
85+
{
86+
$this->setExpectedException(InvalidConfigStructureException::class);
87+
$this->configFileReader->fileContents = ['commit-msg' => [
88+
'enabled' => true
89+
]];
90+
91+
$this->configFile->getMessageCommitConfiguration();
92+
}
7893
}

0 commit comments

Comments
 (0)