mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Warn when classes are used in testing environment; this means tests aren't efficient.
This commit is contained in:
@@ -23,12 +23,22 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Generator\Chart\Basic;
|
||||
|
||||
use FireflyIII\Support\ChartColour;
|
||||
|
||||
use Log;
|
||||
/**
|
||||
* Class ChartJsGenerator.
|
||||
*/
|
||||
class ChartJsGenerator implements GeneratorInterface
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if ('testing' === env('APP_ENV')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Will generate a Chart JS compatible array from the given input. Expects this format.
|
||||
*
|
||||
|
Reference in New Issue
Block a user