function LinkTest::linkMergeProvider

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php \Drupal\Tests\jsonapi\Unit\JsonApiResource\LinkTest::linkMergeProvider()
  2. 8.9.x core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php \Drupal\Tests\jsonapi\Unit\JsonApiResource\LinkTest::linkMergeProvider()
  3. 10 core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php \Drupal\Tests\jsonapi\Unit\JsonApiResource\LinkTest::linkMergeProvider()

Provides test data for link merging.

File

core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php, line 109

Class

LinkTest
@coversDefaultClass <a href="/api/drupal/core%21modules%21jsonapi%21src%21JsonApiResource%21Link.php/class/Link/11.x" title="Represents an RFC8288 based link." class="local">\Drupal\jsonapi\JsonApiResource\Link</a> @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\JsonApiResource

Code

public static function linkMergeProvider() : \Generator {
    (yield 'same everything' => [
        [
            [
                'foo',
            ],
            'https://jsonapi.org/foo',
            'self',
        ],
        [
            [
                'foo',
            ],
            'https://jsonapi.org/foo',
            'self',
        ],
        [
            [
                'foo',
            ],
            'https://jsonapi.org/foo',
            'self',
        ],
    ]);
    (yield 'different cache tags' => [
        [
            [
                'foo',
            ],
            'https://jsonapi.org/foo',
            'self',
        ],
        [
            [
                'bar',
            ],
            'https://jsonapi.org/foo',
            'self',
        ],
        [
            [
                'foo',
                'bar',
            ],
            'https://jsonapi.org/foo',
            'self',
        ],
    ]);
}

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