public function RngRegistrationEntityTest::testSaveRegistrationWithoutEvent in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/RngRegistrationEntityTest.php \Drupal\Tests\rng\Kernel\RngRegistrationEntityTest::testSaveRegistrationWithoutEvent()
- 8 tests/src/Kernel/RngRegistrationEntityTest.php \Drupal\Tests\rng\Kernel\RngRegistrationEntityTest::testSaveRegistrationWithoutEvent()
Test creating a registration without event entity throws exception.
File
- tests/
src/ Kernel/ RngRegistrationEntityTest.php, line 65
Class
- RngRegistrationEntityTest
- Tests registration entities.
Namespace
Drupal\Tests\rng\KernelCode
public function testSaveRegistrationWithoutEvent() {
$this
->setExpectedException(EntityStorageException::class);
$registration = Registration::create([
'type' => $this->registrationType
->id(),
]);
$registration
->save();
}