Gush\Tests\Template\PullRequest\Create\SymfonyTemplateTest::runs_template_command_with_symfony_template PHP Method

runs_template_command_with_symfony_template() public method

public runs_template_command_with_symfony_template ( $params, $expected )
    public function runs_template_command_with_symfony_template($params, $expected)
    {
        $requirements = $this->template->getRequirements();
        foreach ($requirements as $key => $requirement) {
            list($prompt, $default) = $requirement;
            if (!isset($params[$key])) {
                if (1 < count($choices = explode('|', $default))) {
                    $default = $choices[0];
                }
                $params[$key] = $default;
            }
        }
        $params['description'] = 'This is a description';
        $this->template->bind($params);
        $res = $this->template->render();
        $this->assertEquals(self::normalizeWhiteSpace($expected), self::normalizeWhiteSpace($res));
    }