Passed
Push — testing ( 57c125...199f7f )
by Hennik
03:23
created

BaseTestCase   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 6
c 1
b 0
f 0
dl 0
loc 14
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 1
A assertException() 0 7 2
1
<?php
2
3
abstract class BaseTestCase extends PHPUnit_Framework_TestCase
4
{
5
    public function tearDown()
6
    {
7
        Mockery::close();
8
    }
9
10
    protected function assertException($exceptionName)
11
    {
12
        if (method_exists(parent::class, 'expectException')) {
13
            parent::expectException($exceptionName);
14
        } else {
15
            /** @scrutinizer ignore-deprecated */
16
            $this->setExpectedException($exceptionName);
17
        }
18
    }
19
}
20