Improve test coverage.

This commit is contained in:
James Cole
2019-08-29 17:53:25 +02:00
parent 91b6b86202
commit 19feefda2d
86 changed files with 3173 additions and 2626 deletions

View File

@@ -77,8 +77,8 @@ class AccountCurrenciesTest extends TestCase
$userRepos->shouldReceive('all')->atLeast()->once()->andReturn(new Collection([$this->user()]));
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);
@@ -117,8 +117,8 @@ class AccountCurrenciesTest extends TestCase
$userRepos->shouldReceive('all')->atLeast()->once()->andReturn(new Collection([$this->user()]));
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);
@@ -163,8 +163,8 @@ class AccountCurrenciesTest extends TestCase
$accountRepos->shouldReceive('getAccountsByType')->atLeast()->once()->andReturn(new Collection([$account]));
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);
@@ -205,8 +205,8 @@ class AccountCurrenciesTest extends TestCase
$accountRepos->shouldReceive('getAccountsByType')->atLeast()->once()->andReturn(new Collection([$account]));
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);
@@ -245,8 +245,8 @@ class AccountCurrenciesTest extends TestCase
$accountRepos->shouldReceive('getAccountsByType')->atLeast()->once()->andReturn(new Collection([$account]));
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);
@@ -283,8 +283,8 @@ class AccountCurrenciesTest extends TestCase
$accountRepos->shouldReceive('getAccountsByType')->atLeast()->once()->andReturn(new Collection([$account]));
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);
@@ -314,8 +314,8 @@ class AccountCurrenciesTest extends TestCase
$userRepos->shouldReceive('all')->atLeast()->once()->andReturn(new Collection([$this->user()]));
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);
@@ -340,8 +340,8 @@ class AccountCurrenciesTest extends TestCase
$this->mock(UserRepositoryInterface::class);
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_account_currencies', false])->andReturn($true);
FireflyConfig::shouldReceive('set')->withArgs(['4780_account_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_account_currencies', false])->andReturn($true);
FireflyConfig::shouldReceive('set')->withArgs(['480_account_currencies', true]);
// check preferences:
Preferences::shouldReceive('getForUser')->withArgs([Mockery::any(), 'currencyPreference', 'EUR'])->andReturn($pref);

View File

