コード例 #1
0
ファイル: WebsitesServiceTest.php プロジェクト: bakgat/notos
 /**
  * @test
  * @group websitesservice
  */
 public function should_throw_err_when_website_of_id_not_found()
 {
     $this->setExpectedException('Bakgat\\Notos\\Domain\\Model\\Location\\Exceptions\\WebsiteNotFoundException');
     $id = 999999;
     $this->websitesRepo->shouldReceive('websiteOfId')->with($id)->andReturnNull();
     $result = $this->websitesService->websiteOfId($id);
 }
コード例 #2
0
ファイル: WebsitesController.php プロジェクト: bakgat/notos
 public function edit($id)
 {
     return $this->jsonResponse($this->websitesService->websiteOfId($id), ['detail']);
 }