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

TAbstractTestSuiteBody::runCompat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
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\TestResult;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestResult 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
use PHPUnit\Runner\Version;
0 ignored issues
show
Bug introduced by
The type PHPUnit\Runner\Version 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...
16
17
if ( \class_exists('PHPUnit\Runner\Version') ) {
18
	$runner_version = Version::id();
19
}
20
else {
21
	$runner_version = \PHPUnit_Runner_Version::id();
0 ignored issues
show
Bug introduced by
The type PHPUnit_Runner_Version 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...
22
}
23
24
25
trait TAbstractTestSuiteBody
26
{
27
28
	/**
29
	 * Runs the tests and collects their result in a TestResult.
30
	 *
31
	 * @param TestResult $result Test result.
32
	 *
33
	 * @return TestResult
34
	 */
35
	public function runCompat($result = null)
36
	{
37
		return parent::run($result);
38
	}
39
40
	/**
41
	 * Template Method that is called after the tests
42
	 * of this test suite have finished running.
43
	 */
44
	protected function tearDownCompat()
45
	{
46
47
	}
48
49
}
50
51
52
if ( version_compare($runner_version, '6.0.0', '<') ) {
53
	require_once __DIR__ . '/AbstractTestSuite5.php';
54
}
55
else {
56
	require_once __DIR__ . '/AbstractTestSuite7.php';
57
}
58