You are here

public function BrowserTestBaseTest::testError in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php \Drupal\FunctionalTests\BrowserTestBaseTest::testError()

File

core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php, line 190

Class

BrowserTestBaseTest
Tests BrowserTestBase functionality.

Namespace

Drupal\FunctionalTests

Code

public function testError() {
  $this
    ->expectException('\\Exception');
  $this
    ->expectExceptionMessage('User notice: foo');
  $this
    ->drupalGet('test-error');
}