Gush\Tests\Validator\MergeWorkflowValidatorTest::testBranchRestrictionsWithDeniedBranchAndAllowUnknown PHP Метод

testBranchRestrictionsWithDeniedBranchAndAllowUnknown() публичный Метод

    public function testBranchRestrictionsWithDeniedBranchAndAllowUnknown($source, $target)
    {
        $restrictions = ['master' => ['master', 'develop'], 'develop' => ['develop', 'new-feature']];
        $validator = new MergeWorkflowValidator(MergeWorkflowValidator::PRESET_NONE, $restrictions);
        $this->setExpectedException(MergeWorkflowException::class, sprintf('Branches: Only branches "%s" are allowed to be merged into "%s".', implode('", "', $restrictions[$source]), $target));
        $validator->validate($source, $target);
    }