Fix public API BC break

This commit is contained in:
Mathieu Darse
2015-10-06 11:22:44 +02:00
parent 6c4a1460b5
commit 8a5afb1140
2 changed files with 5 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ namespace Alchemy\Tests\Phrasea\SearchEngine\AST;
use Alchemy\Phrasea\SearchEngine\Elastic\AST\FlagStatement;
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext;
use Alchemy\Phrasea\SearchEngine\Elastic\Structure\Flag;
/**
* @group unit
@@ -24,13 +25,14 @@ class FlagStatementTest extends \PHPUnit_Framework_TestCase
public function testQueryBuild()
{
$query_context = $this->prophesize(QueryContext::class);
$query_context->getFlag('foo')->willReturn(new Flag('bar'));
$node = new FlagStatement('foo', true);
$query = $node->buildQuery($query_context->reveal());
$expected = '{
"term": {
"flags.foo": true
"flags.bar": true
}
}';