public function RngEventMetaTest::testRegistrantsMinimumNoField in RNG - Events and Registrations 8
Tests minimum registrants is unlimited if there is no field value.
Including no default field value on the entity level.
@covers ::getRegistrantsMinimum
File
- tests/
src/ Kernel/ RngEventMetaTest.php, line 62
Class
- RngEventMetaTest
- Tests the event meta class.
Namespace
Drupal\Tests\rng\KernelCode
public function testRegistrantsMinimumNoField() {
$field = FieldConfig::loadByName('entity_test', 'entity_test', EventManagerInterface::FIELD_REGISTRATION_REGISTRANTS_MINIMUM);
$field
->delete();
$event = EntityTest::create();
$event_meta = $this->eventManager
->getMeta($event);
$this
->assertSame(1, $event_meta
->getRegistrantsMinimum(), 'Minimum registrants is "1" when no field exists.');
}