public function BlazyMediaUnitTest::providerTestBlazyMediaBuild in Blazy 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/BlazyMediaUnitTest.php \Drupal\Tests\blazy\Unit\BlazyMediaUnitTest::providerTestBlazyMediaBuild()
Provider for ::testBlazyMediaBuild.
File
- tests/
src/ Unit/ BlazyMediaUnitTest.php, line 76
Class
- BlazyMediaUnitTest
- @coversDefaultClass \Drupal\blazy\BlazyMedia
Namespace
Drupal\Tests\blazy\UnitCode
public function providerTestBlazyMediaBuild() {
$iframe = [
'#type' => 'html_tag',
'#tag' => 'iframe',
'#attributes' => [
'allowfullscreen' => 'true',
'frameborder' => 0,
'scrolling' => 'no',
'src' => '//www.youtube.com/watch?v=E03HFA923kw',
'width' => 640,
'height' => 360,
],
];
$markup['#markup'] = '<iframe src="//www.youtube.com/watch?v=E03HFA923kw" class="b-lazy"></iframe>';
return [
'With children, has iframe tag' => [
[
$iframe,
],
],
'Without children, has iframe tag' => [
$iframe,
],
'With children, has no iframe tag' => [
[
$markup,
],
],
];
}