You are here

public function ExpectationExceptionTest::testExceptionWhileRenderingString in Zircon Profile 8

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

File

vendor/behat/mink/tests/Exception/ExpectationExceptionTest.php, line 85

Class

ExpectationExceptionTest

Namespace

Behat\Mink\Tests\Exception

Code

public function testExceptionWhileRenderingString() {
  $driver = $this
    ->getMock('Behat\\Mink\\Driver\\DriverInterface');
  $driver
    ->expects($this
    ->any())
    ->method('getContent')
    ->will($this
    ->throwException(new \Exception('Broken page')));
  $exception = new ExpectationException('Expectation failure', $driver);
  $this
    ->assertEquals('Expectation failure', $exception
    ->__toString());
}