function ParamConverterManagerTest::providerTestAddConverter

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php \Drupal\Tests\Core\ParamConverter\ParamConverterManagerTest::providerTestAddConverter()
  2. 10 core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php \Drupal\Tests\Core\ParamConverter\ParamConverterManagerTest::providerTestAddConverter()
  3. 11.x core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php \Drupal\Tests\Core\ParamConverter\ParamConverterManagerTest::providerTestAddConverter()

Provide data for parameter converter manager tests.

Return value

array An array of arrays, each containing the input parameters for providerTestResolvers::testAddConverter().

See also

ParamConverterManagerTest::testAddConverter()

File

core/tests/Drupal/Tests/Core/ParamConverter/ParamConverterManagerTest.php, line 70

Class

ParamConverterManagerTest
@coversDefaultClass \Drupal\Core\ParamConverter\ParamConverterManager @group ParamConverter

Namespace

Drupal\Tests\Core\ParamConverter

Code

public function providerTestAddConverter() {
    $converters[0]['unsorted'] = [
        [
            'name' => 'strawberry',
        ],
        [
            'name' => 'raspberry',
        ],
        [
            'name' => 'pear',
        ],
        [
            'name' => 'peach',
        ],
        [
            'name' => 'pineapple',
        ],
        [
            'name' => 'banana',
        ],
        [
            'name' => 'apple',
        ],
    ];
    $converters[0]['sorted'] = [
        'strawberry',
        'raspberry',
        'pear',
        'peach',
        'pineapple',
        'banana',
        'apple',
    ];
    $converters[1]['unsorted'] = [
        [
            'name' => 'giraffe',
        ],
        [
            'name' => 'zebra',
        ],
        [
            'name' => 'eagle',
        ],
        [
            'name' => 'ape',
        ],
        [
            'name' => 'cat',
        ],
        [
            'name' => 'puppy',
        ],
        [
            'name' => 'llama',
        ],
    ];
    $converters[1]['sorted'] = [
        'giraffe',
        'zebra',
        'eagle',
        'ape',
        'cat',
        'puppy',
        'llama',
    ];
    return $converters;
}

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