mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixed tests.
This commit is contained in:
@@ -41,10 +41,17 @@ class ChartJsBudgetChartGeneratorTest extends TestCase
|
||||
*/
|
||||
public function testBudget()
|
||||
{
|
||||
$preference = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$preference->data = 'en';
|
||||
$preference->save();
|
||||
|
||||
// mock language preference:
|
||||
Preferences::shouldReceive('get')->withArgs(['language', 'en'])->andReturn($preference);
|
||||
|
||||
// make a collection with some amounts in them.
|
||||
$collection = new Collection;
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$collection->push([null, 100]);
|
||||
$collection->push([new Carbon, 100]);
|
||||
}
|
||||
|
||||
$data = $this->object->budget($collection);
|
||||
|
@@ -42,10 +42,19 @@ class ChartJsCategoryChartGeneratorTest extends TestCase
|
||||
*/
|
||||
public function testAll()
|
||||
{
|
||||
|
||||
$preference = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||
$preference->data = 'en';
|
||||
$preference->save();
|
||||
|
||||
// mock language preference:
|
||||
Preferences::shouldReceive('get')->withArgs(['language', 'en'])->andReturn($preference);
|
||||
|
||||
|
||||
// make a collection of stuff:
|
||||
$collection = new Collection;
|
||||
for ($i = 0; $i < 5; $i++) {
|
||||
$collection->push([null, 100]);
|
||||
$collection->push([new Carbon, 100]);
|
||||
}
|
||||
|
||||
$data = $this->object->all($collection);
|
||||
|
Reference in New Issue
Block a user