Same name in other branches
- 8.x-1.x tests/src/Functional/EntityCloneShortcutSetTest.php \Drupal\Tests\entity_clone\Functional\EntityCloneShortcutSetTest::testShortcutSetEntityClone()
Test shortcut set entity clone.
File
-
tests/
src/ Functional/ EntityCloneShortcutSetTest.php, line 62
Class
- EntityCloneShortcutSetTest
- Create a shortcut set and test a clone.
Namespace
Drupal\Tests\entity_clone\FunctionalCode
public function testShortcutSetEntityClone() {
$edit = [
'id' => 'test_shortcut_set_cloned',
'label' => 'Test shortcut set cloned',
];
$this->drupalGet('entity_clone/shortcut_set/default');
$this->submitForm($edit, $this->t('Clone'));
$shortcut_sets = \Drupal::entityTypeManager()->getStorage('shortcut_set')
->loadByProperties([
'id' => $edit['id'],
]);
$shortcut_set = reset($shortcut_sets);
$this->assertInstanceOf(ShortcutSet::class, $shortcut_set, 'Test default shortcut set cloned found in database.');
}