N98\Magento\Command\Eav\Attribute\Create\DummyCommandTest::testmanageArguments PHP Method

testmanageArguments() public method

public testmanageArguments ( )
    public function testmanageArguments()
    {
        $application = $this->getApplication();
        $application->add(new DummyCommand());
        $command = $application->find('eav:attribute:create-dummy-values');
        $dialog = $this->getMock('Symfony\\Component\\Console\\Helper\\QuestionHelper', array('ask'));
        // ASK - attribute-id
        $dialog->expects($this->any())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Question\\Question'))->will($this->returnValue(92));
        // ASK - values-type
        $dialog->expects($this->any())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Question\\Question'))->will($this->returnValue('int'));
        // ASK - values-number
        $dialog->expects($this->any())->method('ask')->with($this->isInstanceOf('Symfony\\Component\\Console\\Input\\InputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Output\\OutputInterface'), $this->isInstanceOf('Symfony\\Component\\Console\\Question\\Question'))->will($this->returnValue(1));
        // We override the standard helper with our mock
        $command->getHelperSet()->set($dialog, 'dialog');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName()));
        $arguments = $commandTester->getInput()->getArguments();
        $this->assertArrayHasKey('attribute-id', $arguments);
        $this->assertArrayHasKey('values-type', $arguments);
        $this->assertArrayHasKey('values-number', $arguments);
    }