예제 #1
0
 public function testPerfQueueLength()
 {
     $queue = new Qless\Queue("testQueue", $this->client);
     $cb = $this->getProfilerForCallback(function ($e) use($queue) {
         $queue->length();
     });
     $cb(self::TEST_TIME, __METHOD__);
 }
예제 #2
0
 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);
 }