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

TAbstractTestSuiteBody   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 2
dl 0
loc 21
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDownCompat() 0 2 1
A runCompat() 0 3 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\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;
1 ignored issue
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 ( !\defined('PHPUNIT_COMPAT_RUNNER_VERSION') ) {
18
	if ( \class_exists('PHPUnit\Runner\Version') ) {
19
		\define('PHPUNIT_COMPAT_RUNNER_VERSION', Version::id());
20
	}
21
	else {
22
		\define('PHPUNIT_COMPAT_RUNNER_VERSION', \PHPUnit_Runner_Version::id());
1 ignored issue
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...
23
	}
24
}
25
26
27
trait TAbstractTestSuiteBody
28
{
29
30
	/**
31
	 * Runs the tests and collects their result in a TestResult.
32
	 *
33
	 * @param TestResult $result Test result.
34
	 *
35
	 * @return TestResult
36
	 */
37
	public function runCompat($result = null)
38
	{
39
		return parent::run($result);
40
	}
41
42
	/**
43
	 * Template Method that is called after the tests
44
	 * of this test suite have finished running.
45
	 */
46
	protected function tearDownCompat()
47
	{
48
49
	}
50
51
}
52
53
54
if ( version_compare(\PHPUNIT_COMPAT_RUNNER_VERSION, '6.0.0', '<') ) {
55
	require_once __DIR__ . '/AbstractTestSuite5.php';
56
}
57
else {
58
	require_once __DIR__ . '/AbstractTestSuite7.php';
59
}
60