/**
* @internal
*
* @covers \Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait
*/
#[Package('core')]
class EntityCustomFieldsTraitTest extends TestCase
{ public function testGetCustomFieldValues(): void
{ $entity =
new MyTraitEntity('id',
['foo' => 'bar', 'bar' => 'foo', 'baz' => 'baz'
]);
static::
assertSame(['foo' => 'bar'
],
$entity->
getCustomFieldsValues('foo'
));
static::
assertEquals([],
$entity->
getCustomFieldsValues('not-exists'
));
static::
assertSame(['foo' => 'bar', 'bar' => 'foo'
],
$entity->
getCustomFieldsValues('foo', 'bar'
));
} public function testGetCustomFieldValue(): void
{ $entity =
new MyTraitEntity('id',
['foo' => 'bar', 'bar' => 'foo', 'baz' => 'baz'
]);