spec\MGDigital\BusQue\Redis\RedisDriverSpec::it_can_receive_due_scheduled_commands PHP Méthode

it_can_receive_due_scheduled_commands() public méthode

    public function it_can_receive_due_scheduled_commands()
    {
        $date = new \DateTimeImmutable();
        $timestamp = $date->getTimestamp();
        $lua = $this->getLua('receive_due_messages');
        $this->adapter->evalLua($lua, ['test', 0, $timestamp, SchedulerWorker::DEFAULT_THROTTLE])->shouldBeCalled()->willReturn([['test', 'test', 'test', $timestamp]]);
        $commandsWrapper = $this->receiveDueCommands($date);
        $commands = $commandsWrapper->getWrappedObject();
        \PHPUnit_Framework_Assert::assertArrayHasKey(0, $commands);
        \PHPUnit_Framework_Assert::assertArrayNotHasKey(1, $commands);
        \PHPUnit_Framework_Assert::assertEquals('test', $commands[0]->getId());
    }