Clean up some tests

This commit is contained in:
James Cole
2019-09-04 21:05:50 +02:00
parent f9f1fa0fcb
commit 5623c3c43f
17 changed files with 320 additions and 699 deletions

View File

@@ -29,6 +29,7 @@ use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType;
use FireflyIII\User;
use Illuminate\Support\Collection;
use Log;
/**
*
@@ -39,6 +40,17 @@ class OperationsRepository implements OperationsRepositoryInterface
/** @var User */
private $user;
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(__METHOD__);
}
}
/**
* This method returns a list of all the withdrawal transaction journals (as arrays) set in that period
* which have the specified accounts. It's grouped per currency, with as few details in the array

View File

@@ -49,6 +49,7 @@ class BudgetRepository implements BudgetRepositoryInterface
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(get_class($this));
}
}

View File

@@ -46,6 +46,7 @@ class CategoryRepository implements CategoryRepositoryInterface
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(__METHOD__);
}
}

View File

@@ -47,6 +47,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(__METHOD__);
}
}

View File

@@ -47,6 +47,7 @@ class OperationsRepository implements OperationsRepositoryInterface
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(__METHOD__);
}
}

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Repositories\Tag;
use Carbon\Carbon;
use Log;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\TransactionType;
@@ -39,6 +40,17 @@ class OperationsRepository implements OperationsRepositoryInterface
/** @var User */
private $user;
/**
* Constructor.
*/
public function __construct()
{
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', get_class($this)));
die(__METHOD__);
}
}
/**
* This method returns a list of all the withdrawal transaction journals (as arrays) set in that period
* which have the specified tag(s) set to them. It's grouped per currency, with as few details in the array