X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FClassic%2FParagraphsCoreVersionUiTestTrait.php;fp=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FClassic%2FParagraphsCoreVersionUiTestTrait.php;h=0000000000000000000000000000000000000000;hb=059867c3f96750652c80f39e44c442a58c2549ee;hp=361c87242c33f899cdc78865723d2d2bb9c66f5b;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2;p=yaffs-website diff --git a/web/modules/contrib/paragraphs/src/Tests/Classic/ParagraphsCoreVersionUiTestTrait.php b/web/modules/contrib/paragraphs/src/Tests/Classic/ParagraphsCoreVersionUiTestTrait.php deleted file mode 100644 index 361c87242..000000000 --- a/web/modules/contrib/paragraphs/src/Tests/Classic/ParagraphsCoreVersionUiTestTrait.php +++ /dev/null @@ -1,58 +0,0 @@ - 8.4 Save (and (un)publish) node button change. - * - * Arguments are the same as WebTestBase::drupalPostForm. - * - * @see \Drupal\simpletest\WebTestBase::drupalPostForm - * @see https://www.drupal.org/node/2847274 - * - * @param \Drupal\Core\Url|string $path - * Location of the post form. - * @param array $edit - * Field data in an associative array. - * @param mixed $submit - * Value of the submit button whose click is to be emulated. For example, - * @param array $options - * (optional) Options to be forwarded to the url generator. - * @param array $headers - * (optional) An array containing additional HTTP request headers. - * @param string $form_html_id - * (optional) HTML ID of the form to be submitted. - * @param string $extra_post - * (optional) A string of additional data to append to the POST submission. - */ - protected function paragraphsPostNodeForm($path, $edit, $submit, array $options = [], array $headers = [], $form_html_id = NULL, $extra_post = NULL) { - $drupal_version = (float) substr(\Drupal::VERSION, 0, 3); - if ($drupal_version > 8.3) { - switch ($submit) { - case t('Save and unpublish'): - $submit = t('Save'); - $edit['status[value]'] = FALSE; - break; - - case t('Save and publish'): - $submit = t('Save'); - $edit['status[value]'] = TRUE; - break; - - case t('Save and keep published (this translation)'): - $submit = t('Save (this translation)'); - break; - - default: - $submit = t('Save'); - } - } - parent::drupalPostForm($path, $edit, $submit, $options, $headers, $form_html_id, $extra_post); - } - -}