Exemplo n.º 1
0
 public function testConstruct()
 {
     $host = 'localhost';
     $port = 11211;
     $client = new Elastica_Client(array('host' => $host, 'port' => $port, 'transport' => 'Memcache'));
     $this->assertEquals($host, $client->getHost());
     $this->assertEquals($port, $client->getPort());
 }
Exemplo n.º 2
0
 public function testDefaults()
 {
     $client = new Elastica_Client();
     $this->assertEquals(Elastica_Client::DEFAULT_HOST, 'localhost');
     $this->assertEquals(Elastica_Client::DEFAULT_PORT, 9200);
     $this->assertEquals(Elastica_Client::DEFAULT_TRANSPORT, 'Http');
     $this->assertEquals(Elastica_Client::DEFAULT_HOST, $client->getHost());
     $this->assertEquals(Elastica_Client::DEFAULT_PORT, $client->getPort());
     $this->assertEquals(Elastica_Client::DEFAULT_TRANSPORT, $client->getTransport());
 }