mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix test method names.
This commit is contained in:
@@ -92,27 +92,6 @@ class ChartJsGeneratorTest extends TestCase
|
||||
$this->assertEquals('#123456', $result['datasets'][1]['backgroundColor']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Generator\Chart\Basic\ChartJsGenerator
|
||||
*/
|
||||
public function testPieChart(): void
|
||||
{
|
||||
|
||||
$data = [
|
||||
'one' => -1,
|
||||
'two' => -2,
|
||||
'three' => -3,
|
||||
];
|
||||
|
||||
/** @var ChartJsGenerator $generator */
|
||||
$generator = new ChartJsGenerator();
|
||||
$result = $generator->pieChart($data);
|
||||
|
||||
$this->assertEquals('three', $result['labels'][0]);
|
||||
$this->assertEquals(3.0, $result['datasets'][0]['data'][0]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Generator\Chart\Basic\ChartJsGenerator
|
||||
*/
|
||||
@@ -120,9 +99,9 @@ class ChartJsGeneratorTest extends TestCase
|
||||
{
|
||||
|
||||
$data = [
|
||||
'one' => ['amount' => -1,'currency_symbol' => 'a'],
|
||||
'two' => ['amount' => -2,'currency_symbol' => 'b'],
|
||||
'three' => ['amount' => -3,'currency_symbol' => 'c'],
|
||||
'one' => ['amount' => -1, 'currency_symbol' => 'a'],
|
||||
'two' => ['amount' => -2, 'currency_symbol' => 'b'],
|
||||
'three' => ['amount' => -3, 'currency_symbol' => 'c'],
|
||||
];
|
||||
|
||||
/** @var ChartJsGenerator $generator */
|
||||
@@ -141,9 +120,9 @@ class ChartJsGeneratorTest extends TestCase
|
||||
{
|
||||
|
||||
$data = [
|
||||
'one' => ['amount' => 1,'currency_symbol' => 'a'],
|
||||
'two' => ['amount' => 2,'currency_symbol' => 'b'],
|
||||
'three' => ['amount' => 3,'currency_symbol' => 'c'],
|
||||
'one' => ['amount' => 1, 'currency_symbol' => 'a'],
|
||||
'two' => ['amount' => 2, 'currency_symbol' => 'b'],
|
||||
'three' => ['amount' => 3, 'currency_symbol' => 'c'],
|
||||
];
|
||||
|
||||
/** @var ChartJsGenerator $generator */
|
||||
@@ -155,6 +134,27 @@ class ChartJsGeneratorTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Generator\Chart\Basic\ChartJsGenerator
|
||||
*/
|
||||
public function testPieChart(): void
|
||||
{
|
||||
|
||||
$data = [
|
||||
'one' => -1,
|
||||
'two' => -2,
|
||||
'three' => -3,
|
||||
];
|
||||
|
||||
/** @var ChartJsGenerator $generator */
|
||||
$generator = new ChartJsGenerator();
|
||||
$result = $generator->pieChart($data);
|
||||
|
||||
$this->assertEquals('three', $result['labels'][0]);
|
||||
$this->assertEquals(3.0, $result['datasets'][0]['data'][0]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Generator\Chart\Basic\ChartJsGenerator
|
||||
*/
|
||||
|
Reference in New Issue
Block a user