mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Wrote tests for Limit Controller
This commit is contained in:
		| @@ -14,6 +14,13 @@ class EloquentLimitRepository implements LimitRepositoryInterface | ||||
| { | ||||
|  | ||||
|  | ||||
|     public function destroy(\Limit $limit) | ||||
|     { | ||||
|         $limit->delete(); | ||||
|  | ||||
|         return true; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param $limitId | ||||
|      * | ||||
| @@ -27,6 +34,21 @@ class EloquentLimitRepository implements LimitRepositoryInterface | ||||
|             ->where('components.user_id', \Auth::user()->id)->first(['limits.*']); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param \Budget $budget | ||||
|      * @param Carbon  $start | ||||
|      * @param Carbon  $end | ||||
|      * | ||||
|      * @return mixed | ||||
|      */ | ||||
|     public function getTJByBudgetAndDateRange(\Budget $budget, Carbon $start, Carbon $end) | ||||
|     { | ||||
|         $result = $budget->transactionjournals()->with('transactions')->after($start)->before($end)->get(); | ||||
|  | ||||
|         return $result; | ||||
|  | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param $data | ||||
|      * | ||||
| @@ -94,19 +116,4 @@ class EloquentLimitRepository implements LimitRepositoryInterface | ||||
|         return $limit; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @param \Budget $budget | ||||
|      * @param Carbon  $start | ||||
|      * @param Carbon  $end | ||||
|      * | ||||
|      * @return mixed | ||||
|      */ | ||||
|     public function getTJByBudgetAndDateRange(\Budget $budget, Carbon $start, Carbon $end) | ||||
|     { | ||||
|         $result = $budget->transactionjournals()->with('transactions')->after($start)->before($end)->get(); | ||||
|  | ||||
|         return $result; | ||||
|  | ||||
|     } | ||||
|  | ||||
| }  | ||||
		Reference in New Issue
	
	Block a user