public function GroupSubscribeFormatterTest::testBlockedMember in Organic groups 8
Tests the formatter for a blocked member.
File
- tests/
src/ Unit/ GroupSubscribeFormatterTest.php, line 319
Class
- GroupSubscribeFormatterTest
- Tests the OG group formatter.
Namespace
Drupal\Tests\og\UnitCode
public function testBlockedMember() {
$this->group
->getOwnerId()
->willReturn(rand(100, 200));
$this->membershipManager
->isMember($this->group
->reveal(), $this->user
->reveal()
->id(), [
OgMembershipInterface::STATE_BLOCKED,
])
->willReturn(TRUE);
$elements = $this
->getElements();
$this
->assertTrue(empty($elements[0]));
}