public function testBranchRestrictionsDeniesAccessForUnknownBranchWithPolicyDeny()
{
$restrictions = ['master' => ['master', 'develop'], 'develop' => ['develop', 'new-feature']];
$validator = new MergeWorkflowValidator(MergeWorkflowValidator::PRESET_NONE, $restrictions, MergeWorkflowValidator::BRANCH_POLICY_DENY);
$this->assertTrue($validator->validate('master', 'master'));
$this->assertTrue($validator->validate('master', 'develop'));
$this->assertTrue($validator->validate('develop', 'new-feature'));
$this->setExpectedException(MergeWorkflowException::class, 'No branch constraint is set for source "new-feature" and policy denies merging unknown branches.');
$validator->validate('new-feature', 'develop');
}