More tests

This commit is contained in:
James Cole
2015-04-07 17:51:22 +02:00
parent 192db4bb6e
commit 1932bf277a
9 changed files with 282 additions and 78 deletions

View File

@@ -86,6 +86,16 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
return $part;
}
/**
* @param PiggyBank $piggyBank
*
* @return Collection
*/
public function getEventSummarySet(PiggyBank $piggyBank)
{
return DB::table('piggy_bank_events')->where('piggy_bank_id', $piggyBank->id)->groupBy('date')->get(['date', DB::Raw('SUM(`amount`) AS `sum`')]);
}
/**
* Set all piggy banks to order 0.
*

View File

@@ -35,6 +35,13 @@ interface PiggyBankRepositoryInterface
*/
public function createPiggyBankPart(array $data);
/**
* @param PiggyBank $piggyBank
*
* @return Collection
*/
public function getEventSummarySet(PiggyBank $piggyBank);
/**
* Set all piggy banks to order 0.
*