RunTestsCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 10
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
A execute() 0 6 1
1
<?php
2
3
namespace Queryr\Replicator\Cli\Command;
4
5
use Symfony\Component\Console\Command\Command;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
9
/**
10
 * @licence GNU GPL v2+
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class RunTestsCommand extends Command {
14
15
	protected function configure() {
16
		$this->setName( 'test' );
17
		$this->setDescription( 'Run the PHPUnit tests' );
18
	}
19
20
	protected function execute( InputInterface $input, OutputInterface $output ) {
21
		$pwd = getcwd();
22
		chdir( __DIR__ . '/../../..' );
23
		passthru( 'phpunit' );
24
		chdir( $pwd );
25
	}
26
27
}