From 1a365e77dfb8825136626202b1df462731b42060 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 16 Aug 2015 08:22:05 +0200 Subject: Update to MediaWiki 1.25.2 --- .../test/lib/Elastica/Test/Node/InfoTest.php | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 vendor/ruflin/elastica/test/lib/Elastica/Test/Node/InfoTest.php (limited to 'vendor/ruflin/elastica/test/lib/Elastica/Test/Node') diff --git a/vendor/ruflin/elastica/test/lib/Elastica/Test/Node/InfoTest.php b/vendor/ruflin/elastica/test/lib/Elastica/Test/Node/InfoTest.php new file mode 100644 index 00000000..10886b2d --- /dev/null +++ b/vendor/ruflin/elastica/test/lib/Elastica/Test/Node/InfoTest.php @@ -0,0 +1,42 @@ +_getClient(); + $names = $client->getCluster()->getNodeNames(); + $name = reset($names); + + $node = new Node($name, $client); + $info = new NodeInfo($node); + + $this->assertNull($info->get('os', 'mem', 'total')); + + // Load os infos + $info = new NodeInfo($node, array('os')); + + $this->assertTrue(!is_null($info->get('os', 'mem', 'total_in_bytes'))); + $this->assertInternalType('array', $info->get('os', 'mem')); + $this->assertNull($info->get('test', 'notest', 'notexist')); + } + + public function testHasPlugin() + { + $client = $this->_getClient(); + $nodes = $client->getCluster()->getNodes(); + $node = $nodes[0]; + $info = $node->getInfo(); + + $pluginName = 'mapper-attachments'; + + $this->assertTrue($info->hasPlugin($pluginName)); + $this->assertFalse($info->hasPlugin('foo')); + } +} -- cgit v1.2.3-54-g00ecf