mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Improve test coverage for API.
This commit is contained in:
@@ -33,11 +33,8 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
/**
|
||||
* Class AttachmentTransformer
|
||||
*/
|
||||
class AttachmentTransformer extends TransformerAbstract
|
||||
class AttachmentTransformer extends AbstractTransformer
|
||||
{
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
/** @var AttachmentRepositoryInterface */
|
||||
private $repository;
|
||||
|
||||
@@ -45,12 +42,9 @@ class AttachmentTransformer extends TransformerAbstract
|
||||
* BillTransformer constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param ParameterBag $parameters
|
||||
*/
|
||||
public function __construct(ParameterBag $parameters)
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
$this->repository = app(AttachmentRepositoryInterface::class);
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
|
@@ -32,21 +32,15 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
/**
|
||||
* Class AvailableBudgetTransformer
|
||||
*/
|
||||
class AvailableBudgetTransformer extends TransformerAbstract
|
||||
class AvailableBudgetTransformer extends AbstractTransformer
|
||||
{
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
/**
|
||||
* CurrencyTransformer constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param ParameterBag $parameters
|
||||
*/
|
||||
public function __construct(ParameterBag $parameters)
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
}
|
||||
|
@@ -37,11 +37,8 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
/**
|
||||
* Class BillTransformer
|
||||
*/
|
||||
class BillTransformer extends TransformerAbstract
|
||||
class BillTransformer extends AbstractTransformer
|
||||
{
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
/** @var BillRepositoryInterface */
|
||||
private $repository;
|
||||
|
||||
@@ -49,12 +46,9 @@ class BillTransformer extends TransformerAbstract
|
||||
* BillTransformer constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param ParameterBag $parameters
|
||||
*/
|
||||
public function __construct(ParameterBag $parameters)
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
$this->repository = app(BillRepositoryInterface::class);
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
|
@@ -31,21 +31,15 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
/**
|
||||
* Class BudgetLimitTransformer
|
||||
*/
|
||||
class BudgetLimitTransformer extends TransformerAbstract
|
||||
class BudgetLimitTransformer extends AbstractTransformer
|
||||
{
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
/**
|
||||
* CurrencyTransformer constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param ParameterBag $parameters
|
||||
*/
|
||||
public function __construct(ParameterBag $parameters)
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
}
|
||||
|
@@ -27,28 +27,20 @@ namespace FireflyIII\Transformers;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
use Log;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
* Class BudgetTransformer
|
||||
*/
|
||||
class BudgetTransformer extends TransformerAbstract
|
||||
class BudgetTransformer extends AbstractTransformer
|
||||
{
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
/**
|
||||
* BudgetTransformer constructor.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param ParameterBag $parameters
|
||||
*/
|
||||
public function __construct(ParameterBag $parameters)
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user