mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-23 23:36:11 +01:00
Merge remote-tracking branch 'origin/master' into support/62
This commit is contained in:
commit
7552b4aba0
6 changed files with 20 additions and 22 deletions
|
@ -98,7 +98,10 @@ class IndexTcaTableTest extends AbstractFunctionalTestCase
|
||||||
*/
|
*/
|
||||||
public function indexingRespectsUserWhereClause()
|
public function indexingRespectsUserWhereClause()
|
||||||
{
|
{
|
||||||
$this->setUpFrontendRootPage(1, ['EXT:search_core/Tests/Functional/Fixtures/Indexing/UserWhereClause.ts']);
|
$this->setUpFrontendRootPage(1, array_merge(
|
||||||
|
parent::getTypoScriptFilesForFrontendRootPage(),
|
||||||
|
['EXT:search_core/Tests/Functional/Fixtures/Indexing/UserWhereClause.ts']
|
||||||
|
));
|
||||||
$this->importDataSet('Tests/Functional/Fixtures/Indexing/UserWhereClause.xml');
|
$this->importDataSet('Tests/Functional/Fixtures/Indexing/UserWhereClause.xml');
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class)
|
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class)
|
||||||
|
|
|
@ -41,15 +41,10 @@ abstract class AbstractDataHandlerTest extends AbstractFunctionalTestCase
|
||||||
|
|
||||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||||
|
|
||||||
$this->subject = $this->getAccessibleMock(
|
$this->subject = $this->getMockBuilder(DataHandlerService::class)
|
||||||
DataHandlerService::class,
|
->setConstructorArgs([$objectManager->get(ConfigurationContainerInterface::class)])
|
||||||
[
|
->setMethods(['add', 'update', 'delete'])
|
||||||
'add',
|
->getMock();
|
||||||
'update',
|
|
||||||
'delete',
|
|
||||||
],
|
|
||||||
[$objectManager->get(ConfigurationContainerInterface::class)]
|
|
||||||
);
|
|
||||||
|
|
||||||
// This way TYPO3 will use our mock instead of a new instance.
|
// This way TYPO3 will use our mock instead of a new instance.
|
||||||
$GLOBALS['T3_VAR']['getUserObj']['&' . DataHandlerHook::class] = new DataHandlerHook($this->subject);
|
$GLOBALS['T3_VAR']['getUserObj']['&' . DataHandlerHook::class] = new DataHandlerHook($this->subject);
|
||||||
|
|
|
@ -37,6 +37,10 @@ class RelationResolverTest extends AbstractFunctionalTestCase
|
||||||
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||||
$table = 'sys_file';
|
$table = 'sys_file';
|
||||||
|
|
||||||
|
// Only by adding the field to showitem, it will be processed by FormEngine.
|
||||||
|
// We use this field to test inline relations, as there is only one alternative.
|
||||||
|
$GLOBALS['TCA']['sys_file']['types'][1]['showitem'] .= ',metadata';
|
||||||
|
|
||||||
$subject = $objectManager->get(TcaTableService::class, $table);
|
$subject = $objectManager->get(TcaTableService::class, $table);
|
||||||
$record = BackendUtility::getRecord($table, 1);
|
$record = BackendUtility::getRecord($table, 1);
|
||||||
$subject->prepareRecord($record);
|
$subject->prepareRecord($record);
|
||||||
|
|
|
@ -44,15 +44,11 @@ class TcaIndexerTest extends AbstractFunctionalTestCase
|
||||||
$objectManager->get(RelationResolver::class),
|
$objectManager->get(RelationResolver::class),
|
||||||
$objectManager->get(ConfigurationContainerInterface::class)
|
$objectManager->get(ConfigurationContainerInterface::class)
|
||||||
);
|
);
|
||||||
$connection = $this->getAccessibleMock(
|
|
||||||
Elasticsearch::class,
|
$connection = $this->getMockBuilder(Elasticsearch::class)
|
||||||
[
|
->setMethods(['addDocuments'])
|
||||||
'addDocuments',
|
->disableOriginalConstructor()
|
||||||
],
|
->getMock();
|
||||||
[],
|
|
||||||
'',
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
$connection->expects($this->once())
|
$connection->expects($this->once())
|
||||||
->method('addDocuments')
|
->method('addDocuments')
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"ruflin/elastica": "~3.2"
|
"ruflin/elastica": "~3.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.8.0"
|
"phpunit/phpunit": "~5.7.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
|
|
|
@ -18,7 +18,7 @@ $EM_CONF[$_EXTKEY] = [
|
||||||
],
|
],
|
||||||
'state' => 'alpha',
|
'state' => 'alpha',
|
||||||
'clearCacheOnLoad' => 1,
|
'clearCacheOnLoad' => 1,
|
||||||
'author' => 'Justus Leon Moroni',
|
'author' => 'Daniel Siepmann',
|
||||||
'author_email' => 'developer@leonmrni.com',
|
'author_email' => 'coding@daniel-siepmann.de',
|
||||||
'version' => '1.0.0',
|
'version' => '1.0.0',
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue