mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-08 02:38:09 +00:00
Update test coverage.
This commit is contained in:
@@ -144,9 +144,11 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
{
|
||||
$resource = tmpfile();
|
||||
if (false === $resource) {
|
||||
// @codeCoverageIgnoreStart
|
||||
Log::error('Cannot create temp-file for file upload.');
|
||||
|
||||
return false;
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
$path = stream_get_meta_data($resource)['uri'];
|
||||
fwrite($resource, $content);
|
||||
@@ -341,9 +343,12 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
if (!$this->validMime($file)) {
|
||||
$result = false;
|
||||
}
|
||||
// @codeCoverageIgnoreStart
|
||||
// can't seem to reach this point.
|
||||
if (true === $result && !$this->validSize($file)) {
|
||||
$result = false;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
if (true === $result && $this->hasFile($file, $model)) {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class Balance.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Balance
|
||||
{
|
||||
|
||||
@@ -26,6 +26,8 @@ use FireflyIII\Models\Account as AccountModel;
|
||||
|
||||
/**
|
||||
* Class BalanceEntry.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class BalanceEntry
|
||||
{
|
||||
|
||||
@@ -27,6 +27,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class BalanceHeader.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class BalanceHeader
|
||||
{
|
||||
|
||||
@@ -29,6 +29,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class BalanceLine.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class BalanceLine
|
||||
{
|
||||
|
||||
@@ -29,6 +29,8 @@ use Log;
|
||||
|
||||
/**
|
||||
* Class Bill.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Bill
|
||||
{
|
||||
|
||||
@@ -27,6 +27,8 @@ use FireflyIII\Models\Bill as BillModel;
|
||||
|
||||
/**
|
||||
* Class BillLine.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class BillLine
|
||||
{
|
||||
|
||||
@@ -27,6 +27,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class Category.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Category
|
||||
{
|
||||
|
||||
@@ -52,6 +52,8 @@ use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionCollector
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class TransactionCollector implements TransactionCollectorInterface
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class CountAttachmentsFilter
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class CountAttachmentsFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -26,6 +26,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class EmptyFilter.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class EmptyFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -32,6 +32,8 @@ use Log;
|
||||
* This filter removes any filters that are from A to B or from B to A given a set of
|
||||
* account id's (in $parameters) where A and B are mentioned. So transfers between the mentioned
|
||||
* accounts will be removed.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class InternalTransferFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ use Log;
|
||||
* Class NegativeAmountFilter.
|
||||
*
|
||||
* This filter removes entries with a negative amount (the original modifier is -1).
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class NegativeAmountFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -31,6 +31,8 @@ use Log;
|
||||
*
|
||||
* This filter is similar to the internal transfer filter but only removes transactions when the opposing account is
|
||||
* amongst $parameters (list of account ID's).
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class OpposingAccountFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@ use Log;
|
||||
*
|
||||
* This filter removes transactions with either a positive amount ($parameters = 1) or a negative amount
|
||||
* ($parameter = -1). This is helpful when a Collection has you with both transactions in a journal.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class PositiveAmountFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class SplitIndicatorFilter
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class SplitIndicatorFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -35,6 +35,8 @@ use Log;
|
||||
*
|
||||
* This is used in the mass-edit routine.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
*/
|
||||
class TransactionViewFilter implements FilterInterface
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;
|
||||
* Class TransferFilter.
|
||||
*
|
||||
* This filter removes any transfers that are in the collection twice (from A to B and from B to A).
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class TransferFilter implements FilterInterface
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user