public function RngRegistrantRouteTest::testRegistrantDeleteRoute in RNG - Events and Registrations 8.2
Same name and namespace in other branches
- 8 src/Tests/RngRegistrantRouteTest.php \Drupal\rng\Tests\RngRegistrantRouteTest::testRegistrantDeleteRoute()
- 3.x src/Tests/RngRegistrantRouteTest.php \Drupal\rng\Tests\RngRegistrantRouteTest::testRegistrantDeleteRoute()
Test access registrant delete form.
File
- src/
Tests/ RngRegistrantRouteTest.php, line 177
Class
- RngRegistrantRouteTest
- Tests registrant routes.
Namespace
Drupal\rng\TestsCode
public function testRegistrantDeleteRoute() {
$admin = $this
->drupalCreateUser([
'administer rng',
]);
$this
->drupalLogin($admin);
$this
->drupalGet(Url::fromRoute('entity.registrant.delete_form', [
'registrant' => $this->registrant
->id(),
]));
$this
->assertResponse(200);
$this
->assertText(t('Are you sure you want to delete this registrant?'));
// Breadcrumb.
$this
->assertLink(t('Home'));
$this
->assertLink($this->registrant
->getRegistration()
->getEvent()
->label());
$this
->assertLink($this->registrant
->getRegistration()
->label());
$this
->assertLink($this->registrant
->label());
}