public function RngEventMetaTest::testRegistrantsMaximumNoField in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/RngEventMetaTest.php \Drupal\Tests\rng\Kernel\RngEventMetaTest::testRegistrantsMaximumNoField()
- 3.x tests/src/Kernel/RngEventMetaTest.php \Drupal\Tests\rng\Kernel\RngEventMetaTest::testRegistrantsMaximumNoField()
Tests maximum registrants is unlimited if there is no field value.
Including no default field value on the entity level.
@covers ::getRegistrantsMaximum
File
- tests/
src/ Kernel/ RngEventMetaTest.php, line 118
Class
- RngEventMetaTest
- Tests the event meta class.
Namespace
Drupal\Tests\rng\KernelCode
public function testRegistrantsMaximumNoField() {
$field = FieldConfig::loadByName('entity_test', 'entity_test', EventManagerInterface::FIELD_REGISTRATION_REGISTRANTS_MAXIMUM);
$field
->delete();
$event = EntityTest::create();
$event_meta = $this->eventManager
->getMeta($event);
$this
->assertSame($this->unlimited, $event_meta
->getRegistrantsMaximum(), 'Maximum registrants is unlimited when no field exists.');
}