/** * @param Model $Model * * @return Model * @throws \DockerCloud\Exception */ public function update(Model $Model) { return new Model($this->getClient()->request('PATCH', $this->getAPINameSpace() . $Model->getUuid() . '/', ['body' => \Zend\Json\Json::encode(['target_num_nodes' => $Model->getTargetNumNodes(), 'tags' => $Model->getTags()])])); }
/** * @param Model $Model * * @depends testCreate */ public function testUpdate(Model $Model) { $this->mockResponse(200, $this->getMockData()); $API = new API(); $Model->setTags(['unit-test-update']); $Model = $API->update($Model); $this->assertInstanceOf(Model::class, $Model); }