diff options
Diffstat (limited to 'vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php')
-rw-r--r-- | vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php b/vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php index 0331e389..efdc04eb 100644 --- a/vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php +++ b/vendor/ruflin/elastica/test/lib/Elastica/Test/ExampleTest.php @@ -1,30 +1,33 @@ <?php - namespace Elastica\Test; -use Elastica\Client; use Elastica\Document; use Elastica\Test\Base as BaseTest; /** - * Tests the example code + * 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); - - } - + /** + * @group functional + */ + public function testBasicGettingStarted() + { + $client = $this->_getClient(); + $index = $client->getIndex('ruflin'); + $type = $index->getType('users'); + + $id = 2; + $data = array('firstname' => 'Nicolas', 'lastname' => 'Ruflin'); + $doc = new Document($id, $data); + + $type->addDocument($doc); + } + + /** + * @group functional + */ public function testExample() { // Creates a new index 'xodoa' and a type 'user' inside this index |