/** * @param $data * @param $expected * * @dataProvider validateDataProvider */ public function testValidate($data, $expected) { $this->_config->expects($this->exactly(3))->method('getAttribute')->will($this->returnValue($this->attributeCustomerMock)); $this->attributeCustomerMock->expects($this->exactly(3))->method('getIsRequired')->will($this->returnValue(true)); $this->_model->setData($data); $this->assertEquals($expected, $this->_model->validate()); }