function RevisionDeleteFormTest::providerSubmitForm

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php \Drupal\FunctionalTests\Entity\RevisionDeleteFormTest::providerSubmitForm()
  2. 10 core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php \Drupal\FunctionalTests\Entity\RevisionDeleteFormTest::providerSubmitForm()

Data provider for testSubmitForm.

1 call to RevisionDeleteFormTest::providerSubmitForm()
RevisionDeleteFormTest::testSubmitForm in core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php
Tests revision deletion form.

File

core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php, line 314

Class

RevisionDeleteFormTest
Tests deleting a revision with revision delete form.

Namespace

Drupal\FunctionalTests\Entity

Code

public static function providerSubmitForm() : array {
  $data = [];
  $data['not supporting revision log, one revision remaining after delete, no view access'] = [
    [],
    'entity_test_rev',
    'view all revisions, delete revision',
    2,
    [
      '@type' => 'entity_test_rev',
      '%title' => 'view all revisions, delete revision',
      '%revision' => '1',
    ],
    'Revision of Entity Test Bundle view all revisions, delete revision has been deleted.',
    '/entity_test_rev/1/revisions',
  ];
  $data['not supporting revision log, one revision remaining after delete, view access'] = [
    [
      'view test entity',
    ],
    'entity_test_rev',
    'view, view all revisions, delete revision',
    2,
    [
      '@type' => 'entity_test_rev',
      '%title' => 'view, view all revisions, delete revision',
      '%revision' => '3',
    ],
    'Revision of Entity Test Bundle view, view all revisions, delete revision has been deleted.',
    '/entity_test_rev/2/revisions',
  ];
  $data['supporting revision log, one revision remaining after delete, no view access'] = [
    [],
    'entity_test_revlog',
    'view all revisions, delete revision',
    2,
    [
      '@type' => 'entity_test_revlog',
      '%title' => 'view all revisions, delete revision',
      '%revision' => '1',
    ],
    'Revision from Sun, 11 Jan 2009 - 16:00 of Test entity - revisions log view all revisions, delete revision has been deleted.',
    '/entity_test_revlog/1/revisions',
  ];
  $data['supporting revision log, one revision remaining after delete, view access'] = [
    [],
    'entity_test_revlog',
    'view, view all revisions, delete revision',
    2,
    [
      '@type' => 'entity_test_revlog',
      '%title' => 'view, view all revisions, delete revision',
      '%revision' => '3',
    ],
    'Revision from Sun, 11 Jan 2009 - 16:00 of Test entity - revisions log view, view all revisions, delete revision has been deleted.',
    '/entity_test_revlog/2/revisions',
  ];
  return $data;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.