public function testRemoveBySetupNameFailure()
{
$mockAdapter = $this->getMockBuilder('\\Varien_Db_Adapter_Pdo_Mysql')->disableOriginalConstructor()->setMethods(array('delete'))->getMock();
$mockAdapter->expects($this->once())->method('delete')->will($this->returnValue(0));
$coreResource = $this->getMock('\\Mage_Core_Model_Resource');
$coreResource->expects($this->once())->method('getConnection')->will($this->returnValue($mockAdapter));
$coreResource->expects($this->once())->method('getTableName')->with('core_resource')->will($this->returnValue('core_resource'));
$command = $this->getMockBuilder('\\N98\\Magento\\Command\\System\\Setup\\RemoveCommand')->setMethods(array('_getModel'))->getMock();
$command->expects($this->once())->method('_getModel')->with('core/resource', 'Mage_Core_Model_Resource')->will($this->returnValue($coreResource));
$application = $this->getApplication();
$application->add($command);
$command = $this->getApplication()->find('sys:setup:remove');
$commandTester = new CommandTester($command);
$commandTester->execute(array('command' => $command->getName(), 'module' => 'Mage_Weee', 'setup' => 'weee_setup'));
$this->assertContains('No entry was found for setup resource: "weee_setup" in module: "Mage_Weee"', $commandTester->getDisplay());
}