mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Update class for mapping type constants
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user