public function RngEventSettingsTest::testEventSettingsTabs in RNG - Events and Registrations 3.x
Same name and namespace in other branches
- 8.2 src/Tests/RngEventSettingsTest.php \Drupal\rng\Tests\RngEventSettingsTest::testEventSettingsTabs()
- 8 src/Tests/RngEventSettingsTest.php \Drupal\rng\Tests\RngEventSettingsTest::testEventSettingsTabs()
Tests canonical event page, and the Event default local task.
Throws
\Drupal\Core\Entity\EntityMalformedException
File
- src/
Tests/ RngEventSettingsTest.php, line 81
Class
- RngEventSettingsTest
- Tests event settings page.
Namespace
Drupal\rng\TestsCode
public function testEventSettingsTabs() {
$account = $this
->drupalCreateUser([
'edit own ' . $this->event_bundle
->id() . ' content',
]);
$this
->drupalLogin($account);
$event = $this
->createEntity($this->event_bundle);
// Local task appears on canonical route.
$base_url = 'node/1';
$this
->drupalGet($event
->toUrl());
$this
->assertLinkByHref($base_url . '/event');
// Event settings form.
$this
->drupalGet('node/1/event');
$this
->assertLink('Settings');
$this
->assertLinkByHref($base_url . '/event/access');
$this
->assertLinkByHref($base_url . '/event/messages');
$this
->assertLinkByHref($base_url . '/event/groups');
}