generateTestService('json'); $client = $this->generateTestClient( $service, json_encode(['Timestamp' => $timestamp]) ); $command = $client->getCommand($commandName); $list = $client->getHandlerList(); $handler = $list->resolve(); $result = $handler($command)->wait()['Timestamp']->__toString(); self::assertEquals($expectedValue, $result); } /** * @dataProvider timeStampExceptionModelProvider */ public function testTimeStampExceptions( $timestamp, $commandName, $expectedException, $expectedMessage ) { $service = $this->generateTestService('json'); $client = $this->generateTestClient( $service, json_encode(['Timestamp' => $timestamp]) ); $command = $client->getCommand($commandName); $list = $client->getHandlerList(); $handler = $list->resolve(); $this->expectException($expectedException, $expectedMessage); $handler($command)->wait(); } }