Contao\CoreBundle\Test\Command\AutomatorCommandTest::testInvalidArgument PHP Method

testInvalidArgument() public method

Tests an invalid argument.
public testInvalidArgument ( )
    public function testInvalidArgument()
    {
        $command = new AutomatorCommand('contao:automator');
        $command->setApplication($this->getApplication());
        $command->setFramework($this->mockContaoFramework());
        $tester = new CommandTester($command);
        $code = $tester->execute(['command' => $command->getName(), 'task' => 'fooBar']);
        $this->assertEquals(1, $code);
        $this->assertContains('Invalid task "fooBar" (see help contao:automator)', $tester->getDisplay());
    }