N98\Magento\Command\Customer\DeleteCommandTest::testRangeDeleteGetsCustomerCollection PHP Метод

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

    public function testRangeDeleteGetsCustomerCollection()
    {
        $this->customerCollection->expects($this->atLeastOnce())->method('addAttributeToSelect')->will($this->returnValueMap(array(array('firstname', false, $this->customerCollection), array('lastname', false, $this->customerCollection), array('email', false, $this->customerCollection))));
        $this->dialog->expects($this->exactly(2))->method('askAndValidate');
        $this->dialog->expects($this->at(0))->method('askAndValidate')->will($this->returnValue('1'));
        $this->dialog->expects($this->at(1))->method('askAndValidate')->will($this->returnValue('10'));
        $this->customerCollection->expects($this->once())->method('addAttributeToFilter')->will($this->returnValue($this->customerCollection));
        $this->dialog->expects($this->once())->method('askConfirmation')->will($this->returnValue(false));
        $application = $this->getApplication();
        $application->add($this->command);
        $command = $this->getApplication()->find('customer:delete');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName(), '--range' => true));
        $this->assertContains('Aborting delete', $commandTester->getDisplay());
    }