From be4626482ba8761da39746a6ac60d133d3852a0f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:45:00 +0200 Subject: Merging upstream version 1.1.2. Signed-off-by: Daniel Baumann --- test/php/Lib/StrikingCommandTransport.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 test/php/Lib/StrikingCommandTransport.php (limited to 'test/php/Lib/StrikingCommandTransport.php') diff --git a/test/php/Lib/StrikingCommandTransport.php b/test/php/Lib/StrikingCommandTransport.php new file mode 100644 index 0000000..5e14ef9 --- /dev/null +++ b/test/php/Lib/StrikingCommandTransport.php @@ -0,0 +1,28 @@ + ['host' => 'endpointA'], 'endpoint2' => ['host' => 'endpointB']]); + } + + public static function createTransport(ConfigObject $config): ApiCommandTransport + { + return (new class extends ApiCommandTransport { + protected function sendCommand(IcingaApiCommand $command) + { + throw new CommandTransportException(sprintf('%s strikes!', $this->getHost())); + } + })->setHost($config->host); + } +} -- cgit v1.2.3