@@ -60,11 +60,11 @@ class BackToJournalsTest extends TestCase
$false->data = false;
$true = new Configuration;
$true->data = true;
FireflyConfig::shouldReceive('get')->withArgs(['4780_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($true);
FireflyConfig::shouldReceive('get')->withArgs(['480_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($true);
// set new preference after running:
FireflyConfig::shouldReceive('set')->withArgs(['4780_back_to_journals', true]);
FireflyConfig::shouldReceive('set')->withArgs(['480_back_to_journals', true]);
$this->artisan('firefly-iii:back-to-journals')
->expectsOutput('Check 0 transaction journal(s) for budget info.')
@@ -96,11 +96,11 @@ class BackToJournalsTest extends TestCase
$false->data = false;
$true = new Configuration;
$true->data = true;
FireflyConfig::shouldReceive('get')->withArgs(['4780_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($true);
FireflyConfig::shouldReceive('get')->withArgs(['480_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($true);
// set new preference after running:
FireflyConfig::shouldReceive('set')->withArgs(['4780_back_to_journals', true]);
FireflyConfig::shouldReceive('set')->withArgs(['480_back_to_journals', true]);
$this->artisan('firefly-iii:back-to-journals')
->expectsOutput('Check 1 transaction journal(s) for budget info.')
@@ -122,6 +122,7 @@ class BackToJournalsTest extends TestCase
*/
public function testHandleCategory(): void
{
Log::info(sprintf('Now in test %s.', __METHOD__));
$journal = $this->getRandomWithdrawal();
/** @var Transaction $transaction */
$transaction = $journal->transactions()->first();
@@ -138,11 +139,11 @@ class BackToJournalsTest extends TestCase
$true = new Configuration;
$true->data = true;
FireflyConfig::shouldReceive('get')->withArgs(['4780_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($true);
FireflyConfig::shouldReceive('get')->withArgs(['480_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($true);
// set new preference after running:
FireflyConfig::shouldReceive('set')->withArgs(['4780_back_to_journals', true]);
FireflyConfig::shouldReceive('set')->withArgs(['480_back_to_journals', true]);
$this->artisan('firefly-iii:back-to-journals')
->expectsOutput('Check 0 transaction journal(s) for budget info.')
@@ -181,11 +182,11 @@ class BackToJournalsTest extends TestCase
$false->data = false;
$true = new Configuration;
$true->data = true;
FireflyConfig::shouldReceive('get')->withArgs(['4780_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($true);
FireflyConfig::shouldReceive('get')->withArgs(['480_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($true);
// set new preference after running:
FireflyConfig::shouldReceive('set')->withArgs(['4780_back_to_journals', true]);
FireflyConfig::shouldReceive('set')->withArgs(['480_back_to_journals', true]);
$this->artisan('firefly-iii:back-to-journals')
->expectsOutput('Check 1 transaction journal(s) for budget info.')
@@ -225,11 +226,11 @@ class BackToJournalsTest extends TestCase
$false->data = false;
$true = new Configuration;
$true->data = true;
FireflyConfig::shouldReceive('get')->withArgs(['4780_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($true);
FireflyConfig::shouldReceive('get')->withArgs(['480_back_to_journals', false])->andReturn($false);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($true);
// set new preference after running:
FireflyConfig::shouldReceive('set')->withArgs(['4780_back_to_journals', true]);
FireflyConfig::shouldReceive('set')->withArgs(['480_back_to_journals', true]);
$this->artisan('firefly-iii:back-to-journals')
->expectsOutput('Check 0 transaction journal(s) for budget info.')

View File

@@ -56,8 +56,8 @@ class BudgetLimitCurrencyTest extends TestCase
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_bl_currency', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_bl_currency', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_bl_currency', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_bl_currency', true]);
$this->artisan('firefly-iii:bl-currency')
->expectsOutput('All budget limits are correct.')
@@ -81,8 +81,8 @@ class BudgetLimitCurrencyTest extends TestCase
'end_date' => '2019-01-31',
]);
FireflyConfig::shouldReceive('get')->withArgs(['4780_bl_currency', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_bl_currency', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_bl_currency', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_bl_currency', true]);
$currency = $this->getEuro();
Amount::shouldReceive('getDefaultCurrencyByUser')->atLeast()->once()->andReturn($currency);

View File

@@ -54,8 +54,8 @@ class CCLiabilitiesTest extends TestCase
{
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_cc_liabilities', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_cc_liabilities', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_cc_liabilities', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_cc_liabilities', true]);
$this->artisan('firefly-iii:cc-liabilities')
@@ -79,8 +79,8 @@ class CCLiabilitiesTest extends TestCase
);
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_cc_liabilities', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_cc_liabilities', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_cc_liabilities', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_cc_liabilities', true]);
$this->artisan('firefly-iii:cc-liabilities')
@@ -114,8 +114,8 @@ class CCLiabilitiesTest extends TestCase
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_cc_liabilities', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_cc_liabilities', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_cc_liabilities', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_cc_liabilities', true]);
$this->artisan('firefly-iii:cc-liabilities')

View File

@@ -55,8 +55,8 @@ class MigrateAttachmentsTest extends TestCase
{
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrate_attachments', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrate_attachments', true]);
// assume all is well.
$this->artisan('firefly-iii:migrate-attachments')
->expectsOutput('All attachments are OK.')
@@ -70,8 +70,8 @@ class MigrateAttachmentsTest extends TestCase
{
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrate_attachments', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrate_attachments', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrate_attachments', true]);
$attachment = Attachment::create(
[

View File

@@ -53,8 +53,8 @@ class MigrateJournalNotesTest extends TestCase
{
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrate_notes', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrate_notes', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrate_notes', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrate_notes', true]);
// assume all is well.
$this->artisan('firefly-iii:migrate-notes')
@@ -69,8 +69,8 @@ class MigrateJournalNotesTest extends TestCase
{
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrate_notes', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrate_notes', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrate_notes', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrate_notes', true]);
$journal = $this->getRandomWithdrawal();

View File

@@ -75,8 +75,8 @@ class MigrateToGroupsTest extends TestCase
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrated_to_groups', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrated_to_groups', true]);
// assume all is well.
$this->artisan('firefly-iii:migrate-to-groups')
@@ -136,8 +136,8 @@ class MigrateToGroupsTest extends TestCase
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrated_to_groups', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrated_to_groups', true]);
// assume all is well.
$this->artisan('firefly-iii:migrate-to-groups')
@@ -242,8 +242,8 @@ class MigrateToGroupsTest extends TestCase
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_migrated_to_groups', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_migrated_to_groups', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_migrated_to_groups', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_migrated_to_groups', true]);
$this->artisan('firefly-iii:migrate-to-groups')
->expectsOutput('Migrated 1 transaction journal(s).')

View File

@@ -88,8 +88,8 @@ class MigrateToRulesTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_bills_to_rules', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_bills_to_rules', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_bills_to_rules', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_bills_to_rules', true]);
// preferences
$language = new Preference;
@@ -196,8 +196,8 @@ class MigrateToRulesTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_bills_to_rules', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_bills_to_rules', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_bills_to_rules', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_bills_to_rules', true]);
// preferences
$language = new Preference;
@@ -308,8 +308,8 @@ class MigrateToRulesTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_bills_to_rules', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_bills_to_rules', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_bills_to_rules', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_bills_to_rules', true]);
// preferences
$language = new Preference;

