public function testPerfQueueLength() { $queue = new Qless\Queue("testQueue", $this->client); $cb = $this->getProfilerForCallback(function ($e) use($queue) { $queue->length(); }); $cb(self::TEST_TIME, __METHOD__); }
public function testQueueLength() { $queue = new Qless\Queue("testQueue", $this->client); $testData = ["performMethod" => 'myPerformMethod', "payload" => "otherData"]; foreach (range(1, 10) as $i) { $queue->put("Sample\\TestWorkerImpl", "jid-" . $i, $testData); } $len = $queue->length(); $this->assertEquals(10, $len); }