Update class for mapping type constants

This commit is contained in:
Thibaud Fabre
2016-10-19 10:12:55 +02:00
parent 6e88b97c55
commit 299b24d4fb
19 changed files with 162 additions and 146 deletions

View File

@@ -2,6 +2,7 @@
namespace Alchemy\Tests\Phrasea\SearchEngine\Search;
use Alchemy\Phrasea\SearchEngine\Elastic\FieldMapping;
use Alchemy\Phrasea\SearchEngine\Elastic\Mapping;
use Alchemy\Phrasea\SearchEngine\Elastic\Search\QueryContext;
use Alchemy\Phrasea\SearchEngine\Elastic\Structure\Field;
@@ -24,8 +25,8 @@ class QueryContextTest extends \PHPUnit_Framework_TestCase
public function testGetUnrestrictedFields()
{
$foo_field = new Field('foo', Mapping::TYPE_STRING, ['private' => false]);
$bar_field = new Field('bar', Mapping::TYPE_STRING, ['private' => false]);
$foo_field = new Field('foo', FieldMapping::TYPE_STRING, ['private' => false]);
$bar_field = new Field('bar', FieldMapping::TYPE_STRING, ['private' => false]);
$structure = $this->prophesize(Structure::class);
$structure->getUnrestrictedFields()->willReturn([
'foo' => $foo_field,
@@ -41,8 +42,8 @@ class QueryContextTest extends \PHPUnit_Framework_TestCase
public function testGetPrivateFields()
{
$foo_field = new Field('foo', Mapping::TYPE_STRING, ['private' => true]);
$bar_field = new Field('bar', Mapping::TYPE_STRING, ['private' => true]);
$foo_field = new Field('foo', FieldMapping::TYPE_STRING, ['private' => true]);
$bar_field = new Field('bar', FieldMapping::TYPE_STRING, ['private' => true]);
$structure = $this->prophesize(Structure::class);
$structure->getPrivateFields()->willReturn([
'foo' => $foo_field,