Пример #1
0
 public function testDeleteGroup()
 {
     $group = $this->groupManager->createGroup($this->getUniqueId());
     $result = $this->api->deleteGroup(['groupid' => $group->getGID()]);
     $this->assertInstanceOf('OC_OCS_Result', $result);
     $this->assertTrue($result->succeeded());
     $this->assertFalse($this->groupManager->groupExists($group->getGID()));
 }
Пример #2
0
 public function testDeleteGroup()
 {
     $this->groupManager->method('groupExists')->with('ExistingGroup')->willReturn('true');
     $group = $this->createGroup('ExistingGroup');
     $this->groupManager->method('get')->with('ExistingGroup')->willReturn($group);
     $group->expects($this->once())->method('delete')->willReturn(true);
     $result = $this->api->deleteGroup(['groupid' => 'ExistingGroup']);
     $this->assertInstanceOf('OC_OCS_Result', $result);
     $this->assertTrue($result->succeeded());
 }