public function RngEventMetaTest::testRegistrantsMaximumNoField in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/RngEventMetaTest.php \Drupal\Tests\rng\Kernel\RngEventMetaTest::testRegistrantsMaximumNoField()
- 8 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 62
Class
- RngEventMetaTest
- Tests the event meta class.
Namespace
Drupal\Tests\rng\KernelCode
public function testRegistrantsMaximumNoField() {
$field = FieldConfig::loadByName('entity_test', 'entity_test', EventManagerInterface::FIELD_REGISTRANTS_CAPACITY);
$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.');
}