function ProfileCrudTest::testProfileDelete in Linkit 8.4
Delete a profile.
File
- src/
Tests/ ProfileCrudTest.php, line 112 - Contains \Drupal\linkit\Tests\ProfileCreationTest.
Class
- ProfileCrudTest
- Tests creating, loading and deleting profiles.
Namespace
Drupal\linkit\TestsCode
function testProfileDelete() {
/** @var \Drupal\linkit\ProfileInterface $profile */
$profile = $this
->createProfile();
$this
->drupalGet(Url::fromRoute('entity.linkit_profile.delete_form', [
'linkit_profile' => $profile
->id(),
]));
$this
->drupalPostForm(NULL, [], t('Delete'));
$this
->assertRaw(t('The linkit profile %label has been deleted.', [
'%label' => $profile
->label(),
]));
$this
->drupalGet(Url::fromRoute('entity.linkit_profile.collection'));
$this
->assertNoText($profile
->label(), 'Deleted profile does not exists in the profile collection.');
}