protected function setUp() { $this->_helper = $this->getMock('StdClass', array('isPriceGlobal')); $this->_helper->expects($this->any())->method('isPriceGlobal')->will($this->returnValue(true)); $this->_model = $this->getMockForAbstractClass('Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract', array(array('helper' => $this->_helper))); $resource = $this->getMock('StdClass', array('getMainTable')); $resource->expects($this->any())->method('getMainTable')->will($this->returnValue('table')); $this->_model->expects($this->any())->method('_getResource')->will($this->returnValue($resource)); }