public function EntityReferenceSupportedNewEntitiesConstraintValidatorTest::testNewEntitiesAllowedInDefaultWorkspace in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php \Drupal\Tests\workspaces\Kernel\EntityReferenceSupportedNewEntitiesConstraintValidatorTest::testNewEntitiesAllowedInDefaultWorkspace()
@covers ::validate
File
- core/
modules/ workspaces/ tests/ src/ Kernel/ EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php, line 52
Class
- EntityReferenceSupportedNewEntitiesConstraintValidatorTest
- @coversDefaultClass \Drupal\workspaces\Plugin\Validation\Constraint\EntityReferenceSupportedNewEntitiesConstraintValidator @group workspaces
Namespace
Drupal\Tests\workspaces\KernelCode
public function testNewEntitiesAllowedInDefaultWorkspace() {
$entity = EntityTestMulRevPub::create([
'unsupported_reference' => [
'entity' => EntityTest::create([]),
],
'supported_reference' => [
'entity' => EntityTest::create([]),
],
]);
$this
->assertCount(0, $entity
->validate());
}