/** * @covers Mage_Catalog_Model_Abstract::lockAttribute * @covers Mage_Catalog_Model_Abstract::unlockAttribute * @covers Mage_Catalog_Model_Abstract::unlockAttributes * @covers Mage_Catalog_Model_Abstract::getLockedAttributes * @covers Mage_Catalog_Model_Abstract::hasLockedAttributes * @covers Mage_Catalog_Model_Abstract::isLockedAttribute */ public function testLockedAttributeApi() { $this->assertEquals(array(), $this->_model->getLockedAttributes()); $this->assertFalse($this->_model->hasLockedAttributes()); $this->assertFalse($this->_model->isLockedAttribute('some_code')); $this->_model->lockAttribute('code'); $this->assertTrue($this->_model->isLockedAttribute('code')); $this->assertEquals(array('code'), $this->_model->getLockedAttributes()); $this->assertTrue($this->_model->hasLockedAttributes()); $this->_model->unlockAttribute('code'); $this->assertFalse($this->_model->isLockedAttribute('code')); $this->_model->lockAttribute('code1'); $this->_model->lockAttribute('code2'); $this->_model->unlockAttributes(); $this->assertEquals(array(), $this->_model->getLockedAttributes()); $this->assertFalse($this->_model->hasLockedAttributes()); }