You are here

public function ToolbarTest::testToolbarNotAppearsOnExcludedPath in Devel 8.3

Same name and namespace in other branches
  1. 8 webprofiler/tests/src/FunctionalJavascript/ToolbarTest.php \Drupal\Tests\webprofiler\FunctionalJavascript\ToolbarTest::testToolbarNotAppearsOnExcludedPath()
  2. 8.2 webprofiler/tests/src/FunctionalJavascript/ToolbarTest.php \Drupal\Tests\webprofiler\FunctionalJavascript\ToolbarTest::testToolbarNotAppearsOnExcludedPath()
  3. 4.x webprofiler/tests/src/FunctionalJavascript/ToolbarTest.php \Drupal\Tests\webprofiler\FunctionalJavascript\ToolbarTest::testToolbarNotAppearsOnExcludedPath()

Tests the toolbar not appears on excluded path.

File

webprofiler/tests/src/FunctionalJavascript/ToolbarTest.php, line 59

Class

ToolbarTest
Tests the JavaScript functionality of webprofiler.

Namespace

Drupal\Tests\webprofiler\FunctionalJavascript

Code

public function testToolbarNotAppearsOnExcludedPath() {
  $this
    ->loginForDashboard();
  $this
    ->drupalGet('admin/config/development/devel');
  $this
    ->waitForToolbar();
  $assert = $this
    ->assertSession();
  $assert
    ->responseContains('Configure Webprofiler');
  $this
    ->config('webprofiler.config')
    ->set('exclude', '/admin/config/development/devel')
    ->save();
  $this
    ->drupalGet('admin/config/development/devel');
  $this
    ->assertSession()
    ->responseNotContains('sf-toolbar');
}