You are here

public function ProviderUrlParseTest::testUrlParsing in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/ProviderUrlParseTest.php \Drupal\Tests\video_embed_field\Unit\ProviderUrlParseTest::testUrlParsing()

Test URL parsing works as expected.

@dataProvider urlsWithExpectedIds

File

tests/src/Unit/ProviderUrlParseTest.php, line 22

Class

ProviderUrlParseTest
Test that URL parsing for various providers is functioning.

Namespace

Drupal\Tests\video_embed_field\Unit

Code

public function testUrlParsing($provider, $url, $expected) {
  $this
    ->assertEquals($expected, $provider::getIdFromInput($url));
}