/**
  * @depends testRestGetComment
  * @param $comment_id
  */
 public function testRestRemoveComment($comment_id)
 {
     $comment = \App\Services\CommentManager\Models\Comment::find($comment_id);
     $this->assertNotNull($comment);
     $comment->delete();
 }
 /**
  * Возвращает количество комментариев
  * @return int
  */
 public function getCommentsCount()
 {
     return 0;
     return \App\Services\CommentManager\Models\Comment::where('target_id', '=', $this->id)->where('target_type', '=', \App\Services\CommentManager\Models\Comment::TARGET_TYPE_PRODUCT_IN_PURCHASE)->count();
 }
 /**
  * Выводит количество комментариев для определенного объекта
  * @param $target_id
  * @param $target_type
  * @return mixed
  */
 public function getCommentsCountForTarget($target_id, $target_type)
 {
     return Comment::where('target_id', '=', $target_id)->where('target_type', '=', $target_type)->count();
 }