mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Optimise test code.
This commit is contained in:
parent
162c8af6ca
commit
5d1cfc661f
@ -233,6 +233,9 @@ class AccountController extends Controller
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
*/
|
||||
public function transactions(Request $request, Account $account): JsonResponse
|
||||
{
|
||||
@ -249,8 +252,6 @@ class AccountController extends Controller
|
||||
$types = $this->mapTransactionTypes($this->parameters->get('type'));
|
||||
$manager = new Manager();
|
||||
$baseUrl = $request->getSchemeAndHttpHost() . '/api/v1';
|
||||
|
||||
|
||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||
|
||||
/** @var User $admin */
|
||||
@ -259,18 +260,8 @@ class AccountController extends Controller
|
||||
// use new group collector:
|
||||
/** @var GroupCollectorInterface $collector */
|
||||
$collector = app(GroupCollectorInterface::class);
|
||||
$collector
|
||||
->setUser($admin)
|
||||
// set the account to filter on to the current one:
|
||||
->setAccounts(new Collection([$account]))
|
||||
// all info needed for the API:
|
||||
->withAPIInformation()
|
||||
// set page size:
|
||||
->setLimit($pageSize)
|
||||
// set page to retrieve
|
||||
->setPage($this->parameters->get('page'))
|
||||
// set types of transactions to return.
|
||||
->setTypes($types);
|
||||
$collector->setUser($admin)->setAccounts(new Collection([$account]))
|
||||
->withAPIInformation()->setLimit($pageSize)->setPage($this->parameters->get('page'))->setTypes($types);
|
||||
|
||||
// set range if necessary:
|
||||
if (null !== $this->parameters->get('start') && null !== $this->parameters->get('end')) {
|
||||
|
@ -47,6 +47,8 @@ use League\Fractal\Serializer\JsonApiSerializer;
|
||||
|
||||
/**
|
||||
* Class BillController.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
|
||||
*/
|
||||
class BillController extends Controller
|
||||
{
|
||||
|
@ -64,6 +64,8 @@ class CategoryController extends Controller
|
||||
* @param DateRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* TODO after 4.8.0, simplify
|
||||
*/
|
||||
public function overview(DateRequest $request): JsonResponse
|
||||
{
|
||||
|
@ -98,6 +98,7 @@ class RuleGroupTriggerRequest extends Request
|
||||
Log::debug(sprintf('Searching for asset account with id "%s"', $accountId));
|
||||
$account = $accountRepository->findNull((int)$accountId);
|
||||
if ($this->validAccount($account)) {
|
||||
/** @noinspection NullPointerExceptionInspection */
|
||||
Log::debug(sprintf('Found account #%d ("%s") and its an asset account', $account->id, $account->name));
|
||||
$accounts->push($account);
|
||||
}
|
||||
|
@ -204,8 +204,10 @@ class MigrateToRules extends Command
|
||||
],
|
||||
],
|
||||
'actions' => [
|
||||
'type' => 'link_to_bill',
|
||||
'value' => $bill->name,
|
||||
[
|
||||
'type' => 'link_to_bill',
|
||||
'value' => $bill->name,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -28,6 +28,7 @@ use Exception;
|
||||
|
||||
/**
|
||||
* Class FireflyException.
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class FireflyException extends Exception
|
||||
{
|
||||
|
@ -28,6 +28,7 @@ use Exception;
|
||||
|
||||
/**
|
||||
* Class NotImplementedException.
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class NotImplementedException extends Exception
|
||||
{
|
||||
|
@ -28,6 +28,7 @@ use Exception;
|
||||
|
||||
/**
|
||||
* Class ValidationExceptions.
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class ValidationException extends Exception
|
||||
{
|
||||
|
@ -96,8 +96,8 @@ class AccountControllerTest extends TestCase
|
||||
// mock repositories
|
||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$revenue = $this->getRandomRevenue();
|
||||
$euro = $this->getEuro();
|
||||
$revenue = $this->getRandomRevenue();
|
||||
$euro = $this->getEuro();
|
||||
// mock calls:
|
||||
$repository->shouldReceive('setUser')->atLeast()->once();
|
||||
$currencyRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
|
@ -34,8 +34,8 @@ use Tests\TestCase;
|
||||
class AvailableBudgetControllerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
*
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
@ -62,9 +62,9 @@ class CurrencyControllerTest extends TestCase
|
||||
public function testStore(): void
|
||||
{
|
||||
|
||||
$currency = TransactionCurrency::first();
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$transformer = $this->mock(CurrencyTransformer::class);
|
||||
$currency = TransactionCurrency::first();
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$transformer = $this->mock(CurrencyTransformer::class);
|
||||
$userRepository = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// mock transformer
|
||||
@ -102,9 +102,9 @@ class CurrencyControllerTest extends TestCase
|
||||
*/
|
||||
public function testStoreWithDefault(): void
|
||||
{
|
||||
$currency = TransactionCurrency::first();
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$transformer = $this->mock(CurrencyTransformer::class);
|
||||
$currency = TransactionCurrency::first();
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$transformer = $this->mock(CurrencyTransformer::class);
|
||||
$userRepository = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// mock transformer
|
||||
@ -188,9 +188,9 @@ class CurrencyControllerTest extends TestCase
|
||||
*/
|
||||
public function testUpdateWithDefault(): void
|
||||
{
|
||||
$currency = TransactionCurrency::first();
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$transformer = $this->mock(CurrencyTransformer::class);
|
||||
$currency = TransactionCurrency::first();
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$transformer = $this->mock(CurrencyTransformer::class);
|
||||
$this->mock(UserRepositoryInterface::class);
|
||||
$preference = new Preference;
|
||||
$preference->data = 'EUR';
|
||||
|
@ -180,7 +180,7 @@ class LinkTypeControllerTest extends TestCase
|
||||
public function testUpdateNotEditable(): void
|
||||
{
|
||||
// mock stuff:
|
||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||
$repository = $this->mock(LinkTypeRepositoryInterface::class);
|
||||
$userRepository = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// create editable link type:
|
||||
|
@ -56,7 +56,7 @@ class PreferencesControllerTest extends TestCase
|
||||
*/
|
||||
public function testUpdateArray(): void
|
||||
{
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
// mock calls to transformer:
|
||||
@ -80,7 +80,7 @@ class PreferencesControllerTest extends TestCase
|
||||
*/
|
||||
public function testUpdateBoolean(): void
|
||||
{
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
// mock calls to transformer:
|
||||
@ -105,7 +105,7 @@ class PreferencesControllerTest extends TestCase
|
||||
*/
|
||||
public function testUpdateDefault(): void
|
||||
{
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
// mock calls to transformer:
|
||||
@ -129,7 +129,7 @@ class PreferencesControllerTest extends TestCase
|
||||
*/
|
||||
public function testUpdateInteger(): void
|
||||
{
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$transformer = $this->mock(PreferenceTransformer::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
// mock calls to transformer:
|
||||
|
@ -104,7 +104,7 @@ class DeleteEmptyJournalsTest extends TestCase
|
||||
|
||||
$this->artisan('firefly-iii:delete-empty-journals')
|
||||
->expectsOutput(sprintf('Deleted transaction journal #%d because it had an uneven number of transactions.', $journal->id))
|
||||
->expectsOutput('No empty transaction journals.')
|
||||
->expectsOutput('No empty transaction journals.')
|
||||
->assertExitCode(0);
|
||||
|
||||
// verify both are gone
|
||||
|
@ -50,7 +50,7 @@ class EnableCurrenciesTest extends TestCase
|
||||
$count = TransactionCurrency::where('enabled', 1)->count();
|
||||
|
||||
$this->artisan('firefly-iii:enable-currencies')
|
||||
->expectsOutput('All currencies are correctly enabled or disabled.')
|
||||
->expectsOutput('All currencies are correctly enabled or disabled.')
|
||||
->assertExitCode(0);
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@ class RenameMetaFieldsTest extends TestCase
|
||||
public function testHandle(): void
|
||||
{
|
||||
$this->artisan('firefly-iii:rename-meta-fields')
|
||||
->expectsOutput('All meta fields are correct.')
|
||||
->expectsOutput('All meta fields are correct.')
|
||||
->assertExitCode(0);
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ class RenameMetaFieldsTest extends TestCase
|
||||
);
|
||||
|
||||
$this->artisan('firefly-iii:rename-meta-fields')
|
||||
->expectsOutput('Renamed 1 meta field(s).')
|
||||
->expectsOutput('Renamed 1 meta field(s).')
|
||||
->assertExitCode(0);
|
||||
|
||||
// verify update
|
||||
|
@ -61,7 +61,6 @@ class DecryptDatabaseTest extends TestCase
|
||||
]);
|
||||
|
||||
|
||||
|
||||
FireflyConfig::shouldReceive('get')->withArgs([Mockery::any(), false])->atLeast()->once()->andReturn(null);
|
||||
FireflyConfig::shouldReceive('set')->withArgs([Mockery::any(), true])->atLeast()->once();
|
||||
|
||||
@ -113,9 +112,9 @@ class DecryptDatabaseTest extends TestCase
|
||||
public function testHandleNotEncrypted(): void
|
||||
{
|
||||
// create encrypted account:
|
||||
$name = 'Encrypted name';
|
||||
$iban = 'HR1723600001101234565';
|
||||
$account = Account::create(
|
||||
$name = 'Encrypted name';
|
||||
$iban = 'HR1723600001101234565';
|
||||
$account = Account::create(
|
||||
[
|
||||
'user_id' => 1,
|
||||
'account_type_id' => 1,
|
||||
|
@ -27,6 +27,7 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\TransactionRules\Engine\RuleEngine;
|
||||
use Illuminate\Support\Collection;
|
||||
use Log;
|
||||
@ -59,6 +60,7 @@ class ApplyRulesTest extends TestCase
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$ruleEngine = $this->mock(RuleEngine::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// data
|
||||
$asset = $this->getRandomAsset();
|
||||
@ -69,6 +71,7 @@ class ApplyRulesTest extends TestCase
|
||||
$rules = new Collection([$rule]);
|
||||
|
||||
// expected calls:
|
||||
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||
$ruleRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$ruleGroupRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$accountRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
@ -109,7 +112,7 @@ class ApplyRulesTest extends TestCase
|
||||
*
|
||||
* @covers \FireflyIII\Console\Commands\Tools\ApplyRules
|
||||
*/
|
||||
public function testHandEmptye(): void
|
||||
public function testHandEmpty(): void
|
||||
{
|
||||
$ruleRepos = $this->mock(RuleRepositoryInterface::class);
|
||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||
@ -117,6 +120,7 @@ class ApplyRulesTest extends TestCase
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$ruleEngine = $this->mock(RuleEngine::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// data
|
||||
$asset = $this->getRandomAsset();
|
||||
@ -125,6 +129,7 @@ class ApplyRulesTest extends TestCase
|
||||
$groups = new Collection([$group]);
|
||||
|
||||
// expected calls:
|
||||
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||
$ruleRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$ruleGroupRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$accountRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
@ -172,6 +177,7 @@ class ApplyRulesTest extends TestCase
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$ruleEngine = $this->mock(RuleEngine::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// data
|
||||
$asset = $this->getRandomAsset();
|
||||
@ -181,6 +187,7 @@ class ApplyRulesTest extends TestCase
|
||||
$rules = new Collection([$rule]);
|
||||
|
||||
// expected calls:
|
||||
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||
$ruleRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$ruleGroupRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$accountRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
@ -227,6 +234,7 @@ class ApplyRulesTest extends TestCase
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$ruleEngine = $this->mock(RuleEngine::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// data
|
||||
$asset = $this->getRandomAsset();
|
||||
@ -238,6 +246,7 @@ class ApplyRulesTest extends TestCase
|
||||
$rules = new Collection([$activeRule]);
|
||||
|
||||
// expected calls:
|
||||
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||
$ruleRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$ruleGroupRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$accountRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
@ -287,6 +296,7 @@ class ApplyRulesTest extends TestCase
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$ruleEngine = $this->mock(RuleEngine::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
$activeGroup = $this->user()->ruleGroups()->where('active', 1)->inRandomOrder()->first();
|
||||
$inactiveGroup = $this->user()->ruleGroups()->where('active', 0)->inRandomOrder()->first();
|
||||
@ -299,6 +309,7 @@ class ApplyRulesTest extends TestCase
|
||||
$rules = new Collection([$rule]);
|
||||
|
||||
// expected calls:
|
||||
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||
$ruleRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$ruleGroupRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$accountRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
@ -348,8 +359,10 @@ class ApplyRulesTest extends TestCase
|
||||
$this->mock(GroupCollectorInterface::class);
|
||||
$this->mock(AccountRepositoryInterface::class);
|
||||
$this->mock(RuleEngine::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
|
||||
// expected calls:
|
||||
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||
$ruleRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$ruleGroupRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
|
||||
@ -374,15 +387,17 @@ class ApplyRulesTest extends TestCase
|
||||
{
|
||||
$ruleRepos = $this->mock(RuleRepositoryInterface::class);
|
||||
$ruleGroupRepos = $this->mock(RuleGroupRepositoryInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$this->mock(RuleEngine::class);
|
||||
$this->mock(JournalRepositoryInterface::class);
|
||||
$this->mock(GroupCollectorInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$this->mock(RuleEngine::class);
|
||||
|
||||
// data
|
||||
$expense = $this->getRandomExpense();
|
||||
|
||||
// expected calls:
|
||||
$userRepos->shouldReceive('findNull')->atLeast()->once()->andReturn($this->user());
|
||||
$ruleRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$ruleGroupRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
$accountRepos->shouldReceive('setUser')->atLeast()->once();
|
||||
|
@ -50,7 +50,7 @@ class BudgetLimitCurrencyTest extends TestCase
|
||||
BudgetLimit::whereNull('transaction_currency_id')->forceDelete();
|
||||
|
||||
$this->artisan('firefly-iii:bl-currency')
|
||||
->expectsOutput('All budget limits are correct.')
|
||||
->expectsOutput('All budget limits are correct.')
|
||||
->assertExitCode(0);
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,8 @@ class MigrateToGroupsTest extends TestCase
|
||||
public function testHandle(): void
|
||||
{
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
$service = $this->mock(JournalDestroyService::class);
|
||||
$groupFactory = $this->mock(TransactionGroupFactory::class);
|
||||
|
||||
// mock calls:
|
||||
$journalRepos->shouldReceive('getSplitJournals')
|
||||
@ -85,9 +87,12 @@ class MigrateToGroupsTest extends TestCase
|
||||
public function testHandleNoGroup(): void
|
||||
{
|
||||
$journalRepos = $this->mock(JournalRepositoryInterface::class);
|
||||
$asset = $this->getRandomAsset();
|
||||
$expense = $this->getRandomExpense();
|
||||
$journal = TransactionJournal::create(
|
||||
$service = $this->mock(JournalDestroyService::class);
|
||||
$groupFactory = $this->mock(TransactionGroupFactory::class);
|
||||
|
||||
$asset = $this->getRandomAsset();
|
||||
$expense = $this->getRandomExpense();
|
||||
$journal = TransactionJournal::create(
|
||||
[
|
||||
'user_id' => 1,
|
||||
'transaction_currency_id' => 1,
|
||||
@ -97,7 +102,7 @@ class MigrateToGroupsTest extends TestCase
|
||||
'date' => '2019-01-01',
|
||||
]
|
||||
);
|
||||
$one = Transaction::create(
|
||||
$one = Transaction::create(
|
||||
[
|
||||
'transaction_journal_id' => $journal->id,
|
||||
'account_id' => $asset->id,
|
||||
@ -105,7 +110,7 @@ class MigrateToGroupsTest extends TestCase
|
||||
'identifier' => 1,
|
||||
]
|
||||
);
|
||||
$two = Transaction::create(
|
||||
$two = Transaction::create(
|
||||
[
|
||||
'transaction_journal_id' => $journal->id,
|
||||
'account_id' => $expense->id,
|
||||
@ -113,7 +118,7 @@ class MigrateToGroupsTest extends TestCase
|
||||
'identifier' => 1,
|
||||
]
|
||||
);
|
||||
$array = $journal->toArray();
|
||||
$array = $journal->toArray();
|
||||
|
||||
// mock calls:
|
||||
$journalRepos->shouldReceive('getSplitJournals')
|
||||
|
@ -140,7 +140,7 @@ class TransactionIdentifierTest extends TestCase
|
||||
|
||||
// assume all is well.
|
||||
$this->artisan('firefly-iii:transaction-identifiers')
|
||||
->expectsOutput('Fixed 2 split journal transaction identifier(s).')
|
||||
->expectsOutput('Fixed 2 split journal transaction identifier(s).')
|
||||
->assertExitCode(0);
|
||||
|
||||
// see results:
|
||||
|
@ -75,7 +75,8 @@ class PiggyBankEventFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\PiggyBankEventFactory
|
||||
*/
|
||||
public function testCreateNoPiggy(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $transfer */
|
||||
@ -93,7 +94,8 @@ class PiggyBankEventFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\PiggyBankEventFactory
|
||||
*/
|
||||
public function testCreateNoRep(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $transfer */
|
||||
@ -115,7 +117,8 @@ class PiggyBankEventFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\PiggyBankEventFactory
|
||||
*/
|
||||
public function testCreateNotTransfer(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $deposit */
|
||||
@ -131,7 +134,8 @@ class PiggyBankEventFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\PiggyBankEventFactory
|
||||
*/
|
||||
public function testCreateSuccess(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $transfer */
|
||||
|
@ -49,7 +49,8 @@ class TransactionJournalMetaFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\TransactionJournalMetaFactory
|
||||
*/
|
||||
public function testUpdateOrCreateBasic(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $journal */
|
||||
@ -72,7 +73,8 @@ class TransactionJournalMetaFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\TransactionJournalMetaFactory
|
||||
*/
|
||||
public function testUpdateOrCreateDate(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $journal */
|
||||
@ -95,7 +97,8 @@ class TransactionJournalMetaFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\TransactionJournalMetaFactory
|
||||
*/
|
||||
public function testUpdateOrCreateDeleteExisting(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $journal */
|
||||
@ -125,7 +128,8 @@ class TransactionJournalMetaFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\TransactionJournalMetaFactory
|
||||
*/
|
||||
public function testUpdateOrCreateEmpty(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $journal */
|
||||
@ -148,7 +152,8 @@ class TransactionJournalMetaFactoryTest extends TestCase
|
||||
* @covers \FireflyIII\Factory\TransactionJournalMetaFactory
|
||||
*/
|
||||
public function testUpdateOrCreateExistingEmpty(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
/** @var TransactionJournal $journal */
|
||||
|
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace Tests\Unit\Import\Storage;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Helpers\Collector\TransactionCollector;
|
||||
use FireflyIII\Helpers\Collector\TransactionCollectorInterface;
|
||||
@ -620,7 +621,7 @@ class ImportArrayStorageTest extends TestCase
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
private function singleTransfer(): array
|
||||
{
|
||||
@ -669,7 +670,7 @@ class ImportArrayStorageTest extends TestCase
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
private function singleWithdrawal(): array
|
||||
{
|
||||
|
@ -835,7 +835,8 @@ class BinderTest extends TestCase
|
||||
* @covers \FireflyIII\Support\Binder\JournalList
|
||||
*/
|
||||
public function testJournalList(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
Route::middleware(Binder::class)->any(
|
||||
@ -854,7 +855,8 @@ class BinderTest extends TestCase
|
||||
* @covers \FireflyIII\Support\Binder\JournalList
|
||||
*/
|
||||
public function testJournalListEmpty(): void
|
||||
{ $this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
Route::middleware(Binder::class)->any(
|
||||
|
@ -498,8 +498,8 @@ class ImportTransactionTest extends TestCase
|
||||
*/
|
||||
public function testCalculateAmountNeg(): void
|
||||
{
|
||||
$importTransaction = new ImportTransaction;
|
||||
$importTransaction->amount = '2.99';
|
||||
$importTransaction = new ImportTransaction;
|
||||
$importTransaction->amount = '2.99';
|
||||
$importTransaction->modifiers['generic-debit-credit'] = 'D';
|
||||
try {
|
||||
$this->assertEquals('-2.99', $importTransaction->calculateAmount());
|
||||
@ -635,8 +635,8 @@ class ImportTransactionTest extends TestCase
|
||||
*/
|
||||
public function testForeignAmountModNeg(): void
|
||||
{
|
||||
$importTransaction = new ImportTransaction;
|
||||
$importTransaction->foreignAmount = '6.77';
|
||||
$importTransaction = new ImportTransaction;
|
||||
$importTransaction->foreignAmount = '6.77';
|
||||
$importTransaction->modifiers['generic-debit-credit'] = 'D';
|
||||
$this->assertEquals('-6.77', $importTransaction->calculateForeignAmount());
|
||||
}
|
||||
@ -648,8 +648,8 @@ class ImportTransactionTest extends TestCase
|
||||
*/
|
||||
public function testForeignAmountModPos(): void
|
||||
{
|
||||
$importTransaction = new ImportTransaction;
|
||||
$importTransaction->foreignAmount = '-5.77';
|
||||
$importTransaction = new ImportTransaction;
|
||||
$importTransaction->foreignAmount = '-5.77';
|
||||
$importTransaction->modifiers['generic-debit-credit'] = 'C';
|
||||
$this->assertEquals('5.77', $importTransaction->calculateForeignAmount());
|
||||
}
|
||||
|
@ -93,7 +93,8 @@ class ConvertToDepositTest extends TestCase
|
||||
* @covers \FireflyIII\TransactionRules\Actions\ConvertToDeposit
|
||||
*/
|
||||
public function testActWithdrawal()
|
||||
{$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
$revenue = $this->getRandomRevenue();
|
||||
|
@ -55,7 +55,8 @@ class ConvertToTransferTest extends TestCase
|
||||
* @covers \FireflyIII\TransactionRules\Actions\ConvertToTransfer
|
||||
*/
|
||||
public function testActDeposit(): void
|
||||
{$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
$deposit = $this->getRandomDeposit();
|
||||
|
@ -54,7 +54,8 @@ class ConvertToWithdrawalTest extends TestCase
|
||||
* @covers \FireflyIII\TransactionRules\Actions\ConvertToWithdrawal
|
||||
*/
|
||||
public function testActDeposit()
|
||||
{$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
{
|
||||
$this->markTestIncomplete('Needs to be rewritten for v4.8.0');
|
||||
|
||||
return;
|
||||
$expense = $this->getRandomExpense();
|
||||
|
Loading…
Reference in New Issue
Block a user