34 require_once
'/usr/share/php/PHPUnit/Framework.php';
40 class cli1Test extends \PHPUnit\Framework\TestCase
42 public function testHelp()
44 print
"Starting testHelp\n";
47 $upStream =
'/usr/local/share/fossology/php/pathinclude.php';
48 $pkg =
'/usr/share/fossology/php/pathinclude.php';
49 if(file_exists($upStream))
51 require_once($upStream);
53 else if(file_exists($pkg))
59 $this->assertFileExists($upStream,
60 $message =
'FATAL: cannot find pathinclude.php file, stopping test\n');
61 $this->assertFileExists($pkg,
62 $message =
'FATAL: cannot find pathinclude.php file, stopping test\n');
69 $nomos = $AGENTDIR .
'/nomos';
71 $last = exec(
"$nomos -h 2>&1", $out, $rtn);
72 $error =
'/usr/local/lib/fossology/agents/nomos: invalid option -- h';
73 $usage =
'Usage: /usr/local/lib/fossology/agents/nomos [options] [file [file [...]]';
75 $this->assertEquals($error, $out[0]);
76 $this->assertEquals($usage, $out[1]);