FOSSology  4.4.0
Open Source License Compliance by Open Source Software
HelperPluginMock.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2015 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
12 namespace Fossology\Decider;
13 
14 use Mockery as M;
15 
19 $deciderPlugin = M::mock();//'Fossology\\DeciderJob\\UI\\DeciderJobAgentPlugin');
20 $deciderPlugin->shouldReceive('AgentAdd')->withArgs(array(1,2,anything(), arrayWithSize(1)))->once();
25 $GLOBALS['xyyzzzDeciderJob'] = $deciderPlugin;
31 function plugin_find($x)
32 {
33  return $GLOBALS['xyyzzzDeciderJob'];
34 }
42 function IsAlreadyScheduled($jobId, $agentName, $uploadId)
43 {
44  return 177;
45 }
Namespace for decider agent.
Definition: BulkReuser.php:8
$GLOBALS['xyyzzzDeciderJob']
IsAlreadyScheduled($jobId, $agentName, $uploadId)
Mock function to depict scheduler working.
plugin_find($x)
Mock function to get decider plugin required by BulkReuser.