Example #1
0
 /**
  * @param array $params
  * @dataProvider queueParamsProvider
  */
 public function testQueueClosure_queues(array $params)
 {
     $closure = function () {
         $this->fail('Should not be executed');
     };
     $testData = 'test';
     $this->serializerMock->expects($this->once())->method('serialize')->with($this->isInstanceOf(ClosureCommand::class))->willReturn($testData);
     $invocationMocker = $this->producerMock->expects($this->once())->method('put');
     call_user_func_array([$invocationMocker, 'with'], array_merge([$testData], $params));
     call_user_func_array([$this->qMan, 'queueClosure'], array_merge([$closure, self::TEST_TUBE], $params));
 }