Failed Conditions
Push — master ( b9670c...4ba57f )
by Zac
16:20 queued 37s
created

testConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Overwatch\ExpectationBundle\Tests\Exception;
4
5
use Overwatch\ExpectationBundle\Exception\ExpectationNotFoundException;
6
7
/**
8
 * ExpectationNotFoundExceptionTest
9
 * Unit tests the constructor functionality of ExpectationNotFoundException
10
 */
11
class ExpectationNotFoundExceptionTest extends \PHPUnit_Framework_TestCase
12
{
13
    public function testConstructor()
14
    {
15
        $badAlias = 'toBeAnExpectationThatDoesntExist';
16
        $exception = new ExpectationNotFoundException($badAlias);
17
18
        $this->assertInstanceOf('\OutOfBoundsException', $exception);
19
        $this->assertEquals($exception->getMessage(), 'Expectation with ' . $badAlias . ' could not be found.');
20
    }
21
}
22