use Shopware\Core\System\CustomField\Aggregate\CustomFieldSet\CustomFieldSetEntity;
use Shopware\Core\System\CustomField\CustomFieldCollection;
use Shopware\Core\System\CustomField\CustomFieldEntity;
use Symfony\Component\DependencyInjection\ContainerInterface;
trait CustomFieldTypeTestBehaviour
{ abstract protected static function getContainer(): ContainerInterface;
protected function importCustomField(string
$manifestPath): CustomFieldEntity
{ $manifest = Manifest::
createFromXmlFile($manifestPath);
$context = Context::
createDefaultContext();
$appLifecycle =
$this->
getContainer()->
get(AppLifecycle::
class);
$appLifecycle->
install($manifest, true,
$context);
/** @var EntityRepository $appRepository */
$appRepository =
$this->
getContainer()->
get('app.repository'
);
$criteria =
new Criteria();
$criteria->
addAssociation('customFieldSets.customFields'
);
/** @var AppCollection $apps */