3 * This file is part of PHPUnit.
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
12 * @since Class available since Release 4.0.20
13 * @covers PHPUnit_Framework_Constraint_ExceptionMessage
15 class ExceptionMessageTest extends PHPUnit_Framework_TestCase
18 * @expectedException \Exception
19 * @expectedExceptionMessage A literal exception message
21 public function testLiteralMessage()
23 throw new Exception('A literal exception message');
27 * @expectedException \Exception
28 * @expectedExceptionMessage A partial
30 public function testPatialMessageBegin()
32 throw new Exception('A partial exception message');
36 * @expectedException \Exception
37 * @expectedExceptionMessage partial exception
39 public function testPatialMessageMiddle()
41 throw new Exception('A partial exception message');
45 * @expectedException \Exception
46 * @expectedExceptionMessage exception message
48 public function testPatialMessageEnd()
50 throw new Exception('A partial exception message');