protected function RevisionUiAccessTest::countDefaultLanguageRevisions in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/RevisionUiAccessTest.php \Drupal\Tests\group\Kernel\RevisionUiAccessTest::countDefaultLanguageRevisions()
Counts the number of revisions in the default language.
Parameters
\Drupal\group\Entity\GroupInterface $group: The group.
Return value
int The number of revisions in the default language.
File
- tests/
src/ Kernel/ RevisionUiAccessTest.php, line 794
Class
- RevisionUiAccessTest
- Tests the revision UI access for groups.
Namespace
Drupal\Tests\group\KernelCode
protected function countDefaultLanguageRevisions(GroupInterface $group) {
return (int) $this->entityTypeManager
->getStorage('group')
->getQuery()
->allRevisions()
->condition('id', $group
->id())
->condition('default_langcode', 1)
->count()
->execute();
}