public function testDeleteByOriginId()
 {
     list($conn, $query) = $this->getMocks();
     $instance = new ImageRepository($conn);
     $id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     $conn->shouldReceive('table')->andReturn($query);
     $query->shouldReceive('where')->once()->with('originId', $id)->andReturnSelf();
     $query->shouldReceive('delete')->once()->withNoArgs();
     $instance->deleteByOriginId($id);
 }
Пример #2
0
 /**
  * 미디어 삭제
  *
  * @param Media $media media instance
  * @return void
  */
 public function remove(Media $media)
 {
     $this->repo->delete($media->getMeta());
 }