Ejemplo n.º 1
0
 /**
  * targetId 의 수
  *
  * @param string $targetId targetId
  * @return int
  * @deprecated
  */
 public function count($targetId)
 {
     $wheres = ['targetId' => $targetId, 'counterName' => $this->name];
     return $this->repo->count($wheres);
 }
Ejemplo n.º 2
0
 /**
  * test get count
  *
  * @return void
  */
 public function testCount()
 {
     $conn = $this->conn;
     $query = $this->query;
     $repo = new Repository($conn);
     $query->shouldReceive('wheres')->andReturn($query);
     $query->shouldReceive('count')->andReturn(0);
     $result = $repo->count([]);
     $this->assertEquals(0, $result);
 }