コード例 #1
0
 public function testGettersAndSetters()
 {
     $options = new ConnectionOptions(array('host' => 'localhost', 'port' => 5672, 'login' => 'guest', 'password' => 'passwd', 'vhost' => '/', 'persistent' => false, 'readTimeout' => 1.0, 'writeTimeout' => 2.0));
     $this->assertSame('localhost', $options->getHost());
     $this->assertSame(5672, $options->getPort());
     $this->assertSame('guest', $options->getLogin());
     $this->assertSame('passwd', $options->getPassword());
     $this->assertSame('/', $options->getVhost());
     $this->assertFalse($options->getPersistent());
     $this->assertEquals(1.0, $options->getReadTimeout());
     $this->assertEquals(2.0, $options->getWriteTimeout());
 }