/** * @test */ public function minifyAndSerialize() { $result = new Result(); $result->setTask(new Task(function () { return 'foo'; }, null, null)); $minified = Formatter::minifyAndSerialize($result); $this->assertTrue(is_string($minified)); }
/** * @return \Ackintosh\Snidel\Result\Result * @throws \RuntimeException */ public function dequeue() { $this->dequeuedCount++; try { $serialized = $this->receiveMessage(); } catch (\RuntimeException $e) { throw new \RuntimeException('failed to dequeue result'); } return ResultFormatter::unserialize($serialized); }