public function testReturnEarlyIfUserNotFound()
{
$this->userModel->expects($this->once())->method('loadByUsername')->with('notauser')->will($this->returnValue($this->userModel));
$this->userModel->expects($this->at(1))->method('getId')->will($this->returnValue(null));
$this->userModel->expects($this->once())->method('load')->with('notauser', 'email')->will($this->returnValue($this->userModel));
$this->userModel->expects($this->at(2))->method('getId')->will($this->returnValue(null));
$application = $this->getApplication();
$application->add($this->command);
$command = $this->getApplication()->find('admin:user:delete');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName(), 'id' => 'notauser'));
$this->assertContains('User was not found', $commandTester->getDisplay());
}