ExceptionTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A givenErrorsAreReturned() 0 8 1
1
<?php
2
3
namespace Communibase;
4
5
/**
6
 * Class ExceptionTest
7
 *
8
 * @package Communibase
9
 */
10
class ExceptionTest extends \PHPUnit_Framework_TestCase
11
{
12
    /**
13
     * @test
14
     */
15
    public function givenErrorsAreReturned()
16
    {
17
        $e = new Exception('message', 0, null, ['test']);
18
        $this->assertInstanceOf(Exception::class, $e);
19
        $this->assertSame('message', $e->getMessage());
20
        $this->assertSame(0, $e->getCode());
21
        $this->assertSame(['test'], $e->getErrors());
22
    }
23
}