Completed
Pull Request — master (#4)
by Tomasz
03:46 queued 01:50
created

AbstractTestCase::expectException()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
namespace Thunder\Serializard\Tests;
3
4
use PHPUnit\Framework\TestCase;
5
6
/**
7
 * @author Tomasz Kowalczyk <[email protected]>
8
 */
9
abstract class AbstractTestCase extends TestCase
10
{
11
    public function expectException($exception)
12
    {
13
        version_compare(phpversion(), '7.0.0') > 0
14
            ? parent::expectException($exception)
15
            : $this->setExpectedException($exception);
0 ignored issues
show
Bug introduced by
The method setExpectedException() does not exist on Thunder\Serializard\Tests\AbstractTestCase. Did you maybe mean setExpectedExceptionFromAnnotation()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
16
    }
17
}
18