ResponsiveMenuHooks.php in Responsive and off-canvas menu 4.3.x
File
tests/src/Functional/ResponsiveMenuHooks.php
View source
<?php
namespace Drupal\Tests\responsive_menu\Functional;
use Drupal\Tests\BrowserTestBase;
class ResponsiveMenuHooks extends BrowserTestBase {
public static $modules = [
'responsive_menu_test',
];
protected $profile = 'minimal';
protected $defaultTheme = 'stark';
protected static $userPermissions = [
'access content',
'administer site configuration',
];
protected function setUp() {
parent::setUp();
$account = $this
->drupalCreateUser(static::$userPermissions);
$this
->drupalLogin($account);
}
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');
}
}