Ejemplo n.º 1
0
 /**
  * get counts group by options
  *
  * @param string $targetId target id
  * @return array
  * @deprecated
  */
 public function countsByOption($targetId)
 {
     $wheres = ['targetId' => $targetId, 'counterName' => $this->name];
     return $this->repo->countsByOption($wheres);
 }
Ejemplo n.º 2
0
 /**
  * test find
  *
  * @return void
  */
 public function testFind()
 {
     $conn = $this->conn;
     $query = $this->query;
     $repo = new Repository($conn);
     $query->shouldReceive('wheres')->andReturn($query);
     $query->shouldReceive('first')->andReturn(['result']);
     $result = $repo->find([]);
     $this->assertEquals(['result'], $result);
 }