self::
assertColumns($schema, 'ce_blog_comment_translation',
['ce_blog_comment_id', 'language_id', 'created_at', 'updated_at', 'title', 'content'
]);
self::
assertColumns($schema, 'custom_entity_blog_products',
['custom_entity_blog_id', 'product_id', 'product_version_id'
]);
self::
assertColumns($schema, 'product',
['customEntityBlogInheritedProducts', 'customEntityBlogInheritedTopSeller'
]);
self::
assertColumns($schema, 'category',
['custom_entity_blog_links_restrict_id', 'custom_entity_blog_links_set_null_id'
]);
} private function testEventSystem(IdsCollection
$ids, ContainerInterface
$container): void
{ /** @var EntityRepository $blogRepository */
$blogRepository =
$container->
get('custom_entity_blog.repository'
);
$blogRepository->
create([self::
blog('blog-4',
$ids)], Context::
createDefaultContext());
$event =
$blogRepository->
delete([['id' =>
$ids->
get('blog-4'
)]], Context::
createDefaultContext());
static::
assertSame(EntityWrittenContainerEvent::
class,
$event::
class);
static::
assertCount(1,
$event->
getPrimaryKeys('custom_entity_blog'
));
static::
assertContains($ids->
get('blog-4'
),
$event->
getPrimaryKeys('custom_entity_blog'
));
$cascade =
$event->
getPrimaryKeys('custom_entity_blog_products'
);
static::
assertCount(2,
$cascade);
$cascade =
$event->
getPrimaryKeys('ce_blog_comment'
);