Skip to content

Commit c438b12

Browse files
committed
[BUGFIX] Fix broken unit tests
Fix one test broken since the test case exists and another broken with commit 870aeee.
1 parent f943d76 commit c438b12

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

Tests/Unit/Eel/ElasticSearchQueryBuilderTest.php

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,24 @@ public function basicRequestStructureTakesContextNodeIntoAccount() {
6161
)
6262
),
6363
'should' => array (),
64-
'must_not' => array ()
64+
'must_not' => array (
65+
// Filter out all hidden elements
66+
array(
67+
'term' => array('_hidden' => TRUE)
68+
),
69+
// if now < hiddenBeforeDateTime: HIDE
70+
// -> hiddenBeforeDateTime > now
71+
array(
72+
'range' => array('_hiddenBeforeDateTime' => array(
73+
'gt' => 'now'
74+
))
75+
),
76+
array(
77+
'range' => array('_hiddenAfterDateTime' => array(
78+
'lt' => 'now'
79+
))
80+
)
81+
)
6582
)
6683
)
6784
)
@@ -86,8 +103,8 @@ public function queryFilterThrowsExceptionOnInvalidClauseType() {
86103
public function nodeTypeFilterWorks() {
87104
$this->queryBuilder->nodeType('Foo.Bar:Baz');
88105
$expected = array(
89-
'type' => array(
90-
'value' => 'Foo-Bar:Baz'
106+
'term' => array(
107+
'__typeAndSupertypes' => 'Foo.Bar:Baz'
91108
)
92109
);
93110
$actual = $this->queryBuilder->getRequest();

0 commit comments

Comments
 (0)