View File

@@ -91,8 +91,8 @@ class OtherCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_other_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_other_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_other_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_other_currencies', true]);
// assume all is well.
$this->artisan('firefly-iii:other-currencies')
@@ -167,8 +167,8 @@ class OtherCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_other_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_other_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_other_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_other_currencies', true]);
$this->artisan('firefly-iii:other-currencies')
->expectsOutput('Verified 1 transaction(s) and journal(s).')
@@ -252,8 +252,8 @@ class OtherCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_other_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_other_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_other_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_other_currencies', true]);
$this->artisan('firefly-iii:other-currencies')
->expectsOutput('Verified 1 transaction(s) and journal(s).')

View File

@@ -56,8 +56,8 @@ class RenameAccountMetaTest extends TestCase
$false = new Configuration;
$false->data = false;
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_rename_account_meta', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_rename_account_meta', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_rename_account_meta', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_rename_account_meta', true]);
// assume all is well.
$this->artisan('firefly-iii:rename-account-meta')
@@ -76,8 +76,8 @@ class RenameAccountMetaTest extends TestCase
$false = new Configuration;
$false->data = false;
// check config
FireflyConfig::shouldReceive('get')->withArgs(['4780_rename_account_meta', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_rename_account_meta', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_rename_account_meta', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_rename_account_meta', true]);
$expense = $this->getRandomExpense();

View File

@@ -67,8 +67,8 @@ class TransactionIdentifierTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transaction_identifier', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transaction_identifier', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transaction_identifier', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transaction_identifier', true]);
// assume all is well.
$this->artisan('firefly-iii:transaction-identifiers')
@@ -140,8 +140,8 @@ class TransactionIdentifierTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transaction_identifier', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transaction_identifier', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transaction_identifier', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transaction_identifier', true]);
// assume all is well.
$this->artisan('firefly-iii:transaction-identifiers')

View File

@@ -75,8 +75,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
// assume all is well.
$this->artisan('firefly-iii:transfer-currencies')
@@ -117,8 +117,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
// assume all is well.
$this->artisan('firefly-iii:transfer-currencies')
@@ -162,8 +162,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 1 transfer(s).')
@@ -218,8 +218,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 2 transfer(s).')
@@ -279,8 +279,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 3 transfer(s).')
@@ -339,8 +339,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 1 transfer(s).')
@@ -393,8 +393,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 1 transfer(s).')
@@ -443,8 +443,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 1 transfer(s).')
@@ -493,8 +493,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 1 transfer(s).')
@@ -551,8 +551,8 @@ class TransferCurrenciesCorrectionsTest extends TestCase
// configuration
$false = new Configuration;
$false->data = false;
FireflyConfig::shouldReceive('get')->withArgs(['4780_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['4780_transfer_currencies', true]);
FireflyConfig::shouldReceive('get')->withArgs(['480_transfer_currencies', false])->andReturn($false);
FireflyConfig::shouldReceive('set')->withArgs(['480_transfer_currencies', true]);
$this->artisan('firefly-iii:transfer-currencies')
->expectsOutput('Verified currency information of 1 transfer(s).')