public function EntityCloneShortcutSetTest::testShortcutSetEntityClone in Entity Clone 8
Test shortcut set entity clone.
File
- tests/
src/ Functional/ EntityCloneShortcutSetTest.php, line 57
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
->drupalPostForm('entity_clone/shortcut_set/default', $edit, 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.');
}