Code Duplication    Length = 7-7 lines in 2 locations

tests/QueryGeneratorTest.php 2 locations

@@ 575-581 (lines=7) @@
572
573
574
	// ---- tests for field array to elasticsearch syntax
575
	public function testConvertWeightedFieldsForElasticaUnaryStrings() {
576
		$qg = new QueryGenerator();
577
		$qg->setClasses('FlickrPhotoTO');
578
		$fields = array('Title' => 1, 'Description' => 1);
579
		$expected = array('Title', 'Title.*','Description', 'Description.*');
580
		$this->assertEquals($expected, $qg->convertWeightedFieldsForElastica($fields));
581
	}
582
583
584
	public function testConvertWeightedFieldsForElasticaMultipleStrings() {
@@ 584-590 (lines=7) @@
581
	}
582
583
584
	public function testConvertWeightedFieldsForElasticaMultipleStrings() {
585
		$qg = new QueryGenerator();
586
		$qg->setClasses('FlickrPhotoTO');
587
		$fields = array('Title' => 2, 'Description' => 1);
588
		$expected = array('Title^2', 'Title.*^2','Description', 'Description.*');
589
		$this->assertEquals($expected, $qg->convertWeightedFieldsForElastica($fields));
590
	}
591
592
593
	public function testConvertWeightedFieldsForElasticaTestNonString() {