public function DefaultNameTest::testDefaultName in Video Embed Field 8
Same name and namespace in other branches
- 8.2 modules/video_embed_media/tests/src/Kernel/DefaultNameTest.php \Drupal\Tests\video_embed_media\Kernel\DefaultNameTest::testDefaultName()
Test the default name.
@dataProvider defaultNameTestCases
File
- modules/
video_embed_media/ tests/ src/ Kernel/ DefaultNameTest.php, line 57
Class
- DefaultNameTest
- Test the media bundle default names.
Namespace
Drupal\Tests\video_embed_media\KernelCode
public function testDefaultName($input, $expected) {
$entity = Media::create([
'bundle' => 'video',
VideoEmbedField::VIDEO_EMBED_FIELD_DEFAULT_NAME => [
[
'value' => $input,
],
],
]);
$actual = $this->mediaVideoPlugin
->getDefaultName($entity);
$this
->assertEquals($expected, $actual);
}