1 | <?php |
||
2 | |||
3 | class JobsTest extends \PHPUnit\Framework\TestCase |
||
4 | { |
||
5 | public function testRun() |
||
6 | { |
||
7 | $cfgfile = dirname( dirname( __DIR__ ) ) . '/src/aimeos-settings.php'; |
||
8 | $argv = array( "jobs.php", "--config=$cfgfile", "index/optimize", "unittest" ); |
||
9 | |||
10 | $result = \Aimeos\Slim\Command\Jobs::run( $argv ); |
||
0 ignored issues
–
show
|
|||
11 | |||
12 | $this->expectOutputString( "Executing the Aimeos jobs for \"unittest\"\n" ); |
||
13 | } |
||
14 | |||
15 | |||
16 | public function testRunHelp() |
||
17 | { |
||
18 | $this->expectException( \Aimeos\Slim\Command\Exception::class ); |
||
19 | \Aimeos\Slim\Command\Cache::run( array( "jobs.php", "--help" ) ); |
||
20 | } |
||
21 | } |
||
22 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.