| 1 | <?php |
||
| 22 | class BaseCommandTestCase extends BaseTestCase |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var AbstractCommand|\PHPUnit_Framework_MockObject_MockObject |
||
| 26 | */ |
||
| 27 | protected $command; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $commandClass |
||
| 31 | * @param array $payloadData |
||
| 32 | */ |
||
| 33 | protected function initCommandWithPayload(string $commandClass, array $payloadData) |
||
| 34 | { |
||
| 35 | $loop = $this->getMock(LoopInterface::class); |
||
| 36 | /** @var Payload $payload */ |
||
| 37 | $payload = new Payload($payloadData); |
||
| 38 | /** @var RealTimeClient $client */ |
||
| 39 | $client = $this->getMock(RealTimeClient::class, [], [$loop]); |
||
| 40 | $this->command = new $commandClass($payload, $client); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |