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

ClearCommandTest::testCacheCommand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 13
rs 10
c 0
b 0
f 0
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