public function editProject() { try { $buddy = new Buddy(['accessToken' => 'yourAccessToken']); $project = new Project(); $project->setName('new name'); $project->setDisplayName('new display name'); $resp = $buddy->getApiProjects()->editProject($project, 'domain', 'projectName'); var_dump($resp); exit; } catch (BuddyResponseException $e) { echo $e->getMessage(); exit; } catch (BuddySDKException $e) { echo $e->getMessage(); exit; } }
public function testEditProjectWithoutName() { sleep(2); $project = Utils::addProject(); $editProject = new Project(); $editProject->setDisplayName(Utils::randomString()); $savedProject = Utils::getBuddy()->getApiProjects()->editProject($editProject, Utils::getWorkspaceDomain(), $project->getName()); $this->assertEquals($project->getName(), $savedProject->getName()); $this->assertEquals($editProject->getDisplayName(), $savedProject->getDisplayName()); }