You are here

public function ElementExceptionTest::testMessage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/tests/Exception/ElementExceptionTest.php \Behat\Mink\Tests\Exception\ElementExceptionTest::testMessage()

File

vendor/behat/mink/tests/Exception/ElementExceptionTest.php, line 12

Class

ElementExceptionTest
@group legacy

Namespace

Behat\Mink\Tests\Exception

Code

public function testMessage() {
  $exception = new ElementException($this
    ->getElementMock(), new \Exception('Something went wrong'));
  $expectedMessage = "Exception thrown by element XPath\nSomething went wrong";
  $this
    ->assertEquals($expectedMessage, $exception
    ->getMessage());
  $this
    ->assertEquals($expectedMessage, (string) $exception);
}