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

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

public testCanDeleteById ( )
    public function testCanDeleteById()
    {
        $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->customerModel->expects($this->once())->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', '--force' => true));
        $this->assertContains('successfully deleted', $commandTester->getDisplay());
    }