Beispiel #1
0
 public function ofUrl(Request $request)
 {
     $url = new URL($request->get('url'));
     $website = $this->websitesService->checkURL($url);
     if ($website) {
         return $this->jsonResponse($website);
     }
 }
Beispiel #2
0
 /**
  * @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);
 }