VuFind API Documentation

ExplanationTest extends TestCase
in package
Uses ConfigPluginManagerTrait

Unit tests for Explanation.

Tags
category

VuFind

author

Dennis Schrittenlocher Dennis.Schrittenlocher@outlook.de

author

Thomas Wagener wagener@hebis.uni-frankfurt.de

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Site

Table of Contents

$testResponse  : string
Solr 9 example response
$testResponse2  : string
Second Solr 9 example response
$testResponse3  : string
Third Solr 9 example response
testBoost()  : void
Test boost
testCoord()  : void
Test coord
testEscapingBrackets()  : void
Test escaping brackets
testExplainParams()  : void
Test basic Explanation attributes
testExplanationArray()  : void
Test the explanation array
testMaxFields()  : void
Test rest length with maxFields
testMinPercent()  : void
Test rest length with minPercent
testNoBoost()  : void
Test without boost
testNoExplainOther()  : void
Test when explainOther ins empty (recordId is not in Solr index)
testNoMatchingClause()  : void
Test when explainOther has no matching clause
getExplanation()  : Explanation
Creates an Explanation object with all the required mocks.
getMockConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager with the given configuration "files" available.
getMockFailingConfigPluginManager()  : MockObject|PluginManager
Get a mock configuration plugin manager that will throw an exception.

Properties

$testResponse

Solr 9 example response

protected string $testResponse = '200575.50390625 = weight(FunctionScoreQuery(+(fulltext:harri | (allfields_unstemmed:harry)^10.0 | ' . '(author:harry)^300.0 | (title_alt:harri)^200.0 | (title_full:harri)^400.0 | (contents:harri)^10.0 | ' . '(title:harri)^500.0 | long_lat_display:harri | (geographic:harri)^300.0 | (series2:harri)^30.0 | ' . '(title_short:harri)^750.0 | (title_full_unstemmed:harry)^600.0 | (topic:harri)^500.0 | ' . '(title_new:harri)^100.0 | description:harri | (genre:harri)^300.0 | (fulltext_unstemmed:harry)^10.0 | ' . '(series:harri)^50.0 | (ConstantScore(allfields:harri))^0.0 | ' . '(topic_unstemmed:harry)^550.0)~0.4 +((topic_unstemmed:potter)^550.0 | (title:potter)^500.0 | ' . '(title_short:potter)^750.0 | (title_new:potter)^100.0 | (ConstantScore(allfields:potter))^0.0 | ' . '(author:potter)^300.0 | fulltext:potter | long_lat_display:potter | (series:potter)^50.0 | ' . '(allfields_unstemmed:potter)^10.0 | (topic:potter)^500.0 | (contents:potter)^10.0 | ' . '(title_alt:potter)^200.0 | (fulltext_unstemmed:potter)^10.0 | (geographic:potter)^300.0 | ' . 'description:potter | (genre:potter)^300.0 | (title_full_unstemmed:potter)^600.0 | (title_full:potter)^400.0 ' . '| (series2:potter)^30.0)~0.4, scored by boost(const(19)))), result of:' . <<<EXPLANATION 200575.50390625 = product of: 10556.605 = sum of: 4893.0547 = max plus 0.4 times others of: 31.96489 = weight(allfields_unstemmed:harry in 43415) [SchemaSimilarity], result of: 31.96489 = score(freq=1.0), computed as boost * idf * tf from: 10.0 = boost 7.714137 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 298 = n, number of documents containing term 668576 = N, total number of documents with field 0.41436762 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 128.0 = dl, length of field (approximate) 103.474686 = avgdl, average length of field 1107.874 = weight(title_full:harri in 43415) [SchemaSimilarity], result of: 1107.874 = score(freq=1.0), computed as boost * idf * tf from: 400.0 = boost 7.6367993 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 322 = n, number of documents containing term 668573 = N, total number of documents with field 0.36267614 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 20.0 = dl, length of field 12.351774 = avgdl, average length of field 1659.002 = weight(title:harri in 43415) [SchemaSimilarity], result of: 1659.002 = score(freq=1.0), computed as boost * idf * tf from: 500.0 = boost 10.174222 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 25 = n, number of documents containing term 668572 = N, total number of documents with field 0.3261187 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 16.0 = dl, length of field 8.15232 = avgdl, average length of field 3084.0 = weight(title_short:harri in 43415) [SchemaSimilarity], result of: 3084.0 = score(freq=1.0), computed as boost * idf * tf from: 750.0 = boost 10.495121 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 18 = n, number of documents containing term 668566 = N, total number of documents with field 0.39180106 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 7.0 = dl, length of field 5.0306807 = avgdl, average length of field 1723.7961 = weight(title_full_unstemmed:harry in 43415) [SchemaSimilarity], result of: 1723.7961 = score(freq=1.0), computed as boost * idf * tf from: 600.0 = boost 7.9219007 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 242 = n, number of documents containing term 668573 = N, total number of documents with field 0.36266464 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 20.0 = dl, length of field 12.351032 = avgdl, average length of field 0.0 = ConstantScore(allfields:harri)^0.0 5663.5503 = max plus 0.4 times others of: 1775.2554 = weight(title:potter in 43415) [SchemaSimilarity], result of: 1775.2554 = score(freq=1.0), computed as boost * idf * tf from: 500.0 = boost 10.887173 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 12 = n, number of documents containing term 668572 = N, total number of documents with field 0.3261187 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 16.0 = dl, length of field 8.15232 = avgdl, average length of field 3349.3086 = weight(title_short:potter in 43415) [SchemaSimilarity], result of: 3349.3086 = score(freq=1.0), computed as boost * idf * tf from: 750.0 = boost 11.397989 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 7 = n, number of documents containing term 668566 = N, total number of documents with field 0.39180106 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 7.0 = dl, length of field 5.0306807 = avgdl, average length of field 0.0 = ConstantScore(allfields:potter)^0.0 42.497154 = weight(allfields_unstemmed:potter in 43415) [SchemaSimilarity], result of: 42.497154 = score(freq=1.0), computed as boost * idf * tf from: 10.0 = boost 10.255906 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 23 = n, number of documents containing term 668576 = N, total number of documents with field 0.41436762 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 128.0 = dl, length of field (approximate) 103.474686 = avgdl, average length of field 2452.9556 = weight(title_full_unstemmed:potter in 43415) [SchemaSimilarity], result of: 2452.9556 = score(freq=1.0), computed as boost * idf * tf from: 600.0 = boost 11.272836 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 8 = n, number of documents containing term 668573 = N, total number of documents with field 0.36266464 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 20.0 = dl, length of field 12.351032 = avgdl, average length of field 1514.8965 = weight(title_full:potter in 43415) [SchemaSimilarity], result of: 1514.8965 = score(freq=1.0), computed as boost * idf * tf from: 400.0 = boost 10.442488 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 19 = n, number of documents containing term 668573 = N, total number of documents with field 0.36267614 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 20.0 = dl, length of field 12.351774 = avgdl, average length of field 19.0 = const(19) EXPLANATION

