/**
  * @test update
  */
 public function testUpdateTelefone()
 {
     $telefone = $this->makeTelefone();
     $fakeTelefone = $this->fakeTelefoneData();
     $updatedTelefone = $this->telefoneRepo->update($fakeTelefone, $telefone->id);
     $this->assertModelData($fakeTelefone, $updatedTelefone->toArray());
     $dbTelefone = $this->telefoneRepo->find($telefone->id);
     $this->assertModelData($fakeTelefone, $dbTelefone->toArray());
 }
 /**
  * @param int $id
  * @return Response
  *
  * @SWG\Delete(
  *      path="/telefones/{id}",
  *      summary="Remove the specified Telefone from storage",
  *      tags={"Telefone"},
  *      description="Delete Telefone",
  *      produces={"application/json"},
  *      @SWG\Parameter(
  *          name="id",
  *          description="id of Telefone",
  *          type="integer",
  *          required=true,
  *          in="path"
  *      ),
  *      @SWG\Response(
  *          response=200,
  *          description="successful operation",
  *          @SWG\Schema(
  *              type="object",
  *              @SWG\Property(
  *                  property="success",
  *                  type="boolean"
  *              ),
  *              @SWG\Property(
  *                  property="data",
  *                  type="string"
  *              ),
  *              @SWG\Property(
  *                  property="message",
  *                  type="string"
  *              )
  *          )
  *      )
  * )
  */
 public function destroy($id)
 {
     /** @var Telefone $telefone */
     $telefone = $this->telefoneRepository->find($id);
     if (empty($telefone)) {
         return Response::json(ResponseUtil::makeError('Telefone not found'), 404);
     }
     $telefone->delete();
     return $this->sendResponse($id, 'Telefone deleted successfully');
 }