function UrlResolverTest::providerEndpointMatching

Same name in other branches
  1. 9 core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::providerEndpointMatching()
  2. 8.9.x core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::providerEndpointMatching()
  3. 11.x core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::providerEndpointMatching()

Data provider for testEndpointMatching().

Return value

array

See also

::testEndpointMatching()

File

core/modules/media/tests/src/Functional/UrlResolverTest.php, line 44

Class

UrlResolverTest
Tests the oEmbed URL resolver service.

Namespace

Drupal\Tests\media\Functional

Code

public static function providerEndpointMatching() {
    return [
        'match by endpoint: Twitter' => [
            'https://twitter.com/Dries/status/999985431595880448',
            'https://publish.twitter.com/oembed?url=https%3A//twitter.com/Dries/status/999985431595880448',
        ],
        'match by endpoint: Vimeo' => [
            'https://vimeo.com/14782834',
            'https://vimeo.com/api/oembed.json?url=https%3A//vimeo.com/14782834',
        ],
        'match by endpoint: Dailymotion' => [
            'https://www.dailymotion.com/video/x2vzluh',
            'https://www.dailymotion.com/services/oembed?url=https%3A//www.dailymotion.com/video/x2vzluh',
        ],
        'match by endpoint: Facebook' => [
            'https://www.facebook.com/facebook/videos/10153231379946729/',
            'https://www.facebook.com/plugins/video/oembed.json?url=https%3A//www.facebook.com/facebook/videos/10153231379946729/',
        ],
    ];
}

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