ProviderUrlParseTest.php in Video Embed Brightcove 8
File
tests/src/Unit/ProviderUrlParseTest.php
View source
<?php
namespace Drupal\Tests\video_embed_brightcove\Unit;
use Drupal\Tests\UnitTestCase;
use Drupal\video_embed_brightcove\Plugin\video_embed_field\Provider\Brightcove;
class ProviderUrlParseTest extends UnitTestCase {
public function testUrlParsing($url, $expected) {
$this
->assertEquals($expected, Brightcove::getIdFromInput($url));
}
public function urlsWithExpectedIds() {
return [
'Studio browser preview URL' => [
'http://players.brightcove.net/4792245499001/default_default/index.html?videoId=4792919782001',
'4792919782001',
],
];
}
}