N98\Magento\Command\Customer\DeleteCommandTest::testPromptAllCanDeleteAll PHP Method

testPromptAllCanDeleteAll() public method

    public function testPromptAllCanDeleteAll()
    {
        $this->dialog->expects($this->exactly(2))->method('askConfirmation')->will($this->onConsecutiveCalls(true, true));
        $this->customerCollection->expects($this->exactly(3))->method('addAttributeToSelect')->will($this->returnValueMap(array(array('firstname', false, $this->customerCollection), array('lastname', false, $this->customerCollection), array('email', false, $this->customerCollection))));
        $this->command->expects($this->once())->method('batchDelete')->with($this->customerCollection)->will($this->returnValue(3));
        $application = $this->getApplication();
        $application->add($this->command);
        $command = $this->getApplication()->find('customer:delete');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName(), '--force' => true));
        $this->assertContains('Successfully deleted 3 customer/s', $commandTester->getDisplay());
    }