/** * @dataProvider attributeValueDataProvider */ public function testValidate($data) { $this->_attribute->expects($this->atLeastOnce())->method('getAttributeCode')->will($this->returnValue('code')); $product = new Varien_Object(array('code' => $data)); $this->_model->validate($product); $this->assertEquals('1,2,3', $product->getCode()); }