I am attempting to put in writing some PHPUnit Kernel checks that use a customized content material kind which appear to work till I attempt to reference fields on Drupal Development Company content material kind. I am guessing Drupal Development Company content material kind is not being imported from config. Is there an accurate approach to do that?
Instance code which works in drush php however doesn’t work in phpunit:
public perform createAction() { $storage = $this->container->get('entity_type.supervisor')->getStorage('node'); $entity = $storage->create(['type' => 'action']); $entity->set('title', 'take a look at'); $entity->set('field_lookup_type', 'deal with'); $entity->save(); return $entity; }
Drupal Development Company error from phpunit is "InvalidArgumentException: Area field_lookup_type is unknown."