You are here

public function ApachesolrProximityUnitTestCase::addExpected in Apache Solr Term Proximity 7

Same name and namespace in other branches
  1. 6.3 apachesolr_proximity.test \ApachesolrProximityUnitTestCase::addExpected()

Adds a keyword to the expected parse array.

Parameters

string $keyword: The expected keyword.

strign $type: The expected type, either "term" or "phrase".

Return value

ApachesolrProximityUnitTestCase An instance of this class.

2 calls to ApachesolrProximityUnitTestCase::addExpected()
ApachesolrProximityUnitTestCase::testParseMultipleTermQuery in ./apachesolr_proximity.test
Tests parsing a simple query with two terms.
ApachesolrProximityUnitTestCase::testParsePhraseQuery in ./apachesolr_proximity.test
Tests parsing a phrase from a search query.

File

./apachesolr_proximity.test, line 62
Contains ApachesolrProximityUnitTestCase.

Class

ApachesolrProximityUnitTestCase
Test cases for the Apache Solr Term Proximity API functions.

Code

public function addExpected($keyword, $type) {
  $this->_expected[] = array(
    'keyword' => $keyword,
    'type' => $type,
  );
  return $this;
}