public function testGetEntryGroupIDNoValue() { //tests getEntryGroupID via getGroupPrimaryGroupID //which is basically identical to getUserPrimaryGroupIDs $access = $this->getAccessMock(); $this->enableGroups($access); $dn = 'cn=foobar,cn=foo,dc=barfoo,dc=bar'; $attr = 'primaryGroupToken'; $access->expects($this->once())->method('readAttribute')->with($dn, $attr)->will($this->returnValue(false)); $groupBackend = new GroupLDAP($access); $gid = $groupBackend->getGroupPrimaryGroupID($dn); $this->assertSame(false, $gid); }