Failed Conditions
Pull Request — master (#2)
by Alexander
01:30
created

AbstractTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A onNotSuccessfulTest() 0 5 1
1
<?php
2
/**
3
 * This file is part of the phpunit-mink library.
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @copyright Alexander Obuhovich <[email protected]>
8
 * @link      https://github.com/aik099/phpunit-mink
9
 */
10
11
namespace ConsoleHelpers\PHPUnitCompat;
12
13
14
use PHPUnit\Framework\TestCase;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
16
if ( version_compare($runner_version, '5.0.0', '<') ) {
17
	/**
18
	 * Implementation for PHPUnit 4
19
	 */
20
	abstract class AbstractTestCase extends TestCase
21
	{
22
23
		use TAbstractTestCaseBody;
24
25
		/**
26
		 * @inheritDoc
27
		 */
28
		protected function onNotSuccessfulTest(\Exception $e)
29
		{
30
			$this->onNotSuccessfulTestCompat($e);
31
32
			parent::onNotSuccessfulTest($e);
33
		}
34
35
	}
36
}
37
elseif ( version_compare($runner_version, '6.0.0', '<') ) {
38
	/**
39
	 * Implementation for PHPUnit 5
40
	 */
41
	abstract class AbstractTestCase extends TestCase
42
	{
43
44
		use TAbstractTestCaseBody;
45
46
		/**
47
		 * @inheritDoc
48
		 */
49
		protected function onNotSuccessfulTest($e)
50
		{
51
			$this->onNotSuccessfulTestCompat($e);
52
53
			parent::onNotSuccessfulTest($e);
54
		}
55
56
	}
57
}
58