Failed Conditions
Push — master ( db6d0c...694d4f )
by Alexander
27s queued 24s
created

AbstractTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

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