You are here

public function GroupContentStorageTest::testCreateWithoutBundle in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/GroupContentStorageTest.php \Drupal\Tests\group\Kernel\GroupContentStorageTest::testCreateWithoutBundle()

Tests the creation of a GroupContent entity using no bundle.

@covers ::createForEntityInGroup

File

tests/src/Kernel/GroupContentStorageTest.php, line 150

Class

GroupContentStorageTest
Tests the behavior of group content storage handler.

Namespace

Drupal\Tests\group\Kernel

Code

public function testCreateWithoutBundle() {
  $group = $this
    ->createGroup();
  $account = $this
    ->createUser();
  $group_content = $this->storage
    ->createForEntityInGroup($account, $group, 'user_as_content');
  $this
    ->assertInstanceOf('\\Drupal\\group\\Entity\\GroupContentInterface', $group_content, 'Created a GroupContent entity using a bundle-independent plugin.');
}