<commit_before><?php

namespace Elastica\Test\Query;

use Elastica\Document;
use Elastica\Query\MatchAll;
use Elastica\Search;
use Elastica\Test\Base as BaseTest;

class MatchAllTest extends BaseTest
{
    public function testToArray()
    {
        $query = new MatchAll();

        $expectedArray = array('match_all' => new \stdClass());

        $this->assertEquals($expectedArray, $query->toArray());
    }

    public function testMatchAllIndicesTypes()
    {
        $index1 = $this->_createIndex('test1');
        $index2 = $this->_createIndex('test2');

        $client = $index1->getClient();

        $search1 = new Search($client);
        $resultSet1 = $search1->search(new MatchAll());

        $doc = new Document(1, array('name' => 'ruflin'));
        $index1->getType('test')->addDocument($doc);
        $index2->getType('test')->addDocument($doc);

        $index1->refresh();
        $index2->refresh();

        $search2 = new Search($client);
        $resultSet2 = $search2->search(new MatchAll());

        $this->assertEquals($resultSet1->getTotalHits() + 2, $resultSet2->getTotalHits());
    }
}
<commit_msg>Fixed failing Query\MatchAllTest<commit_after><?php

namespace Elastica\Test\Query;

use Elastica\Document;
use Elastica\Query\MatchAll;
use Elastica\Search;
use Elastica\Test\Base as BaseTest;

class MatchAllTest extends BaseTest
{
    public function testToArray()
    {
        $query = new MatchAll();

        $expectedArray = array('match_all' => new \stdClass());

        $this->assertEquals($expectedArray, $query->toArray());
    }

    public function testMatchAllIndicesTypes()
    {
        $index1 = $this->_createIndex('test1');
        $index2 = $this->_createIndex('test2');

        $client = $index1->getClient();

        $search1 = new Search($client);
        $resultSet1 = $search1->search(new MatchAll());

        $doc1 = new Document(1, array('name' => 'ruflin'));
        $doc2 = new Document(1, array('name' => 'ruflin'));
        $index1->getType('test')->addDocument($doc1);
        $index2->getType('test')->addDocument($doc2);

        $index1->refresh();
        $index2->refresh();

        $search2 = new Search($client);
        $resultSet2 = $search2->search(new MatchAll());

        $this->assertEquals($resultSet1->getTotalHits() + 2, $resultSet2->getTotalHits());
    }
}

{'fraction_non_alphanumeric': 0.16680887372013653, 'fraction_numerical': 0.01834470989761092, 'mean_word_length': 3.1949910554561716, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '816350', 'n_tokens_mistral': 733, 'n_tokens_neox': 720, 'n_words': 131}