$testResponse2

Second Solr 9 example response

protected string $testResponse2 = <<<EXPLANATION 3794.7397 = max of: 3098.3008 = weight(title:darwin in 62810) [SchemaSimilarity], result of: 3098.3008 = score(freq=1.0), computed as boost * idf * tf from: 500.0 = boost 12.160138 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 3 = n, number of documents containing term 668572 = N, total number of documents with field 0.5095832 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 6.0 = dl, length of field 8.15232 = avgdl, average length of field 3.003481 = weight(allfields:darwin in 62810) [SchemaSimilarity], result of: 3.003481 = score(freq=1.0), computed as boost * idf * tf from: 9.12932 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 72 = n, number of documents containing term 668576 = N, total number of documents with field 0.32899284 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 200.0 = dl, length of field (approximate) 103.473274 = avgdl, average length of field 30.270142 = weight(allfields_unstemmed:darwin in 62810) [SchemaSimilarity], result of: 30.270142 = score(freq=1.0), computed as boost * idf * tf from: 10.0 = boost 9.200779 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 67 = n, number of documents containing term 668576 = N, total number of documents with field 0.3289954 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 200.0 = dl, length of field (approximate) 103.474686 = avgdl, average length of field 2529.8735 = weight(title_full:darwin in 62810) [SchemaSimilarity], result of: 2529.8735 = score(freq=1.0), computed as boost * idf * tf from: 400.0 = boost 11.908825 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 4 = n, number of documents containing term 668573 = N, total number of documents with field 0.53109217 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 8.0 = dl, length of field 12.351774 = avgdl, average length of field 3794.7397 = weight(title_full_unstemmed:darwin in 62810) [SchemaSimilarity], result of: 3794.7397 = score(freq=1.0), computed as boost * idf * tf from: 600.0 = boost 11.908825 = idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from: 4 = n, number of documents containing term 668573 = N, total number of documents with field 0.53108233 = tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from: 1.0 = freq, occurrences of term within document 1.2 = k1, term saturation parameter 0.75 = b, length normalization parameter 8.0 = dl, length of field 12.351032 = avgdl, average length of field EXPLANATION

