function RevisionDeleteFormTest::providerSubmitForm

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

Data provider for testSubmitForm.

File

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

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,
        'entity_test_rev: deleted <em class="placeholder">view all revisions, delete revision</em> revision <em class="placeholder">1</em>.',
        '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,
        'entity_test_rev: deleted <em class="placeholder">view, view all revisions, delete revision</em> revision <em class="placeholder">1</em>.',
        'Revision of Entity Test Bundle view, view all revisions, delete revision has been deleted.',
        '/entity_test_rev/1/revisions',
    ];
    $data['supporting revision log, one revision remaining after delete, no view access'] = [
        [],
        'entity_test_revlog',
        'view all revisions, delete revision',
        2,
        'entity_test_revlog: deleted <em class="placeholder">view all revisions, delete revision</em> revision <em class="placeholder">1</em>.',
        'Revision from Sun, 01/11/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,
        'entity_test_revlog: deleted <em class="placeholder">view, view all revisions, delete revision</em> revision <em class="placeholder">1</em>.',
        'Revision from Sun, 01/11/2009 - 16:00 of Test entity - revisions log view, view all revisions, delete revision has been deleted.',
        '/entity_test_revlog/1/revisions',
    ];
    return $data;
}

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