public function testAddGroupWithSpecialChar() { $this->request->method('getParam')->with('groupid')->willReturn('Iñtërnâtiônàlizætiøn'); $this->groupManager->method('groupExists')->with('Iñtërnâtiônàlizætiøn')->willReturn(false); $this->groupManager->expects($this->once())->method('createGroup')->with('Iñtërnâtiônàlizætiøn'); $result = $this->api->addGroup([]); $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertTrue($result->succeeded()); }
public function testAddGroup() { $group = $this->getUniqueId(); $_POST = ['groupid' => $group]; $result = $this->api->addGroup([]); $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertTrue($result->succeeded()); $this->assertTrue($this->groupManager->groupExists($group)); $this->groupManager->get($group)->delete(); }