1<?php 2/* 3 * This file is part of PHPUnit. 4 * 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> 6 * 7 * For the full copyright and license information, please view the LICENSE 8 * file that was distributed with this source code. 9 */ 10 11class ExceptionMessageTest extends PHPUnit_Framework_TestCase 12{ 13 /** 14 * @expectedException \Exception 15 * @expectedExceptionMessage A literal exception message 16 */ 17 public function testLiteralMessage() 18 { 19 throw new Exception('A literal exception message'); 20 } 21 22 /** 23 * @expectedException \Exception 24 * @expectedExceptionMessage A partial 25 */ 26 public function testPartialMessageBegin() 27 { 28 throw new Exception('A partial exception message'); 29 } 30 31 /** 32 * @expectedException \Exception 33 * @expectedExceptionMessage partial exception 34 */ 35 public function testPartialMessageMiddle() 36 { 37 throw new Exception('A partial exception message'); 38 } 39 40 /** 41 * @expectedException \Exception 42 * @expectedExceptionMessage exception message 43 */ 44 public function testPartialMessageEnd() 45 { 46 throw new Exception('A partial exception message'); 47 } 48} 49