function GetTest::integerValuesDataProvider

Same name in other branches
  1. 8.9.x core/modules/migrate/tests/src/Unit/process/GetTest.php \Drupal\Tests\migrate\Unit\process\GetTest::integerValuesDataProvider()
  2. 10 core/modules/migrate/tests/src/Unit/process/GetTest.php \Drupal\Tests\migrate\Unit\process\GetTest::integerValuesDataProvider()
  3. 11.x core/modules/migrate/tests/src/Unit/process/GetTest.php \Drupal\Tests\migrate\Unit\process\GetTest::integerValuesDataProvider()

Provides data for the successful lookup test.

Return value

array

File

core/modules/migrate/tests/src/Unit/process/GetTest.php, line 98

Class

GetTest
Tests the get process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public function integerValuesDataProvider() {
    return [
        [
            'source' => [
                0 => 0,
                1 => 'test',
            ],
            'expected_value' => [
                0 => 'val1',
                1 => 'val2',
            ],
        ],
        [
            'source' => [
                FALSE,
            ],
            'expected_value' => [
                NULL,
            ],
        ],
        [
            'source' => [
                NULL,
            ],
            'expected_value' => [
                NULL,
            ],
        ],
    ];
}

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