public function GroupContentStorageTest::testCreateWithBundle in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/GroupContentStorageTest.php \Drupal\Tests\group\Kernel\GroupContentStorageTest::testCreateWithBundle()
Tests the creation of a GroupContent entity using a bundle.
@covers ::createForEntityInGroup
File
- tests/
src/ Kernel/ GroupContentStorageTest.php, line 138
Class
- GroupContentStorageTest
- Tests the behavior of group content storage handler.
Namespace
Drupal\Tests\group\KernelCode
public function testCreateWithBundle() {
$group = $this
->createGroup();
$subgroup = $this
->createGroup();
$group_content = $this->storage
->createForEntityInGroup($subgroup, $group, 'group_as_content');
$this
->assertInstanceOf('\\Drupal\\group\\Entity\\GroupContentInterface', $group_content, 'Created a GroupContent entity using a bundle-specific plugin.');
}