/** * @depends testPalavrasChavesModeladasEmObjeto */ public function testPesquisaAPartirDeQueriesModeladas(KeywordsInterface $keywords) { if (!$this->hasHost()) { return $this->markTestSkipped(); } $query = new Query($keywords); $query->setIndex('produtoIndex'); $this->assertEquals('produtoIndex', $query->getIndex()); $collection = Search::getInstance()->findByQuery($query); $this->assertInstanceOf('\\Gpupo\\Search\\Result\\Collection', $collection); $this->assertGreaterThan(2, $collection->getTotal()); $this->assertGreaterThan(2, $collection->getTotalFound()); $this->assertInternalType('integer', $collection->getTotal()); $this->assertInternalType('integer', $collection->getTotalFound()); return $query; }