function WebTestBaseTest::providerAssertFieldByName

Provides data for testing the assertFieldByName() helper.

Return value

array An array of values passed to the test method.

File

core/modules/simpletest/tests/src/Unit/WebTestBaseTest.php, line 21

Class

WebTestBaseTest
@requires extension curl @coversDefaultClass <a href="/api/drupal/core%21modules%21simpletest%21src%21WebTestBase.php/class/WebTestBase/8.9.x" title="Test case for typical Drupal tests." class="local">\Drupal\simpletest\WebTestBase</a> @group simpletest @group WebTestBase

Namespace

Drupal\Tests\simpletest\Unit

Code

public function providerAssertFieldByName() {
    $data = [];
    $data[] = [
        'select_2nd_selected',
        'test',
        '1',
        FALSE,
    ];
    $data[] = [
        'select_2nd_selected',
        'test',
        '2',
        TRUE,
    ];
    $data[] = [
        'select_none_selected',
        'test',
        '',
        FALSE,
    ];
    $data[] = [
        'select_none_selected',
        'test',
        '1',
        TRUE,
    ];
    $data[] = [
        'select_none_selected',
        'test',
        NULL,
        TRUE,
    ];
    return $data;
}

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