public function ConfigurableFieldManagerTest::testInvalidDefinition in Commerce Core 8.2
Tests passing an invalid field definition.
File
- tests/
src/ Kernel/ ConfigurableFieldManagerTest.php, line 92
Class
- ConfigurableFieldManagerTest
- Tests the ConfigurableFieldManager class.
Namespace
Drupal\Tests\commerce\KernelCode
public function testInvalidDefinition() {
$field_definition = BundleFieldDefinition::create('entity_reference');
$field_definition
->setName('stores');
$this
->expectException(\InvalidArgumentException::class);
$this->configurableFieldManager
->createField($field_definition);
}