/** * @test * @group websitesservice */ public function should_throw_url_not_valid_on_update() { $this->setExpectedException('Bakgat\\Notos\\Domain\\Model\\Location\\Exceptions\\URLNotValidException'); $id = 1; $data = ['name' => 'VBS De Klimtoren', 'url' => 'foo@']; $website = $this->getKlimtorenWebsite(); $this->websitesRepo->shouldReceive('websiteOfId')->with($id)->andReturn($website); $this->websitesService->update($id, $data); }
public function update($id, Request $request) { $data = $request->all(); $website = $this->websitesService->update($id, $data); return $this->jsonResponse($website); }