You are here

public function ResponsiveMenuHooks::testWarningWithNoBreakpoints in Responsive and off-canvas menu 4.4.x

Same name and namespace in other branches
  1. 4.3.x tests/src/Functional/ResponsiveMenuHooks.php \Drupal\Tests\responsive_menu\Functional\ResponsiveMenuHooks::testWarningWithNoBreakpoints()

Tests that hook_responsive_menu_off_canvas_output_alter works.

When using bartik as the theme the hook should trigger and disable the module output in page_bottom.

File

tests/src/Functional/ResponsiveMenuHooks.php, line 60

Class

ResponsiveMenuHooks
Class ResponsiveMenuHooks.

Namespace

Drupal\Tests\responsive_menu\Functional

Code

public function testWarningWithNoBreakpoints() {
  \Drupal::service('theme_installer')
    ->install([
    'bartik',
  ]);
  \Drupal::configFactory()
    ->getEditable('system.theme')
    ->set('default', 'bartik')
    ->save();
  $this
    ->drupalGet('/node/1');
  $this
    ->assertSession()
    ->elementNotExists('css', '#off-canvas-wrapper');
}