mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 08:00:19 +00:00
Update tests.
This commit is contained in:
41
tests/Unit/Helpers/MetaPieChartTest.php
Normal file
41
tests/Unit/Helpers/MetaPieChartTest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* MetaPieChartTest.php
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Unit\Helpers;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Chart\MetaPieChart;
|
||||
use Tests\TestCase;
|
||||
|
||||
class MetaPieChartTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \FireflyIII\Helpers\Chart\MetaPieChart::__construct
|
||||
* @covers \FireflyIII\Helpers\Chart\MetaPieChart::generate
|
||||
* @covers \FireflyIII\Helpers\Chart\MetaPieChart::getTransactions
|
||||
* @covers \FireflyIII\Helpers\Chart\MetaPieChart::groupByFields
|
||||
* @covers \FireflyIII\Helpers\Chart\MetaPieChart::organizeByType
|
||||
*/
|
||||
public function testGenerateIncomeAccount()
|
||||
{
|
||||
$som = (new Carbon())->startOfMonth();
|
||||
$eom = (new Carbon())->endOfMonth();
|
||||
|
||||
$helper = new MetaPieChart();
|
||||
$helper->setUser($this->user());
|
||||
$helper->setStart($som);
|
||||
$helper->setEnd($eom);
|
||||
$chart = $helper->generate('income', 'account');
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user