function RevisionDeleteFormTest::providerSubmitForm

Same name in other branches
  1. 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 309

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">3</em>.',
        '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,
        'entity_test_revlog: deleted <em class="placeholder">view all revisions, delete revision</em> revision <em class="placeholder">1</em>.',
        '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,
        'entity_test_revlog: deleted <em class="placeholder">view, view all revisions, delete revision</em> revision <em class="placeholder">3</em>.',
        '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.