Completed
Push — master ( f1f969...38d384 )
by Robin
01:58
created

ExceptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A givenErrorsAreReturned() 0 10 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, [
18
            'test',
19
        ]);
20
        $this->assertInstanceOf(Exception::class, $e);
21
        $this->assertSame('message', $e->getMessage());
22
        $this->assertSame(0, $e->getCode());
23
        $this->assertSame(['test'], $e->getErrors());
24
    }
25
}