public function testEvitaContagemPorAtributosDuplicada() { $countableAttributes = ['categoria', 'fornecedor', 'tamanho', 'categoria', 'fornecedor', 'categoria']; $keywords = new Keywords(); $keywords->addKeyword('shampoo'); $query = new Query(); $query->setKeyword($keywords); $query->setCountableAttributes($countableAttributes); $this->assertEquals(3, count($query->getCountableAttributes())); $firstQuery = current($query->getQueries()); $this->assertArrayHasKey('countableAttributes', $firstQuery); $this->assertEquals(3, count($firstQuery['countableAttributes'])); }