Skip to content

Commit a44e258

Browse files
committed
TASK: Adjust tests as needed
This brings the needed test adjustments over from #149.
1 parent b0bf906 commit a44e258

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

Tests/Functional/Eel/ElasticSearchQueryTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function filterByNodeType()
140140
->log($this->getLogMessagePrefix(__METHOD__))
141141
->nodeType('TYPO3.Neos.NodeTypes:Page')
142142
->count();
143-
$this->assertEquals(3, $resultCount);
143+
$this->assertEquals(4, $resultCount);
144144
}
145145

146146
/**
@@ -166,7 +166,7 @@ public function limitDoesNotImpactCount()
166166
->limit(1);
167167

168168
$resultCount = $query->count();
169-
$this->assertEquals(3, $resultCount, 'Asserting the count query returns the total count.');
169+
$this->assertEquals(4, $resultCount, 'Asserting the count query returns the total count.');
170170
}
171171

172172
/**
@@ -198,7 +198,7 @@ public function fieldBasedAggregations()
198198

199199
$this->assertArrayHasKey($aggregationTitle, $result);
200200

201-
$this->assertCount(2, $result[$aggregationTitle]['buckets']);
201+
$this->assertCount(3, $result[$aggregationTitle]['buckets']);
202202

203203
$expectedChickenBucket = [
204204
'key' => 'chicken',
@@ -268,13 +268,13 @@ public function nodesWillBeSortedDesc()
268268
/** @var QueryResultInterface $result $node */
269269

270270
$this->assertInstanceOf(QueryResultInterface::class, $result);
271-
$this->assertCount(3, $result, 'The result should have 3 items');
272-
$this->assertEquals(3, $result->count(), 'Count should be 3');
271+
$this->assertCount(4, $result, 'The result should have 3 items');
272+
$this->assertEquals(4, $result->count(), 'Count should be 3');
273273

274274
$node = $result->getFirst();
275275

276276
$this->assertInstanceOf(NodeInterface::class, $node);
277-
$this->assertEquals('egg', $node->getProperty('title'), 'Asserting a desc sort order by property title');
277+
$this->assertEquals('welcome', $node->getProperty('title'), 'Asserting a desc sort order by property title');
278278
}
279279

280280
/**

Tests/Unit/Eel/ElasticSearchQueryBuilderTest.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,19 @@ public function basicRequestStructureTakesContextNodeIntoAccount()
111111
'bool' => [
112112
'must' => [
113113
0 => [
114-
'term' => [
115-
'__parentPath' => '/foo/bar'
114+
'bool' => [
115+
'should' => [
116+
0 => [
117+
'term' => [
118+
'__parentPath' => '/foo/bar'
119+
]
120+
],
121+
1 => [
122+
'term' => [
123+
'__path' => '/foo/bar'
124+
]
125+
]
126+
]
116127
]
117128
],
118129
1 => [

0 commit comments

Comments
 (0)