RunTestsCommand::execute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
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
}