spec\MGDigital\BusQue\QueueWorkerSpec::it_can_receive_and_handle_a_queued_command PHP Method

it_can_receive_and_handle_a_queued_command() public method

    public function it_can_receive_and_handle_a_queued_command()
    {
        $receivedCommand = new ReceivedCommand('test_queue', 'test_id', 'serialized');
        $this->queueDriver->awaitCommand('test_queue', null)->willReturn($receivedCommand);
        $this->commandSerializer->unserialize('serialized')->willReturn('test_command');
        $this->logger->debug(Argument::type('string'), Argument::type('array'))->shouldBeCalled();
        $this->commandBusAdapter->handle('test_command', true)->shouldBeCalled();
        $this->queueDriver->completeCommand('test_queue', 'test_id')->shouldBeCalled();
        $this->logger->info(Argument::type('string'), Argument::type('array'))->shouldBeCalled();
        $this->work('test_queue', 1);
    }