mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
23 lines
575 B
PHP
23 lines
575 B
PHP
<?php
|
|
|
|
class QueueTest extends \Codeception\Test\Unit
|
|
{
|
|
public function testDummyQueue()
|
|
{
|
|
config('queue.driver', 'dummy');
|
|
|
|
$handler = 'myfunc';
|
|
$args = (object)['foo' => 'bar'];
|
|
$options = (object)['key' => 'val'];
|
|
|
|
Rhymix\Framework\Queue::addTask($handler, $args, $options);
|
|
|
|
$output = Rhymix\Framework\Queue::getTask();
|
|
$this->assertEquals('myfunc', $output->handler);
|
|
$this->assertEquals('bar', $output->args->foo);
|
|
$this->assertEquals('val', $output->options->key);
|
|
|
|
$output = Rhymix\Framework\Queue::getTask();
|
|
$this->assertNull($output);
|
|
}
|
|
}
|