Consolidation\Cgr\CgrTests::testApplicationCommandStrings PHP Метод

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

Unit tests on the application. We parse several sets of arguments, and check to see if the generate appropriate command strings.
public testApplicationCommandStrings ( $argv, $expected )
    public function testApplicationCommandStrings($argv, $expected)
    {
        $this->createFixtures();
        $home = $this->workDir;
        $commandList = $this->application->parseArgvAndGetCommandList($argv, $home);
        $commandStrings = array();
        foreach ($commandList as $command) {
            $commandStrings[] = $command->getCommandString();
        }
        $actual = implode("\n", $commandStrings);
        $actual = str_replace($this->workDir, '{workdir}', $actual);
        $this->assertEquals($expected, $actual);
    }