FOSSology  4.4.0
Open Source License Compliance by Open Source Software
AgentTestMockHelper.php
1 <?php
2 # SPDX-FileCopyrightText: © Fossology contributors
3 
4 # SPDX-License-Identifier: GPL-2.0-only
5 
6 namespace Fossology\Lib\Agent;
7 
8 function cli_Init()
9 {
10 }
11 
12 function getopt($arg1, $arg2)
13 {
14  global $userId;
15  global $jobId;
16  global $groupId;
17  global $extraOpts;
18 
19  if (! is_array($extraOpts)) {
20  $extraOpts = array();
21  }
22 
23  return array_merge(
24  array(
25  "scheduler_start" => "",
26  "userID" => $userId,
27  "jobId" => $jobId,
28  "groupID" => $groupId
29  ), $extraOpts);
30 }
31 
32 function fgets($in)
33 {
34  global $fgetsMock;
35 
36  return $fgetsMock->fgets($in);
37 }
38 
39 class FgetsMock
40 {
41  function fgets($in)
42  {
43  }
44 }
45 
cli_Init()
Initialize the fossology environment for CLI use. This routine loads the plugins so they can be use b...
Definition: common-cli.php:25