At one point SearchIndexFieldDefinition was updated to require the engine to be passed in, but it seems that update was missed here. BackupDumper::loadPlugin() requires the second argument, set it to the empty string to keep current behaviour. Change-Id: Ifbd8fc4870ff63b2d338f8bb4d251d7a3477b989
30 lines
564 B
PHP
30 lines
564 B
PHP
<?php
|
|
|
|
/**
|
|
* Dummy implementation of SearchIndexFieldDefinition for testing purposes.
|
|
*
|
|
* @since 1.28
|
|
*/
|
|
class DummySearchIndexFieldDefinition extends SearchIndexFieldDefinition {
|
|
|
|
/**
|
|
* @param SearchEngine $engine
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getMapping( SearchEngine $engine ) {
|
|
$mapping = [
|
|
'name' => $this->name,
|
|
'type' => $this->type,
|
|
'flags' => $this->flags,
|
|
'subfields' => []
|
|
];
|
|
|
|
foreach ( $this->subfields as $subfield ) {
|
|
$mapping['subfields'][] = $subfield->getMapping( $engine );
|
|
}
|
|
|
|
return $mapping;
|
|
}
|
|
|
|
}
|