23 require_once 
'/usr/share/php/PHPUnit/Framework.php';
 
   29 class cli1Test extends \PHPUnit\Framework\TestCase
 
   31   public function testHelp()
 
   33     print 
"Starting testHelp\n";
 
   36     $upStream = 
'/usr/local/share/fossology/php/pathinclude.php';
 
   37     $pkg = 
'/usr/share/fossology/php/pathinclude.php';
 
   38     if(file_exists($upStream))
 
   40       require_once($upStream);
 
   42     else if(file_exists($pkg))
 
   48       $this->assertFileExists($upStream,
 
   49       $message = 
'FATAL: cannot find pathinclude.php file, stopping test\n');
 
   50       $this->assertFileExists($pkg,
 
   51       $message = 
'FATAL: cannot find pathinclude.php file, stopping test\n');
 
   58     $nomos = $AGENTDIR . 
'/nomos';
 
   60     $last = exec(
"$nomos -h 2>&1", $out, $rtn);
 
   61     $error = 
'/usr/local/lib/fossology/agents/nomos: invalid option -- h';
 
   62     $usage = 
'Usage: /usr/local/lib/fossology/agents/nomos [options] [file [file [...]]';
 
   64     $this->assertEquals($error, $out[0]);
 
   65     $this->assertEquals($usage, $out[1]);