getTubes() public method

Returns the names of all tubes on the server.
public getTubes ( ) : array
return array
コード例 #1
0
ファイル: ExtendedTest.php プロジェクト: phalcon/incubator
 /**
  * @depends testShouldPutAndReserve
  */
 public function testShouldGetTubes()
 {
     $tubes = $this->client->getTubes();
     $this->assertNotEmpty($tubes);
     $this->assertContains(self::TUBE_NAME, $tubes);
     // Cleanup tubes
     foreach ($tubes as $tube) {
         $isRunning = true;
         $this->client->watch($tube);
         do {
             $job = $this->client->reserve(0.1);
             if ($job) {
                 $this->assertTrue($job->delete());
             } else {
                 $isRunning = false;
             }
         } while ($isRunning);
     }
 }
コード例 #2
0
ファイル: ExtendedTest.php プロジェクト: lisong/incubator
 /**
  * @depends testShouldPutAndReserve
  */
 public function testShouldGetTubes()
 {
     $tubes = $this->client->getTubes();
     $this->assertNotEmpty($tubes);
     $this->assertContains(self::TUBE_NAME, $tubes);
 }
コード例 #3
0
ファイル: ExtendedTest.php プロジェクト: nejtr0n/incubator
 /**
  * @depends testPutAndReserve
  */
 public function testGetTubes()
 {
     $tubes = $this->client->getTubes();
     $this->assertNotEmpty($tubes);
     $this->assertContains($this->tubeName, $tubes);
 }