title: Array () does not match expected type "object"
body: <p>I am trying to write test cod for function in repository.My repo code is;</p>
  
  <pre><code> public function getcomment($id){
  
      $data = ProductComment::active()
          -&gt;where('productId',$id)
          -&gt;orderBy('date','desc')
          -&gt;simplePaginate(5)-&gt;items();
      return $data;
  }
  </code></pre>
  
  <p>for this I wrote this test code;</p>
  
  <pre><code> public function testgetcomment(){
      /*$Mock = \Mockery::mock(Product::class);
      $Mock-&gt;shouldReceive('getId')
          -&gt;once()
          -&gt;andReturn(true);
      $this-&gt;repo-&gt;getcomment($Mock-&gt;getId());
      $this-&gt;assertTrue(true);*/
  
      $ecpected=ProductComment::where('productId',1)-&gt;get(); 
  
      $actual=$this-&gt;repo-&gt;getcomment(1); 
  
      self::assertEquals($expected,$actual);}
  </code></pre>
  
  <p>I am getting this error;</p>
  
  <p>Array () does not match expected type "object". Can you help me?</p>