From 80f7dc77d430774192b929d780f96260066df2ee Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 18 Oct 2015 09:31:31 +0200 Subject: Update to MediaWiki 1.25.3 --- .../elastica/test/lib/Elastica/Test/StatusTest.php | 116 --------------------- 1 file changed, 116 deletions(-) delete mode 100644 vendor/ruflin/elastica/test/lib/Elastica/Test/StatusTest.php (limited to 'vendor/ruflin/elastica/test/lib/Elastica/Test/StatusTest.php') diff --git a/vendor/ruflin/elastica/test/lib/Elastica/Test/StatusTest.php b/vendor/ruflin/elastica/test/lib/Elastica/Test/StatusTest.php deleted file mode 100644 index 14d7950a..00000000 --- a/vendor/ruflin/elastica/test/lib/Elastica/Test/StatusTest.php +++ /dev/null @@ -1,116 +0,0 @@ -_createIndex(); - $status = new Status($index->getClient()); - $this->assertInstanceOf('Elastica\Response', $status->getResponse()); - } - - public function testGetIndexStatuses() - { - $index = $this->_createIndex(); - - $status = new Status($index->getClient()); - $statuses = $status->getIndexStatuses(); - - $this->assertInternalType('array', $statuses); - - foreach ($statuses as $indexStatus) { - $this->assertInstanceOf('Elastica\Index\Status', $indexStatus); - } - } - - public function testGetIndexNames() - { - $indexName = 'test'; - $client = $this->_getClient(); - $index = $client->getIndex($indexName); - $index->create(array(), true); - $index = $this->_createIndex(); - $index->refresh(); - $index->optimize(); - - $status = new Status($index->getClient()); - $names = $status->getIndexNames(); - - $this->assertInternalType('array', $names); - $this->assertContains($index->getName(), $names); - - foreach ($names as $name) { - $this->assertInternalType('string', $name); - } - } - - public function testIndexExists() - { - $indexName = 'elastica_test'; - $aliasName = 'elastica_test-alias'; - - $client = $this->_getClient(); - $index = $client->getIndex($indexName); - - try { - // Make sure index is deleted first - $index->delete(); - } catch (ResponseException $e) { - } - - $status = new Status($client); - $this->assertFalse($status->indexExists($indexName)); - $index->create(); - - $status->refresh(); - $this->assertTrue($status->indexExists($indexName)); - } - - public function testAliasExists() - { - $indexName = 'test'; - $aliasName = 'elastica_test-alias'; - - $index1 = $this->_createIndex(); - - $status = new Status($index1->getClient()); - - foreach ($status->getIndicesWithAlias($aliasName) as $tmpIndex) { - $tmpIndex->removeAlias($aliasName); - } - - $this->assertFalse($status->aliasExists($aliasName)); - - $index1->addAlias($aliasName); - $status->refresh(); - $this->assertTrue($status->aliasExists($aliasName)); - - $indicesWithAlias = $status->getIndicesWithAlias($aliasName); - $this->assertEquals(array("elastica_$indexName"), array_map( - function($index) { - return $index->getName(); - }, $indicesWithAlias)); - } - - public function testServerStatus() - { - $client = $this->_getClient(); - $status = $client->getStatus(); - $serverStatus = $status->getServerStatus(); - - $this->assertTrue(!empty($serverStatus) ); - $this->assertTrue('array' == gettype($serverStatus)); - $this->assertArrayHasKey('status', $serverStatus); - $this->assertTrue($serverStatus['status'] == 200); - $this->assertArrayHasKey('version', $serverStatus); - - $versionInfo = $serverStatus['version']; - $this->assertArrayHasKey('number', $versionInfo); - } -} -- cgit v1.2.2