function RowCountExceptionTest::testExceptionMessage

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php \Drupal\Tests\Core\Database\RowCountExceptionTest::testExceptionMessage()
  2. 11.x core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php \Drupal\Tests\Core\Database\RowCountExceptionTest::testExceptionMessage()

@covers ::__construct @dataProvider providerTestExceptionMessage()

File

core/tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php, line 36

Class

RowCountExceptionTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Database%21RowCountException.php/class/RowCountException/9" title="Exception thrown if a SELECT query trying to execute rowCount() on result." class="local">\Drupal\Core\Database\RowCountException</a>

Namespace

Drupal\Tests\Core\Database

Code

public function testExceptionMessage($expected, $message) {
    $e = new RowCountException($message);
    $this->assertSame($expected, $e->getMessage());
}

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