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

ExpectationNotFoundExceptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructor() 0 8 1
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