$testResponse3

Third Solr 9 example response

protected string $testResponse3 = '0.598864 = (MATCH) boost(+(((title_lc_word:charls^4.0 | rvk_full:charls^0.5 | kls_lc_word_3:charls^0.5 | ' . '(other:tSarls other:xarls) | test_title_stemm:charl | series_statement:charls^0.01 | ' . '(author:tSarls author:xarls) | (retroocr:tSarls retroocr:xarls) | author_lc_word:charls^5.0 | ' . '(test_title_sound:tSarls test_title_sound:xarls) | topic_lc_word_3:charls^0.6 | kls_3:charls^0.5 | ' . 'shelfmark_word_3:charls | isxn:charls | retroocr_lc_word:charls | ((topic:tSarls topic:xarls)^0.6) | ' . 'id:charls | ((topic_3:tSarls topic_3:xarls)^0.5) | other_lc_word:charls^2.5 | topic_lc_word:charls^0.6 | ' . 'misc:charls^0.01)~0.1 (title_lc_word:darwin^4.0 | rvk_full:darwin^0.5 | kls_lc_word_3:darwin^0.5 | ' . '(other:darvin other:darwin) | test_title_stemm:darwin | series_statement:darwin^0.01 | ' . '(author:darvin author:darwin) | (retroocr:darvin retroocr:darwin) | author_lc_word:darwin^5.0 | ' . '(test_title_sound:darvin test_title_sound:darwin) | topic_lc_word_3:darwin^0.6 | kls_3:darwin^0.5 | ' . 'shelfmark_word_3:darwin | isxn:darwin | retroocr_lc_word:darwin | ((topic:darvin topic:darwin)^0.6) | ' . 'id:darwin | ((topic_3:darvin topic_3:darwin)^0.5) | other_lc_word:darwin^2.5 | topic_lc_word:darwin^0.6 | ' . 'misc:darwin^0.01)~0.1 (title_lc_word:evolution^4.0 | rvk_full:evolution^0.5 | kls_lc_word_3:evolution^0.5 | ' . 'other:evolutjon | test_title_stemm:evolution | series_statement:evolution^0.01 | author:evolutjon | ' . 'retroocr:evolutjon | author_lc_word:evolution^5.0 | test_title_sound:evolutjon | ' . 'topic_lc_word_3:evolution^0.6 | kls_3:evolution^0.5 | shelfmark_word_3:evolution | isxn:evolution | ' . 'retroocr_lc_word:evolution | topic:evolutjon^0.6 | id:evolution | topic_3:evolutjon^0.5 | ' . 'other_lc_word:evolution^2.5 | topic_lc_word:evolution^0.6 | ' . 'misc:evolution^0.01)~0.1 (title_lc_word:theroy^4.0 | rvk_full:theroy^0.5 | kls_lc_word_3:theroy^0.5 | ' . 'other:teroj | test_title_stemm:theroy | series_statement:theroy^0.01 | author:teroj | retroocr:teroj | ' . 'author_lc_word:theroy^5.0 | test_title_sound:teroj | topic_lc_word_3:theroy^0.6 | kls_3:theroy^0.5 | ' . 'shelfmark_word_3:theroy | isxn:theroy | retroocr_lc_word:theroy | topic:teroj^0.6 | id:theroy | ' . 'topic_3:teroj^0.5 | other_lc_word:theroy^2.5 | topic_lc_word:theroy^0.6 | ' . 'misc:theroy^0.01)~0.1 (title_lc_word:species^4.0 | rvk_full:species^0.5 | kls_lc_word_3:species^0.5 | ' . '(other:Spetses other:spetses) | test_title_stemm:speci | series_statement:species^0.01 | ' . '(author:Spetses author:spetses) | (retroocr:Spetses retroocr:spetses) | author_lc_word:species^5.0 | ' . '(test_title_sound:Spetses test_title_sound:spetses) | topic_lc_word_3:species^0.6 | kls_3:species^0.5 | ' . 'shelfmark_word_3:species | isxn:species | retroocr_lc_word:species | ((topic:Spetses topic:spetses)^0.6) | ' . 'id:species | ((topic_3:Spetses topic_3:spetses)^0.5) | other_lc_word:species^2.5 | ' . 'topic_lc_word:species^0.6 | ' . 'misc:species^0.01)~0.1)~4) (title_lc_word:"charls darwin evolution theroy species"~3^3.0 | ' . 'kls_lc_word_3:"charls darwin evolution theroy species"~3)~0.1,product(if(exists(query(id:HEBr*,def=0.0)),' . 'const(0.4),const(1)),sum(product(max(const(0),sum(product(abs(ms(const(1672531200000),date(pub_date_max))),' . 'const(-5.285E-13)),const(1))),const(6.5)),const(1)))), product of:' . <<<EXPLANATION 0.598864 = (MATCH) sum of: 0.598864 = (MATCH) product of: 0.74858004 = (MATCH) sum of: 0.07653126 = (MATCH) max plus 0.1 times others of: 0.07653126 = (MATCH) sum of: 0.04210584 = (MATCH) weight(author:tSarls in 115379) [DefaultSimilarity], result of: 0.04210584 = score(doc=115379,freq=3.0), product of: 0.040880267 = queryWeight, product of: 9.5145445 = idf(docFreq=4085, maxDocs=20375968) 0.004296608 = queryNorm 1.0299796 = fieldWeight in 115379, product of: 1.7320508 = tf(freq=3.0), with freq of: 3.0 = termFreq=3.0 9.5145445 = idf(docFreq=4085, maxDocs=20375968) 0.0625 = fieldNorm(doc=115379) 0.034425426 = (MATCH) weight(author:xarls in 115379) [DefaultSimilarity], result of: 0.034425426 = score(doc=115379,freq=2.0), product of: 0.040907696 = queryWeight, product of: 9.520928 = idf(docFreq=4059, maxDocs=20375968) 0.004296608 = queryNorm 0.8415391 = fieldWeight in 115379, product of: 1.4142135 = tf(freq=2.0), with freq of: 2.0 = termFreq=2.0 9.520928 = idf(docFreq=4059, maxDocs=20375968) 0.0625 = fieldNorm(doc=115379) 0.6704539 = (MATCH) max plus 0.1 times others of: EXPLANATION . ' 0.0017296325 = (MATCH) weight(series_statement:darwin^0.01 in 115379) [DefaultSimilarity], ' . 'result of:' . <<<EXPLANATION 0.0017296325 = score(doc=115379,freq=1.0), product of: 4.8765732E-4 = queryWeight, product of: 0.01 = boost 11.349822 = idf(docFreq=651, maxDocs=20375968) 0.004296608 = queryNorm 3.5468194 = fieldWeight in 115379, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 11.349822 = idf(docFreq=651, maxDocs=20375968) 0.3125 = fieldNorm(doc=115379) 0.24371147 = (MATCH) sum of: 0.14047433 = (MATCH) weight(author:darvin in 115379) [DefaultSimilarity], result of: 0.14047433 = score(doc=115379,freq=26.0), product of: 0.04351891 = queryWeight, product of: 10.128667 = idf(docFreq=2210, maxDocs=20375968) 0.004296608 = queryNorm 3.227892 = fieldWeight in 115379, product of: 5.0990195 = tf(freq=26.0), with freq of: 26.0 = termFreq=26.0 10.128667 = idf(docFreq=2210, maxDocs=20375968) 0.0625 = fieldNorm(doc=115379) 0.10323714 = (MATCH) weight(author:darwin in 115379) [DefaultSimilarity], result of: 0.10323714 = score(doc=115379,freq=14.0), product of: 0.04355207 = queryWeight, product of: 10.136385 = idf(docFreq=2193, maxDocs=20375968) 0.004296608 = queryNorm 2.37043 = fieldWeight in 115379, product of: 3.7416575 = tf(freq=14.0), with freq of: 14.0 = termFreq=14.0 10.136385 = idf(docFreq=2193, maxDocs=20375968) 0.0625 = fieldNorm(doc=115379) 0.64587224 = (MATCH) weight(author_lc_word:darwin^5.0 in 115379) [DefaultSimilarity], result of: 0.64587224 = score(doc=115379,freq=14.0), product of: 0.21786834 = queryWeight, product of: 5.0 = boost 10.141412 = idf(docFreq=2182, maxDocs=20375968) 0.004296608 = queryNorm 2.964507 = fieldWeight in 115379, product of: 3.7416575 = tf(freq=14.0), with freq of: 14.0 = termFreq=14.0 10.141412 = idf(docFreq=2182, maxDocs=20375968) 0.078125 = fieldNorm(doc=115379) 3.753989E-4 = (MATCH) weight(misc:darwin^0.01 in 115379) [DefaultSimilarity], result of: 3.753989E-4 = score(doc=115379,freq=2.0), product of: 3.8208225E-4 = queryWeight, product of: 0.01 = boost 8.892649 = idf(docFreq=7609, maxDocs=20375968) 0.004296608 = queryNorm 0.9825081 = fieldWeight in 115379, product of: 1.4142135 = tf(freq=2.0), with freq of: 2.0 = termFreq=2.0 8.892649 = idf(docFreq=7609, maxDocs=20375968) 0.078125 = fieldNorm(doc=115379) 0.00135112 = (MATCH) max plus 0.1 times others of: EXPLANATION . ' 0.00135112 = (MATCH) weight(series_statement:evolution^0.01 in 115379) [DefaultSimilarity], ' . 'result of:' . <<<EXPLANATION 0.00135112 = score(doc=115379,freq=1.0), product of: 4.3100747E-4 = queryWeight, product of: 0.01 = boost 10.031343 = idf(docFreq=2436, maxDocs=20375968) 0.004296608 = queryNorm 3.1347947 = fieldWeight in 115379, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 10.031343 = idf(docFreq=2436, maxDocs=20375968) 0.3125 = fieldNorm(doc=115379) 2.4372259E-4 = (MATCH) max plus 0.1 times others of: 2.4372259E-4 = (MATCH) weight(misc:species^0.01 in 115379) [DefaultSimilarity], result of: 2.4372259E-4 = score(doc=115379,freq=2.0), product of: 3.0786352E-4 = queryWeight, product of: 0.01 = boost 7.16527 = idf(docFreq=42812, maxDocs=20375968) 0.004296608 = queryNorm 0.7916579 = fieldWeight in 115379, product of: 1.4142135 = tf(freq=2.0), with freq of: 2.0 = termFreq=2.0 7.16527 = idf(docFreq=42812, maxDocs=20375968) 0.078125 = fieldNorm(doc=115379) 0.8 = coord(4/5) EXPLANATION . ' 1.0 = product(if(exists(query(id:HEBr*,def=0.0)=0.0),const(0.4),const(1)),sum(product(max(const(0),' . 'sum(product(abs(ms(const(1672531200000),date(pub_date_max)=1862-01-01T00:00:00Z)),const(-5.285E-13)),' . 'const(1))),const(6.5)),const(1)))'

