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

testInvalidTask() public method

Tests an invalid task.
public testInvalidTask ( )
    public function testInvalidTask()
    {
        $command = new AutomatorCommand('contao:automator');
        $command->setApplication($this->getApplication());
        $command->setFramework($this->mockContaoFramework());
        $tester = new CommandTester($command);
        /** @var QuestionHelper $helper */
        $helper = $command->getHelper('question');
        $helper->setInputStream($this->getStreamFromInput("4800\n"));
        $code = $tester->execute(['command' => $command->getName()]);
        $this->assertEquals(1, $code);
        $this->assertContains('Value "4800" is invalid (see help contao:automator)', $tester->getDisplay());
    }