function DatabaseEventsTest::testDisableInvalidEvent

Tests disable invalid event.

@legacy-covers ::disableEvents

File

core/tests/Drupal/Tests/Core/Database/DatabaseEventsTest.php, line 81

Class

DatabaseEventsTest
Tests Drupal\Core\Database\Connection.

Namespace

Drupal\Tests\Core\Database

Code

public function testDisableInvalidEvent() : void {
  $this->expectException(\AssertionError::class);
  $this->expectExceptionMessage('Event class bar does not exist');
  $this->connection
    ->disableEvents([
    'bar',
  ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.