function CallbackTest::providerCallbackArray

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/process/CallbackTest.php \Drupal\Tests\migrate\Unit\process\CallbackTest::providerCallbackArray()
  2. 11.x core/modules/migrate/tests/src/Unit/process/CallbackTest.php \Drupal\Tests\migrate\Unit\process\CallbackTest::providerCallbackArray()

Data provider for ::testCallbackArray().

File

core/modules/migrate/tests/src/Unit/process/CallbackTest.php, line 54

Class

CallbackTest
Tests the callback process plugin.

Namespace

Drupal\Tests\migrate\Unit\process

Code

public static function providerCallbackArray() {
    return [
        'date format' => [
            'date',
            [
                'Y-m-d',
                995328000,
            ],
            '2001-07-17',
        ],
        'rtrim' => [
            'rtrim',
            [
                'https://www.example.com/',
                '/',
            ],
            'https://www.example.com',
        ],
        'str_replace' => [
            'str_replace',
            [
                [
                    'One',
                    'two',
                ],
                [
                    '1',
                    '2',
                ],
                'One, two, three!',
            ],
            '1, 2, three!',
        ],
        'pi' => [
            'pi',
            [],
            pi(),
        ],
    ];
}

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