Skip to content

Commit 898a75d

Browse files
committed
[TASK] Fix aggregation tests and improve test coverage
Reduce the configured languages to a single language.
1 parent 3a08af0 commit 898a75d

2 files changed

Lines changed: 6 additions & 10 deletions

File tree

Configuration/Testing/WithoutLanguageFallback/Settings.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ TYPO3:
1111
values: ['en_US']
1212
uriSegment: 'en'
1313
'en_UK': ~
14-
'de':
15-
label: 'German'
16-
values: ['de']
17-
uriSegment: 'de'
14+
'de': ~
1815
'fr': ~
1916
'nl': ~
2017
'dk': ~

Tests/Functional/Eel/ElasticSearchQueryTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function setUp()
7272

7373
$this->nodeTypeManager = $this->objectManager->get('TYPO3\TYPO3CR\Domain\Service\NodeTypeManager');
7474
$this->contextFactory = $this->objectManager->get('TYPO3\TYPO3CR\Domain\Service\ContextFactoryInterface');
75-
$this->context = $this->contextFactory->create(array('workspaceName' => 'live', 'dimensions' => array('language' => array('de'))));
75+
$this->context = $this->contextFactory->create(array('workspaceName' => 'live', 'dimensions' => array('language' => array('en_US'))));
7676

7777
$this->nodeDataRepository = $this->objectManager->get('TYPO3\TYPO3CR\Domain\Repository\NodeDataRepository');
7878
$this->queryBuilder = $this->objectManager->get('Flowpack\ElasticSearch\ContentRepositoryAdaptor\Eel\ElasticSearchQueryBuilder');
@@ -88,7 +88,7 @@ public function tearDown()
8888
{
8989
parent::tearDown();
9090
$this->inject($this->contextFactory, 'contextInstances', array());
91-
// $this->nodeIndexCommandController->cleanupCommand();
91+
$this->nodeIndexCommandController->cleanupCommand();
9292
}
9393

9494
/**
@@ -105,7 +105,7 @@ public function filterByNodeType()
105105
*/
106106
public function filterNodeByProperty()
107107
{
108-
$resultCount = $this->queryBuilder->query($this->context->getRootNode())->exactMatch('title', 'ei')->count();
108+
$resultCount = $this->queryBuilder->query($this->context->getRootNode())->exactMatch('title', 'egg')->count();
109109
$this->assertEquals(1, $resultCount);
110110
}
111111

@@ -177,12 +177,11 @@ protected function createNodesForNodeSearchTest()
177177
$newNode2->setProperty('title', 'chicken');
178178

179179
$newNode3 = $rootNode->createNode('test-node-3', $this->nodeTypeManager->getNodeType('TYPO3.Neos.NodeTypes:Page'));
180-
181180
$newNode3->setProperty('title', 'egg');
182181

183-
$dimensionContext = $this->contextFactory->create(array('workspaceName' => 'live', 'dimensions' => array('language' => array('en_us'))));
182+
$dimensionContext = $this->contextFactory->create(array('workspaceName' => 'live', 'dimensions' => array('language' => array('de'))));
184183
$translatedNode3 = $dimensionContext->adoptNode($newNode3, TRUE);
185-
$translatedNode3->setProperty('title', 'egg');
184+
$translatedNode3->setProperty('title', 'Ei');
186185

187186

188187
$this->persistenceManager->persistAll();

0 commit comments

Comments
 (0)