diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-10-18 09:31:31 +0200 |
commit | 80f7dc77d430774192b929d780f96260066df2ee (patch) | |
tree | 102eaae7fc9ec567f2af76e96da3de2d1e83afcf /vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php | |
parent | cccd7bb4d819334c07e0dadaf16cbfdef31880e1 (diff) |
Update to MediaWiki 1.25.3
Diffstat (limited to 'vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php')
-rw-r--r-- | vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php b/vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php deleted file mode 100644 index 0331e389..00000000 --- a/vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -namespace Elastica\Test; - -use Elastica\Client; -use Elastica\Document; -use Elastica\Test\Base as BaseTest; - -/** - * Tests the example code - */ -class ExampleTest extends BaseTest -{ - public function testBasicGettingStarted() { - - $client = new \Elastica\Client(); - $index = $client->getIndex('ruflin'); - $type = $index->getType('users'); - - $id = 2; - $data = array('firstname' => 'Nicolas', 'lastname' => 'Ruflin'); - $doc = new \Elastica\Document($id, $data); - - $type->addDocument($doc); - - } - - public function testExample() - { - // Creates a new index 'xodoa' and a type 'user' inside this index - $client = $this->_getClient(); - $index = $client->getIndex('elastica_test'); - $index->create(array(), true); - - $type = $index->getType('user'); - - // Adds 1 document to the index - $doc1 = new Document(1, - array('username' => 'hans', 'test' => array('2', '3', '5')) - ); - $type->addDocument($doc1); - - // Adds a list of documents with _bulk upload to the index - $docs = array(); - $docs[] = new Document(2, - array('username' => 'john', 'test' => array('1', '3', '6')) - ); - $docs[] = new Document(3, - array('username' => 'rolf', 'test' => array('2', '3', '7')) - ); - $type->addDocuments($docs); - - // Refresh index - $index->refresh(); - - $resultSet = $type->search('rolf'); - } -} |