Methods

testBoost()

Test boost

public testBoost() : void
Return values
void

testCoord()

Test coord

public testCoord() : void
Return values
void

testEscapingBrackets()

Test escaping brackets

public testEscapingBrackets() : void
Return values
void

testExplainParams()

Test basic Explanation attributes

public testExplainParams() : void
Return values
void

testExplanationArray()

Test the explanation array

public testExplanationArray() : void
Return values
void

testMaxFields()

Test rest length with maxFields

public testMaxFields() : void
Return values
void

testMinPercent()

Test rest length with minPercent

public testMinPercent() : void
Return values
void

testNoBoost()

Test without boost

public testNoBoost() : void
Return values
void

testNoExplainOther()

Test when explainOther ins empty (recordId is not in Solr index)

public testNoExplainOther() : void
Return values
void

testNoMatchingClause()

Test when explainOther has no matching clause

public testNoMatchingClause() : void
Return values
void

getExplanation()

Creates an Explanation object with all the required mocks.

protected getExplanation(array<string|int, mixed> $result[, array<string|int, mixed> $config = null ]) : Explanation
Parameters
$result : array<string|int, mixed>

Result of the Solr request

$config : array<string|int, mixed> = null

Optional searches.ini configs

Return values
Explanation

getMockConfigPluginManager()

Get a mock configuration plugin manager with the given configuration "files" available.

protected getMockConfigPluginManager(array<string|int, mixed> $configs[, array<string|int, mixed> $default = [] ][, InvocationOrder|null $getExpect = null ][, InvocationOrder|null $hasExpect = null ]) : MockObject|PluginManager
Parameters
$configs : array<string|int, mixed>

An associative array of configurations where key is the file (e.g. 'config') and value an array of configuration sections and directives

$default : array<string|int, mixed> = []

Default configuration to return when no entry is found in $configs

$getExpect : InvocationOrder|null = null

The expected invocation order for the get() method (null for any)

$hasExpect : InvocationOrder|null = null

The expected invocation order for the has() method (null for any)

Return values
MockObject|PluginManager

getMockFailingConfigPluginManager()

Get a mock configuration plugin manager that will throw an exception.

protected getMockFailingConfigPluginManager(Throwable $exception) : MockObject|PluginManager
Parameters
$exception : Throwable

Exception to throw

Return values
MockObject|PluginManager

Search results