~ballot/wordpress/openstack-objectstorage-bis

« back to all changes in this revision

Viewing changes to vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageTest.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
11
/**
 
12
 *
 
13
 *
 
14
 * @package    PHPUnit
 
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
 
21
 */
 
22
class ExceptionMessageTest extends PHPUnit_Framework_TestCase
 
23
{
 
24
 
 
25
    /**
 
26
     * @expectedException \Exception
 
27
     * @expectedExceptionMessage A literal exception message
 
28
     */
 
29
    public function testLiteralMessage()
 
30
    {
 
31
        throw new Exception("A literal exception message");
 
32
    }
 
33
 
 
34
    /**
 
35
     * @expectedException \Exception
 
36
     * @expectedExceptionMessage A partial
 
37
     */
 
38
    public function testPatialMessageBegin()
 
39
    {
 
40
        throw new Exception("A partial exception message");
 
41
    }
 
42
 
 
43
    /**
 
44
     * @expectedException \Exception
 
45
     * @expectedExceptionMessage partial exception
 
46
     */
 
47
    public function testPatialMessageMiddle()
 
48
    {
 
49
        throw new Exception("A partial exception message");
 
50
    }
 
51
 
 
52
    /**
 
53
     * @expectedException \Exception
 
54
     * @expectedExceptionMessage exception message
 
55
     */
 
56
    public function testPatialMessageEnd()
 
57
    {
 
58
        throw new Exception("A partial exception message");
 
59
    }
 
60
}