function EndpointTest::testCaseSensitiveMatch

Same name in other branches
  1. 10 core/modules/media/tests/src/Unit/EndpointTest.php \Drupal\Tests\media\Unit\EndpointTest::testCaseSensitiveMatch()
  2. 11.x core/modules/media/tests/src/Unit/EndpointTest.php \Drupal\Tests\media\Unit\EndpointTest::testCaseSensitiveMatch()

@covers ::matchUrl

File

core/modules/media/tests/src/Unit/EndpointTest.php, line 30

Class

EndpointTest
@coversDefaultClass \Drupal\media\OEmbed\Endpoint

Namespace

Drupal\Tests\media\Unit

Code

public function testCaseSensitiveMatch() : void {
    $endpoint = new Endpoint('https://www.example.com/oembed', $this->createMock('\\Drupal\\media\\OEmbed\\Provider'), [
        'https://*.example.com/Video/*',
    ]);
    $this->assertTrue($endpoint->matchUrl('https://foo.example.com/Video/bar'));
}

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