Example #1
0
	public function testSetMinimum() {
		$key = 'name';
		$terms = array('nicolas', 'ruflin');
		$minimum = 2;

		$query = new Elastica_Query_Terms($key, $terms);
		$query->setMinimumMatch($minimum);

		$data = $query->toArray();
		$this->assertEquals($minimum, $data['terms']['minimum_match']);
	}