3 declare(strict_types=1);
36 $this->agent_finder = $this->createMock(AgentFinder::class);
41 $this->agent_finder = $af;
44 public function _getRelevantAgent($i)
53 $ii = $this->createMock(InputInterface::class);
54 $ac = $this->createMock(AgentCollection::class);
61 ->expects($this->once())
66 $agent = $this->has_agent->_getRelevantAgent($ii);
68 $this->assertEquals($ac, $agent);
73 $ii = $this->createMock(InputInterface::class);
74 $ac = $this->createMock(AgentCollection::class);
82 ->will($this->returnValueMap([
88 ->expects($this->once())
89 ->method(
"getCoreAgents")
93 $agent = $this->has_agent->_getRelevantAgent($ii);
95 $this->assertEquals($ac, $agent);
100 $ii = $this->createMock(InputInterface::class);
101 $ac = $this->createMock(AgentCollection::class);
105 ->method(
"hasOption")
109 ->method(
"getOption")
110 ->will($this->returnValueMap([
111 [
"no-plugins", null],
112 [
"plugin",
"foobar"],
117 ->expects($this->once())
118 ->method(
"getPluginAgent")
122 $agent = $this->has_agent->_getRelevantAgent($ii);
124 $this->assertEquals($ac, $agent);
testGetRelevantAgentWithoutOption()
testGetRelevantAgentWithPluginNameOptions()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRelevantAgent(InputInterface $input)
__construct()
Constructor setup ILIAS global object public.
testGetRelevantAgentWithNoPluginOption()
AgentFinder $agent_finder
trait HasAgent
Add this to an Command that has an agent.