public function withRequiredFieldsEmpty($emptyField, $messageCount) { $userData = $this->loadDataSet('AdminUsers', 'generic_admin_user', array($emptyField => '%noValue%'), array('email', 'user_name', 'last_name', 'first_name')); //Steps $this->adminUserHelper()->createAdminUser($userData); //Verifying $xpath = $this->_getControlXpath('field', $emptyField); $this->addParameter('fieldXpath', $xpath); $this->assertMessagePresent('error', 'empty_required_field'); $this->assertTrue($this->verifyMessagesCount($messageCount), $this->getParsedMessages()); } public function withRequiredFieldsEmptyDataProvider() { return array( array('user_name', 1), array('first_name', 1), array('last_name', 1), array('email', 1), array('password', 2), array('password_confirmation', 1) ); }