Passed
Push — master ( 10c425...0debd4 )
by Aimeos
03:58
created

ClearCommandTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 15
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCacheCommand() 0 13 1
1
<?php
2
3
namespace Aimeos\ShopBundle\Tests\Command;
4
5
6
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
7
use Symfony\Bundle\FrameworkBundle\Console\Application;
8
use Symfony\Component\Console\Tester\CommandTester;
9
use Aimeos\ShopBundle\Command;
10
11
12
class ClearCommandTest extends WebTestCase
13
{
14
	public function testCacheCommand()
15
	{
16
		$kernel = $this->createKernel();
17
		$kernel->boot();
18
19
		$application = new Application( $kernel );
20
		$application->add( new Command\CacheCommand() );
0 ignored issues
show
Bug introduced by
The type Aimeos\ShopBundle\Command\CacheCommand 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...
21
22
		$command = $application->find( 'aimeos:clear' );
23
		$commandTester = new CommandTester( $command );
24
		$commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest' ) );
25
26
		$this->assertEquals( 0, $commandTester->getStatusCode() );
27
	}
28
}
29