public function CancelButtonEntityRoutesTest::testEntityFormCancelButton in Entity Form Cancel Button 8
Tests that the cancel button loads on entity forms without errors.
File
- tests/
src/ Functional/ CancelButtonEntityRoutesTest.php, line 59
Class
- CancelButtonEntityRoutesTest
- Tests cancel button functionality under various entity route conditions.
Namespace
Drupal\Tests\cancel_button\FunctionalCode
public function testEntityFormCancelButton() {
foreach ($this->entities as $entity) {
$uri = $entity
->toUrl('edit-form');
$this
->drupalGet($uri);
$this
->assertSession()
->statusCodeEquals(200);
$this
->assertSession()
->linkExists('Cancel');
}
}