public function testSingleWordSearchLoading() { $this->adapter->setQuery('helm && fahrrad && bekleidung && schuhe'); $singleWordSearchItems = $this->adapter->getSingleWordSearch(); $this->assertEquals(4, count($singleWordSearchItems)); $this->assertInstanceOf("FACTFinder\\Data\\SingleWordSearchItem", $singleWordSearchItems[0]); $this->assertEquals('helm', $singleWordSearchItems[0]->getLabel()); $this->assertEquals('1350', $singleWordSearchItems[0]->getHitCount()); $this->assertEquals('/index.php?searchField=%2A&productsPerPage=10&keywords=helm', $singleWordSearchItems[0]->getUrl()); $previewRecords = $singleWordSearchItems[0]->getPreviewRecords(); $this->assertEquals(2, count($previewRecords)); $this->assertInstanceOf("FACTFinder\\Data\\Record", $previewRecords[0]); $this->assertEquals(19451, $previewRecords[0]->getId()); $this->assertEquals(96.97, $previewRecords[0]->getSimilarity()); $this->assertEquals(1, $previewRecords[0]->getPosition()); $this->assertEquals('1', $previewRecords[0]->getField('__ORIG_POSITION__')); }
public function testNoArticleNumberSearchStatus() { $articleNumberSearchStatusEnum = FF::getClassName('Data\\ArticleNumberSearchStatus'); $this->assertEquals($articleNumberSearchStatusEnum::IsNoArticleNumberSearch(), $this->adapter->getArticleNumberStatus()); }
public function testError() { $this->adapter->setQuery('error'); $this->assertEquals('500', $this->adapter->getError()); $this->assertEquals('stacktrace', $this->adapter->getStackTrace()); }