Code Duplication    Length = 14-14 lines in 2 locations

tests/TranslatableUnitTest.php 1 location

@@ 190-203 (lines=14) @@
187
188
189
	// if this is not set to unbounded, zero, a conditional is triggered to add max doc freq to the request
190
	public function testSimilarChangeMaxDocFreq() {
191
		$fp = $this->objFromFixture('FlickrPhotoTO', 'photo0076');
192
		$es = new ElasticSearcher();
193
		$es->setMaxDocFreq(4);
194
		$es->setClasses('FlickrPhotoTO');
195
		$fields = array('Title.standard' => 1, 'Description.standard' => 1);
196
		$paginated = $es->moreLikeThis($fp, $fields, true);
197
		foreach ($paginated->getList() as $result) {
198
			echo $result->ID. ' : '.$result->Title."\n";
199
		}
200
		$this->assertEquals(14, $paginated->getTotalItems());
201
		$results = $paginated->getList()->toArray();
202
		$this->makeCode($paginated);
203
	}
204
205
206
	public function testSimilarNullFields() {

tests/ElasticSearcherUnitTest.php 1 location

@@ 151-164 (lines=14) @@
148
149
150
	// if this is not set to unbounded, zero, a conditional is triggered to add max doc freq to the request
151
	public function testSimilarChangeMaxDocFreq() {
152
		$fp = $this->objFromFixture('FlickrPhotoTO', 'photo0076');
153
		$es = new ElasticSearcher();
154
		$es->setMaxDocFreq(4);
155
		$es->setClasses('FlickrPhotoTO');
156
		$fields = array('Title.standard' => 1, 'Description.standard' => 1);
157
		$paginated = $es->moreLikeThis($fp, $fields, true);
158
		foreach ($paginated->getList() as $result) {
159
			echo $result->ID. ' : '.$result->Title."\n";
160
		}
161
		$this->assertEquals(14, $paginated->getTotalItems());
162
		$results = $paginated->getList()->toArray();
163
		$this->makeCode($paginated);
164
	}
165
166
167
	public function testSimilarNullFields() {