testConstructor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
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