protected function OgDeleteOrphansTest::assertUserMembershipCount in Organic groups 8
Checks the number of user memberships.
Parameters
int $expected: The expected number of user memberships.
1 call to OgDeleteOrphansTest::assertUserMembershipCount()
- OgDeleteOrphansTest::testDeleteOrphans in tests/
src/ Kernel/ OgDeleteOrphansTest.php - Tests that orphaned group content is deleted when the group is deleted.
File
- tests/
src/ Kernel/ OgDeleteOrphansTest.php, line 257
Class
- OgDeleteOrphansTest
- Tests deletion of orphaned group content and memberships.
Namespace
Drupal\Tests\og\KernelCode
protected function assertUserMembershipCount($expected) {
$count = \Drupal::entityQuery('og_membership')
->count()
->execute();
$this
->assertEquals($expected, $count);
}