diff options
Diffstat (limited to 'vendor/ruflin/elastica/test/lib/Elastica/Test/ConnectionTest.php')
-rw-r--r-- | vendor/ruflin/elastica/test/lib/Elastica/Test/ConnectionTest.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/vendor/ruflin/elastica/test/lib/Elastica/Test/ConnectionTest.php b/vendor/ruflin/elastica/test/lib/Elastica/Test/ConnectionTest.php index 80cab9f0..7600524b 100644 --- a/vendor/ruflin/elastica/test/lib/Elastica/Test/ConnectionTest.php +++ b/vendor/ruflin/elastica/test/lib/Elastica/Test/ConnectionTest.php @@ -1,5 +1,4 @@ <?php - namespace Elastica\Test; use Elastica\Connection; @@ -8,7 +7,9 @@ use Elastica\Test\Base as BaseTest; class ConnectionTest extends BaseTest { - + /** + * @group unit + */ public function testEmptyConstructor() { $connection = new Connection(); @@ -17,10 +18,14 @@ class ConnectionTest extends BaseTest $this->assertEquals(Connection::DEFAULT_TRANSPORT, $connection->getTransport()); $this->assertInstanceOf('Elastica\Transport\AbstractTransport', $connection->getTransportObject()); $this->assertEquals(Connection::TIMEOUT, $connection->getTimeout()); + $this->assertEquals(Connection::CONNECT_TIMEOUT, $connection->getConnectTimeout()); $this->assertEquals(array(), $connection->getConfig()); $this->assertTrue($connection->isEnabled()); } + /** + * @group unit + */ public function testEnabledDisable() { $connection = new Connection(); @@ -32,6 +37,7 @@ class ConnectionTest extends BaseTest } /** + * @group unit * @expectedException \Elastica\Exception\ConnectionException */ public function testInvalidConnection() @@ -45,6 +51,9 @@ class ConnectionTest extends BaseTest $request->send(); } + /** + * @group unit + */ public function testCreate() { $connection = Connection::create(); @@ -60,6 +69,7 @@ class ConnectionTest extends BaseTest } /** + * @group unit * @expectedException \Elastica\Exception\InvalidException * @expectedException \Elastica\Exception\InvalidException */ @@ -68,6 +78,9 @@ class ConnectionTest extends BaseTest Connection::create('test'); } + /** + * @group unit + */ public function testGetConfig() { $url = 'test'; @@ -76,6 +89,9 @@ class ConnectionTest extends BaseTest $this->assertEquals($url, $connection->getConfig('url')); } + /** + * @group unit + */ public function testGetConfigWithArrayUsedForTransport() { $connection = new Connection(array('transport' => array('type' => 'Http'))); @@ -83,6 +99,7 @@ class ConnectionTest extends BaseTest } /** + * @group unit * @expectedException Elastica\Exception\InvalidException * @expectedExceptionMessage Invalid transport */ @@ -93,6 +110,7 @@ class ConnectionTest extends BaseTest } /** + * @group unit * @expectedException \Elastica\Exception\InvalidException */ public function testGetConfigInvalidValue() |