public function GroupContentStorageTest::testLoadByEntity in Group 8
Same name and namespace in other branches
- 2.0.x tests/src/Kernel/GroupContentStorageTest.php \Drupal\Tests\group\Kernel\GroupContentStorageTest::testLoadByEntity()
Tests the loading of GroupContent entities for an entity.
@covers ::loadByEntity
File
- tests/
src/ Kernel/ GroupContentStorageTest.php, line 196
Class
- GroupContentStorageTest
- Tests the behavior of group content storage handler.
Namespace
Drupal\Tests\group\KernelCode
public function testLoadByEntity() {
$this
->createGroup();
$account = $this
->getCurrentUser();
$this
->assertCount(1, $this->storage
->loadByEntity($account), 'Managed to load the group creator membership by user.');
}