Warn when classes are used in testing environment; this means tests aren't efficient.

This commit is contained in:
James Cole
2018-09-06 12:29:32 +02:00
parent 013c8707ac
commit 03956af88a
44 changed files with 410 additions and 22 deletions

View File

@@ -27,6 +27,7 @@ use FireflyIII\Models\Budget;
use FireflyIII\Models\BudgetLimit;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use Illuminate\Support\Collection;
use Log;
/**
* Class BudgetReportHelper.
@@ -46,6 +47,11 @@ class BudgetReportHelper implements BudgetReportHelperInterface
public function __construct(BudgetRepositoryInterface $repository)
{
$this->repository = $repository;
if ('testing' === env('APP_ENV')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
}
}
/**