7use PHPUnit\Framework\TestCase;
8use Symfony\Component\Console\Input\InputInterface;
20 $this->config_reader = $this->createMock(ConfigReader::class);
21 $this->has_config_reader =
new class($this->config_reader) {
25 $this->config_reader = $cr;
28 public function _readAgentConfig(
Agent $agent, InputInterface $input) : ?
Config
37 $agent = $this->createMock(Agent::class);
38 $ii = $this->createMock(InputInterface::class);
45 $this->assertNull($this->has_config_reader->_readAgentConfig($agent, $ii));
An exception for terminatinating execution or to throw for unit testing.
Read a json-formatted config from a file and overwrite some fields.
testReadAgentConfigWithoutConfig()
__construct($a_client_id=0)
Constructor setup ILIAS global object @access public.
A agent is some component that performs part of the setup process.
A configuration for the setup.
readAgentConfig(Agent $agent, InputInterface $input)
trait HasConfigReader
Add this to an Command that has an config reader.