Update test coverage.

This commit is contained in:
James Cole
2018-08-25 20:45:42 +02:00
parent 2099da7142
commit c55b80f467
21 changed files with 169 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -26,6 +26,8 @@ use Illuminate\Support\Collection;
/**
* Class Balance.
*
* @codeCoverageIgnore
*/
class Balance
{

View File

@@ -26,6 +26,8 @@ use FireflyIII\Models\Account as AccountModel;
/**
* Class BalanceEntry.
*
* @codeCoverageIgnore
*/
class BalanceEntry
{

View File

@@ -27,6 +27,8 @@ use Illuminate\Support\Collection;
/**
* Class BalanceHeader.
*
* @codeCoverageIgnore
*/
class BalanceHeader
{

View File

@@ -29,6 +29,8 @@ use Illuminate\Support\Collection;
/**
* Class BalanceLine.
*
* @codeCoverageIgnore
*/
class BalanceLine
{

View File

@@ -29,6 +29,8 @@ use Log;
/**
* Class Bill.
*
* @codeCoverageIgnore
*/
class Bill
{

View File

@@ -27,6 +27,8 @@ use FireflyIII\Models\Bill as BillModel;
/**
* Class BillLine.
*
* @codeCoverageIgnore
*/
class BillLine
{

View File

@@ -27,6 +27,8 @@ use Illuminate\Support\Collection;
/**
* Class Category.
*
* @codeCoverageIgnore
*/
class Category
{

View File

@@ -52,6 +52,8 @@ use Log;
/**
* Class TransactionCollector
*
* @codeCoverageIgnore
*/
class TransactionCollector implements TransactionCollectorInterface
{

View File

@@ -31,6 +31,7 @@ use Illuminate\Support\Collection;
/**
* Class CountAttachmentsFilter
* @codeCoverageIgnore
*/
class CountAttachmentsFilter implements FilterInterface
{

View File

@@ -26,6 +26,8 @@ use Illuminate\Support\Collection;
/**
* Class EmptyFilter.
*
* @codeCoverageIgnore
*/
class EmptyFilter implements FilterInterface
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;
/**
* Class SplitIndicatorFilter
*
* @codeCoverageIgnore
*/
class SplitIndicatorFilter implements FilterInterface
{

View File

@@ -35,6 +35,8 @@ use Log;
*
* This is used in the mass-edit routine.
*
* @codeCoverageIgnore
*
*/
class TransactionViewFilter implements FilterInterface
{

View File

@@ -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
{