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.
15
* @author Márcio Almada <marcio3w@gmail.com>
16
* @copyright Sebastian Bergmann <sebastian@phpunit.de>
17
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
18
* @link http://www.phpunit.de/
19
* @since Class available since Release 4.0.20
20
* @covers PHPUnit_Framework_Constraint_ExceptionMessage
22
class ExceptionMessageTest extends PHPUnit_Framework_TestCase
26
* @expectedException \Exception
27
* @expectedExceptionMessage A literal exception message
29
public function testLiteralMessage()
31
throw new Exception("A literal exception message");
35
* @expectedException \Exception
36
* @expectedExceptionMessage A partial
38
public function testPatialMessageBegin()
40
throw new Exception("A partial exception message");
44
* @expectedException \Exception
45
* @expectedExceptionMessage partial exception
47
public function testPatialMessageMiddle()
49
throw new Exception("A partial exception message");
53
* @expectedException \Exception
54
* @expectedExceptionMessage exception message
56
public function testPatialMessageEnd()
58
throw new Exception("A partial exception message");