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

testShouldRemoveStopsDeletion() public method

    public function testShouldRemoveStopsDeletion()
    {
        $this->customerModel->expects($this->once())->method('load')->with('1')->will($this->returnValue($this->customerModel));
        $this->customerModel->expects($this->at(1))->method('getId')->will($this->returnValue(1));
        $this->customerModel->expects($this->at(2))->method('getId')->will($this->returnValue(1));
        $this->customerModel->expects($this->never())->method('loadByEmail');
        $this->dialog->expects($this->once())->method('askConfirmation')->will($this->returnValue(false));
        $this->customerModel->expects($this->never())->method('delete');
        $application = $this->getApplication();
        $application->add($this->command);
        $command = $this->getApplication()->find('customer:delete');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName(), 'id' => '1'));
        $this->assertContains('Aborting delete', $commandTester->getDisplay());
    }