コード例 #1
0
 public function test_queue_with_synchronous_driver_and_in_memory_pubsub_fires_event_with_expected_return_value()
 {
     $pubsub = new InMemoryPubSub();
     $container = new Container();
     $container->singleton(IlluminateQueueHandler::class, function () use($pubsub) {
         return new IlluminateQueueHandler($pubsub, new Serializer());
     });
     $driver = new SyncQueue();
     $driver->setContainer($container);
     $called = false;
     $pubsub->on('kyew:task:random-task-id', function ($publishedValue) use(&$called) {
         $this->assertEquals('foo!bar!', $publishedValue);
         $called = true;
     });
     $queue = new IlluminateQueue($driver, new Serializer());
     $queue->push('random-task-id', function () {
         return 'foo!bar!';
     });
     $this->assertTrue($called);
 }
コード例 #2
0
ファイル: _ide_helper.php プロジェクト: satriashp/tour
 /**
  * Set the encrypter instance.
  *
  * @param \Illuminate\Contracts\Encryption\Encrypter $crypt
  * @return void 
  * @static 
  */
 public static function setEncrypter($crypt)
 {
     //Method inherited from \Illuminate\Queue\Queue
     \Illuminate\Queue\SyncQueue::setEncrypter($crypt);
 }
コード例 #3
0
ファイル: _ide_helper.php プロジェクト: jorzhikgit/MLM-Nexus
 /**
  * Set the IoC container instance.
  *
  * @param \Illuminate\Container\Container $container
  * @return void 
  * @static 
  */
 public static function setContainer($container)
 {
     //Method inherited from \Illuminate\Queue\Queue
     \Illuminate\Queue\SyncQueue::setContainer($container);
 }