EntityNoUuidDeletion.php in Entity Share 8.3
File
modules/entity_share_client/tests/src/Kernel/EntityNoUuidDeletion.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\entity_share_client\Kernel;
use Drupal\entity_test\Entity\EntityTestNoUuid;
use Drupal\KernelTests\Core\Entity\EntityKernelTestBase;
class EntityNoUuidDeletion extends EntityKernelTestBase {
public static $modules = [
'entity_test',
'serialization',
'jsonapi',
'entity_share',
'entity_share_client',
];
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('entity_test_no_uuid');
$this
->installEntitySchema('entity_import_status');
}
public function testEntityDeletion() {
$entity = EntityTestNoUuid::create([
'name' => 'Test deletion',
]);
$entity
->save();
$entity
->delete();
$this
->assertTrue(TRUE, 'If we can reach this assert, it means that it is possible to delete the entity without UUID.');
}
}