Test the breakpoints provided by a theme.
public function testThemeBreakpoints() {
// Verify the breakpoint group for breakpoint_test_theme was created.
$breakpoint_group_obj = entity_create('breakpoint_group', array(
'label' => 'Breakpoint test theme',
'name' => 'breakpoint_test_theme',
'source' => 'breakpoint_test_theme',
'sourceType' => Breakpoint::SOURCE_TYPE_THEME,
'id' => Breakpoint::SOURCE_TYPE_THEME . '.breakpoint_test_theme.breakpoint_test_theme',
));
$breakpoint_group_obj->breakpoints = array(
'theme.breakpoint_test_theme.mobile' => array(),
'theme.breakpoint_test_theme.narrow' => array(),
'theme.breakpoint_test_theme.wide' => array(),
'theme.breakpoint_test_theme.tv' => array(),
);
// Verify we can load this breakpoint defined by the theme.
$this
->verifyBreakpointGroup($breakpoint_group_obj);
// Disable the test theme and verify the breakpoint group is deleted.
theme_disable(array(
'breakpoint_test_theme',
));
$this
->assertFalse(entity_load('breakpoint_group', $breakpoint_group_obj
->id()), 'breakpoint_group_load: Loading a deleted breakpoint group returns false.', 'Breakpoint API');
}