Various issues fixed (SonarQube)

This commit is contained in:
James Cole
2020-10-26 19:15:57 +01:00
parent e4923a3c69
commit 372c6ac667
57 changed files with 86 additions and 221 deletions

View File

@@ -59,7 +59,7 @@ class CorrectOpeningBalanceCurrenciesTest extends TestCase
public function testHandleBroken(): void
{
// create opening balance journal for test. Is enough to trigger this test.
$journal = factory(TransactionJournal::class)->state(TransactionType::OPENING_BALANCE)->create();
factory(TransactionJournal::class)->state(TransactionType::OPENING_BALANCE)->create();
// run command
$this->artisan('firefly-iii:fix-ob-currencies')

View File

@@ -300,7 +300,6 @@ class FixAccountTypesTest extends TestCase
$newSource = $this->getRandomRevenue();
$destination = $this->getRandomAsset();
$withdrawal = TransactionType::where('type', TransactionType::WITHDRAWAL)->first();
$deposit = TransactionType::where('type', TransactionType::DEPOSIT)->first();
$journal = TransactionJournal::create(
[

View File

@@ -34,14 +34,7 @@ class FixTransactionTypesTest extends TestCase
*/
public function testHandle(): void
{
$this->artisan('firefly-iii:fix-transaction-types')
->expectsOutput(sprintf('Recurring transaction #%d should be a "%s" but is a "%s" and will be corrected.',
1, 'Withdrawal','Transfer',
))
->assertExitCode(0);
$this->markTestIncomplete();
}

View File

@@ -34,7 +34,7 @@ use Tests\Traits\TestHelpers;
*/
abstract class TestCase extends BaseTestCase
{
use CreatesApplication, CollectsValues;//, MocksDefaultValues, TestHelpers, ;
use CreatesApplication, CollectsValues; // MocksDefaultValues TestHelpers
/**
* @return array