diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/AST/TextNodeTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/AST/TextNodeTest.php index b2cde860b1..571cbd93de 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/AST/TextNodeTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/AST/TextNodeTest.php @@ -48,6 +48,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase $query_context->getUnrestrictedFields()->willReturn([$field]); $query_context->getPrivateFields()->willReturn([]); $query_context->localizeField($field)->willReturn(['foo.fr', 'foo.en']); + $query_context->truncationField($field)->willReturn([]); $node = new TextNode('bar', new Context('baz')); $query = $node->buildQuery($query_context->reveal()); @@ -80,12 +81,18 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase $query_context ->localizeField($public_field) ->willReturn(['foo.fr', 'foo.en']); + $query_context + ->truncationField($public_field) + ->willReturn([]); $query_context ->getPrivateFields() ->willReturn([$private_field]); $query_context ->localizeField($private_field) ->willReturn(['private_caption.bar.fr', 'private_caption.bar.en']); + $query_context + ->truncationField($private_field) + ->willReturn([]); $node = new TextNode('baz'); $query = $node->buildQuery($query_context->reveal()); @@ -136,6 +143,7 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase $query_context->getUnrestrictedFields()->willReturn([$field]); $query_context->getPrivateFields()->willReturn([]); $query_context->localizeField($field)->willReturn(['foo.fr', 'foo.en']); + $query_context->truncationField($field)->willReturn([]); $node = new TextNode('bar'); $node->setConcepts([ @@ -180,12 +188,18 @@ class TextNodeTest extends \PHPUnit_Framework_TestCase $query_context ->localizeField($public_field) ->willReturn(['foo.fr', 'foo.en']); + $query_context + ->truncationField($public_field) + ->willReturn([]); $query_context ->getPrivateFields() ->willReturn([$private_field]); $query_context ->localizeField($private_field) ->willReturn(['private_caption.bar.fr', 'private_caption.bar.en']); + $query_context + ->truncationField($private_field) + ->willReturn([]); $node = new TextNode('baz'); $node->setConcepts([ diff --git a/tests/Alchemy/Tests/Phrasea/SearchEngine/Search/QueryContextTest.php b/tests/Alchemy/Tests/Phrasea/SearchEngine/Search/QueryContextTest.php index 268cd917c5..093ee51f3a 100644 --- a/tests/Alchemy/Tests/Phrasea/SearchEngine/Search/QueryContextTest.php +++ b/tests/Alchemy/Tests/Phrasea/SearchEngine/Search/QueryContextTest.php @@ -53,7 +53,7 @@ class QueryContextTest extends \PHPUnit_Framework_TestCase $context = new QueryContext(null, $structure->reveal(), [], 'fr'); $this->assertEquals([$foo_field, $bar_field], $context->getPrivateFields()); - $narrowed_context = new QueryContext($structure->reveal(), [], 'fr', ['foo']); + $narrowed_context = new QueryContext(null, $structure->reveal(), [], 'fr', ['foo']); $this->assertEquals([$foo_field], $narrowed_context->getPrivateFields()); } }