class LayoutEntityHelperTraitTest extends UnitTestCase
{ /**
* Data provider method for tests that need sections with inline blocks.
*/
public static function providerSectionsWithInlineComponents() { $prophet =
new Prophet();
$components =
[];
// Ensure a non-derivative component is not returned.
$non_derivative_component =
$prophet->
prophesize(SectionComponent::
class);
$non_derivative_component->
getPlugin()->
willReturn($prophet->
prophesize(PluginInspectionInterface::
class)->
reveal());
$components[] =
$non_derivative_component->
reveal();
// Ensure a derivative component with a different base Id is not returned.
$derivative_non_inline_component =
$prophet->
prophesize(SectionComponent::
class);
$plugin =
$prophet->
prophesize(DerivativeInspectionInterface::
class);
$plugin->
getBaseId()->
willReturn('some_other_base_id_which_we_do_not_care_about_but_it_is_nothing_personal'
);
$derivative_non_inline_component->
getPlugin()->
willReturn($plugin);
$components[] =
$derivative_non_inline_component->
reveal();
// Ensure that inline block component is returned.
$inline_component =
$prophet->
prophesize(SectionComponent::
class);