Remove unused method
[MAILPOET-3037]
This commit is contained in:
@ -182,18 +182,6 @@ class Forms extends APIEndpoint {
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
public function exportsEditor($data = []) {
|
||||
$id = (isset($data['id']) ? (int)$data['id'] : false);
|
||||
$form = Form::findOne($id);
|
||||
if ($form instanceof Form) {
|
||||
$exports = Util\Export::getAll($form->asArray());
|
||||
return $this->successResponse($exports);
|
||||
}
|
||||
return $this->errorResponse([
|
||||
APIError::NOT_FOUND => WPFunctions::get()->__('This form does not exist.', 'mailpoet'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function saveEditor($data = []) {
|
||||
$formId = (isset($data['id']) ? (int)$data['id'] : 0);
|
||||
$name = (isset($data['name']) ? $data['name'] : WPFunctions::get()->__('New form', 'mailpoet'));
|
||||
|
@ -96,17 +96,6 @@ class FormsTest extends \MailPoetTest {
|
||||
expect($storedData['settings'])->notEmpty();
|
||||
}
|
||||
|
||||
public function testItCanExportAForm() {
|
||||
$response = $this->endpoint->create();
|
||||
expect($response->status)->equals(APIResponse::STATUS_OK);
|
||||
|
||||
$response = $this->endpoint->exportsEditor($response->data);
|
||||
expect($response->data['html'])->notEmpty();
|
||||
expect($response->data['php'])->notEmpty();
|
||||
expect($response->data['iframe'])->notEmpty();
|
||||
expect($response->data['shortcode'])->notEmpty();
|
||||
}
|
||||
|
||||
public function testItCanSaveFormEditor() {
|
||||
$response = $this->endpoint->create();
|
||||
expect($response->status)->equals(APIResponse::STATUS_OK);
|
||||
|
Reference in New Issue
Block a user