Issues (66)

tests/Command/CacheTest.php (2 issues)

1
<?php
2
3
class CacheTest extends \PHPUnit\Framework\TestCase
4
{
5
	public function testRun()
6
	{
7
		$cfgfile = dirname( dirname( __DIR__ ) ) . '/src/aimeos-default.php';
8
		$argv = array( "cache.php", "--config=$cfgfile", "unittest" );
9
10
		ob_start();
11
		$result = \Aimeos\Slim\Command\Cache::run( $argv );
0 ignored issues
show
The assignment to $result is dead and can be removed.
Loading history...
12
		$output = ob_get_contents();
13
		ob_end_clean();
14
15
		$this->assertEquals( "Clearing the Aimeos cache for site \"unittest\"\n", $output );
16
	}
17
18
19
	public function testRunHelp()
20
	{
21
		$cfgfile = dirname( dirname( __DIR__ ) ) . '/src/aimeos-default.php';
0 ignored issues
show
The assignment to $cfgfile is dead and can be removed.
Loading history...
22
		$argv = array( "cache.php", "--help" );
23
24
		$this->expectException( \Aimeos\Slim\Command\Exception::class );
25
		\Aimeos\Slim\Command\Cache::run( $argv );
26
	}
27
}
28