mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code cleanup
This commit is contained in:
parent
6280448dfb
commit
033f5b67db
@ -5,6 +5,7 @@ use Illuminate\Support\Collection;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Class BudgetControllerTest
|
* Class BudgetControllerTest
|
||||||
*/
|
*/
|
||||||
class BudgetControllerTest extends TestCase
|
class BudgetControllerTest extends TestCase
|
||||||
|
@ -6,6 +6,7 @@ use League\FactoryMuffin\Facade as FactoryMuffin;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Class CategoryControllerTest
|
* Class CategoryControllerTest
|
||||||
*/
|
*/
|
||||||
class CategoryControllerTest extends TestCase
|
class CategoryControllerTest extends TestCase
|
||||||
|
@ -3,6 +3,7 @@ use Illuminate\Support\Collection;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Class CurrencyControllerTest
|
* Class CurrencyControllerTest
|
||||||
*/
|
*/
|
||||||
class CurrencyControllerTest extends TestCase
|
class CurrencyControllerTest extends TestCase
|
||||||
|
@ -40,8 +40,8 @@ class JsonControllerTest extends TestCase
|
|||||||
public function testBoxBillsPaid()
|
public function testBoxBillsPaid()
|
||||||
{
|
{
|
||||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||||
$cc = FactoryMuffin::create('FireflyIII\Models\Account');
|
$creditCard = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
$ccs = new Collection([$cc]);
|
$ccs = new Collection([$creditCard]);
|
||||||
$collection = new Collection([$bill]);
|
$collection = new Collection([$bill]);
|
||||||
$ranges = [['start' => new Carbon, 'end' => new Carbon]];
|
$ranges = [['start' => new Carbon, 'end' => new Carbon]];
|
||||||
$this->be($bill->user);
|
$this->be($bill->user);
|
||||||
@ -69,8 +69,8 @@ class JsonControllerTest extends TestCase
|
|||||||
public function testBoxBillsUnpaid()
|
public function testBoxBillsUnpaid()
|
||||||
{
|
{
|
||||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||||
$cc = FactoryMuffin::create('FireflyIII\Models\Account');
|
$creditCard = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
$ccs = new Collection([$cc]);
|
$ccs = new Collection([$creditCard]);
|
||||||
$collection = new Collection([$bill]);
|
$collection = new Collection([$bill]);
|
||||||
$ranges = [['start' => new Carbon, 'end' => new Carbon]];
|
$ranges = [['start' => new Carbon, 'end' => new Carbon]];
|
||||||
$this->be($bill->user);
|
$this->be($bill->user);
|
||||||
@ -133,24 +133,6 @@ class JsonControllerTest extends TestCase
|
|||||||
$this->assertResponseOk();
|
$this->assertResponseOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTags()
|
|
||||||
{
|
|
||||||
$user = FactoryMuffin::create('FireflyIII\User');
|
|
||||||
$this->be($user);
|
|
||||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
|
||||||
$tag->user()->associate($user);
|
|
||||||
|
|
||||||
$tag->save();
|
|
||||||
$this->be($tag->user);
|
|
||||||
$tags = new Collection([$tag]);
|
|
||||||
|
|
||||||
$repository = $this->mock('FireflyIII\Repositories\Tag\TagRepositoryInterface');
|
|
||||||
$repository->shouldReceive('get')->andReturn($tags);
|
|
||||||
|
|
||||||
$this->call('GET', '/json/tags');
|
|
||||||
$this->assertResponseOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testExpenseAccounts()
|
public function testExpenseAccounts()
|
||||||
{
|
{
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
@ -177,6 +159,24 @@ class JsonControllerTest extends TestCase
|
|||||||
$this->assertResponseOk();
|
$this->assertResponseOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testTags()
|
||||||
|
{
|
||||||
|
$user = FactoryMuffin::create('FireflyIII\User');
|
||||||
|
$this->be($user);
|
||||||
|
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||||
|
$tag->user()->associate($user);
|
||||||
|
|
||||||
|
$tag->save();
|
||||||
|
$this->be($tag->user);
|
||||||
|
$tags = new Collection([$tag]);
|
||||||
|
|
||||||
|
$repository = $this->mock('FireflyIII\Repositories\Tag\TagRepositoryInterface');
|
||||||
|
$repository->shouldReceive('get')->andReturn($tags);
|
||||||
|
|
||||||
|
$this->call('GET', '/json/tags');
|
||||||
|
$this->assertResponseOk();
|
||||||
|
}
|
||||||
|
|
||||||
public function testTransactionJournals()
|
public function testTransactionJournals()
|
||||||
{
|
{
|
||||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
|
@ -8,6 +8,7 @@ use Illuminate\Support\Collection;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Class PiggyBankControllerTest
|
* Class PiggyBankControllerTest
|
||||||
*/
|
*/
|
||||||
class PiggyBankControllerTest extends TestCase
|
class PiggyBankControllerTest extends TestCase
|
||||||
|
@ -69,7 +69,7 @@ class ReportControllerTest extends TestCase
|
|||||||
public function testMonth()
|
public function testMonth()
|
||||||
{
|
{
|
||||||
$user = FactoryMuffin::create('FireflyIII\User');
|
$user = FactoryMuffin::create('FireflyIII\User');
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
$budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
$budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||||
$budget1->queryAmount = 12;
|
$budget1->queryAmount = 12;
|
||||||
$budget2 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
$budget2 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||||
@ -95,7 +95,7 @@ class ReportControllerTest extends TestCase
|
|||||||
public function testMonthShared()
|
public function testMonthShared()
|
||||||
{
|
{
|
||||||
$user = FactoryMuffin::create('FireflyIII\User');
|
$user = FactoryMuffin::create('FireflyIII\User');
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
$budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
$budget1 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||||
$budget1->queryAmount = 12;
|
$budget1->queryAmount = 12;
|
||||||
$budget2 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
$budget2 = FactoryMuffin::create('FireflyIII\Models\Budget');
|
||||||
@ -132,7 +132,7 @@ class ReportControllerTest extends TestCase
|
|||||||
'data' => 'sharedAsset'
|
'data' => 'sharedAsset'
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$journals = new Collection([$journal]);
|
new Collection([$journal]);
|
||||||
|
|
||||||
$this->be($user);
|
$this->be($user);
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Class TagControllerTest
|
* Class TagControllerTest
|
||||||
*/
|
*/
|
||||||
class TagControllerTest extends TestCase
|
class TagControllerTest extends TestCase
|
||||||
|
@ -4,6 +4,7 @@ use Illuminate\Support\Collection;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Class TransactionControllerTest
|
* Class TransactionControllerTest
|
||||||
*/
|
*/
|
||||||
class TransactionControllerTest extends TestCase
|
class TransactionControllerTest extends TestCase
|
||||||
@ -82,6 +83,9 @@ class TransactionControllerTest extends TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
public function testEdit()
|
public function testEdit()
|
||||||
{
|
{
|
||||||
// make complete journal:
|
// make complete journal:
|
||||||
@ -225,6 +229,9 @@ class TransactionControllerTest extends TestCase
|
|||||||
$this->assertResponseOk();
|
$this->assertResponseOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
public function testStore()
|
public function testStore()
|
||||||
{
|
{
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
@ -269,6 +276,9 @@ class TransactionControllerTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
@ -314,6 +324,9 @@ class TransactionControllerTest extends TestCase
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
public function testUpdateWithRedirect()
|
public function testUpdateWithRedirect()
|
||||||
{
|
{
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
|
@ -30,6 +30,9 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
|||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
public function testNoRepetition()
|
public function testNoRepetition()
|
||||||
{
|
{
|
||||||
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
@ -97,6 +100,9 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
|||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
public function testWithRepetition()
|
public function testWithRepetition()
|
||||||
{
|
{
|
||||||
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
@ -154,6 +160,9 @@ class ConnectJournalToPiggyBankTest extends TestCase
|
|||||||
$this->assertCount(1, $piggyBank->piggyBankEvents()->get());
|
$this->assertCount(1, $piggyBank->piggyBankEvents()->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
|
*/
|
||||||
public function testWithRepetitionReversed()
|
public function testWithRepetitionReversed()
|
||||||
{
|
{
|
||||||
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
@ -7,6 +7,7 @@ use FireflyIII\Models\Transaction;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Class ReportQueryTest
|
* Class ReportQueryTest
|
||||||
*/
|
*/
|
||||||
class ReportQueryTest extends TestCase
|
class ReportQueryTest extends TestCase
|
||||||
|
@ -11,6 +11,7 @@ use Illuminate\Pagination\LengthAwarePaginator;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 16:33:55.
|
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 16:33:55.
|
||||||
*/
|
*/
|
||||||
class AccountRepositoryTest extends TestCase
|
class AccountRepositoryTest extends TestCase
|
||||||
@ -58,14 +59,14 @@ class AccountRepositoryTest extends TestCase
|
|||||||
{
|
{
|
||||||
// create account:
|
// create account:
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
$id = $account->id;
|
$accountId = $account->id;
|
||||||
$this->be($account->user);
|
$this->be($account->user);
|
||||||
|
|
||||||
|
|
||||||
$this->object->destroy($account);
|
$this->object->destroy($account);
|
||||||
|
|
||||||
// cannot find account:
|
// cannot find account:
|
||||||
$this->assertCount(0, Account::whereId($id)->whereNotNull('deleted_at')->get());
|
$this->assertCount(0, Account::whereId($accountId)->whereNotNull('deleted_at')->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -190,6 +191,7 @@ class AccountRepositoryTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::getFrontpageTransactions
|
* @covers FireflyIII\Repositories\Account\AccountRepository::getFrontpageTransactions
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testGetFrontpageTransactions()
|
public function testGetFrontpageTransactions()
|
||||||
{
|
{
|
||||||
@ -250,6 +252,7 @@ class AccountRepositoryTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::getJournals
|
* @covers FireflyIII\Repositories\Account\AccountRepository::getJournals
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testGetJournals()
|
public function testGetJournals()
|
||||||
{
|
{
|
||||||
@ -399,6 +402,7 @@ class AccountRepositoryTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::getSavingsAccounts
|
* @covers FireflyIII\Repositories\Account\AccountRepository::getSavingsAccounts
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testGetSavingsAccounts()
|
public function testGetSavingsAccounts()
|
||||||
{
|
{
|
||||||
@ -457,12 +461,12 @@ class AccountRepositoryTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::getTransfersInRange
|
* @covers FireflyIII\Repositories\Account\AccountRepository::getTransfersInRange
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testGetTransfersInRange()
|
public function testGetTransfersInRange()
|
||||||
{
|
{
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
|
|
||||||
$date = new Carbon;
|
|
||||||
|
|
||||||
// three transfers, two out of range:
|
// three transfers, two out of range:
|
||||||
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
@ -546,6 +550,7 @@ class AccountRepositoryTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::openingBalanceTransaction
|
* @covers FireflyIII\Repositories\Account\AccountRepository::openingBalanceTransaction
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testOpeningBalanceTransaction()
|
public function testOpeningBalanceTransaction()
|
||||||
{
|
{
|
||||||
@ -764,6 +769,7 @@ class AccountRepositoryTest extends TestCase
|
|||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::update
|
* @covers FireflyIII\Repositories\Account\AccountRepository::update
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::updateMetadata
|
* @covers FireflyIII\Repositories\Account\AccountRepository::updateMetadata
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::updateInitialBalance
|
* @covers FireflyIII\Repositories\Account\AccountRepository::updateInitialBalance
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
@ -814,6 +820,7 @@ class AccountRepositoryTest extends TestCase
|
|||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::update
|
* @covers FireflyIII\Repositories\Account\AccountRepository::update
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::updateMetadata
|
* @covers FireflyIII\Repositories\Account\AccountRepository::updateMetadata
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::updateInitialBalance
|
* @covers FireflyIII\Repositories\Account\AccountRepository::updateInitialBalance
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testUpdateDeleteOpeningBalance()
|
public function testUpdateDeleteOpeningBalance()
|
||||||
{
|
{
|
||||||
@ -864,6 +871,7 @@ class AccountRepositoryTest extends TestCase
|
|||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::update
|
* @covers FireflyIII\Repositories\Account\AccountRepository::update
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::updateMetadata
|
* @covers FireflyIII\Repositories\Account\AccountRepository::updateMetadata
|
||||||
* @covers FireflyIII\Repositories\Account\AccountRepository::updateInitialBalance
|
* @covers FireflyIII\Repositories\Account\AccountRepository::updateInitialBalance
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testUpdateNewOpeningBalance()
|
public function testUpdateNewOpeningBalance()
|
||||||
{
|
{
|
||||||
|
@ -7,6 +7,7 @@ use FireflyIII\Repositories\Bill\BillRepository;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2015-05-08 at 10:43:42.
|
* Generated by PHPUnit_SkeletonGenerator on 2015-05-08 at 10:43:42.
|
||||||
*/
|
*/
|
||||||
class BillRepositoryTest extends TestCase
|
class BillRepositoryTest extends TestCase
|
||||||
@ -58,11 +59,11 @@ class BillRepositoryTest extends TestCase
|
|||||||
public function testDestroy()
|
public function testDestroy()
|
||||||
{
|
{
|
||||||
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
$bill = FactoryMuffin::create('FireflyIII\Models\Bill');
|
||||||
$id = $bill->id;
|
$accountId = $bill->id;
|
||||||
$this->object->destroy($bill);
|
$this->object->destroy($bill);
|
||||||
|
|
||||||
// cannot find bill:
|
// cannot find bill:
|
||||||
$this->assertCount(0, Bill::whereId($id)->whereNotNull('deleted_at')->get());
|
$this->assertCount(0, Bill::whereId($accountId)->whereNotNull('deleted_at')->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -282,7 +283,7 @@ class BillRepositoryTest extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* One
|
* One
|
||||||
*
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
* @covers FireflyIII\Repositories\Bill\BillRepository::scan
|
* @covers FireflyIII\Repositories\Bill\BillRepository::scan
|
||||||
*/
|
*/
|
||||||
public function testScanMatch()
|
public function testScanMatch()
|
||||||
|
@ -7,6 +7,7 @@ use Illuminate\Pagination\LengthAwarePaginator;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:16:07.
|
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:16:07.
|
||||||
*/
|
*/
|
||||||
class BudgetRepositoryTest extends TestCase
|
class BudgetRepositoryTest extends TestCase
|
||||||
|
@ -5,6 +5,7 @@ use FireflyIII\Repositories\Category\CategoryRepository;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
||||||
*/
|
*/
|
||||||
class CategoryRepositoryTest extends TestCase
|
class CategoryRepositoryTest extends TestCase
|
||||||
|
@ -71,7 +71,7 @@ class CurrencyRepositoryTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testGetCurrencyByPreferenceNull()
|
public function testGetCurrencyByPreferenceNull()
|
||||||
{
|
{
|
||||||
$first = FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
|
FactoryMuffin::create('FireflyIII\Models\TransactionCurrency');
|
||||||
$preference = FactoryMuffin::create('FireflyIII\Models\Preference');
|
$preference = FactoryMuffin::create('FireflyIII\Models\Preference');
|
||||||
$preference->data = 'ABC';
|
$preference->data = 'ABC';
|
||||||
$preference->save();
|
$preference->save();
|
||||||
|
@ -7,6 +7,7 @@ use Illuminate\Pagination\LengthAwarePaginator;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
||||||
*/
|
*/
|
||||||
class JournalRepositoryTest extends TestCase
|
class JournalRepositoryTest extends TestCase
|
||||||
@ -425,6 +426,7 @@ class JournalRepositoryTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Repositories\Journal\JournalRepository::update
|
* @covers FireflyIII\Repositories\Journal\JournalRepository::update
|
||||||
* @covers FireflyIII\Repositories\Journal\JournalRepository::updateTags
|
* @covers FireflyIII\Repositories\Journal\JournalRepository::updateTags
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testUpdate()
|
public function testUpdate()
|
||||||
{
|
{
|
||||||
@ -482,6 +484,7 @@ class JournalRepositoryTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* @covers FireflyIII\Repositories\Journal\JournalRepository::update
|
* @covers FireflyIII\Repositories\Journal\JournalRepository::update
|
||||||
* @covers FireflyIII\Repositories\Journal\JournalRepository::updateTags
|
* @covers FireflyIII\Repositories\Journal\JournalRepository::updateTags
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
*/
|
*/
|
||||||
public function testUpdateNoTags()
|
public function testUpdateNoTags()
|
||||||
{
|
{
|
||||||
|
@ -6,6 +6,7 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepository;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
||||||
*/
|
*/
|
||||||
class PiggyBankRepositoryTest extends TestCase
|
class PiggyBankRepositoryTest extends TestCase
|
||||||
|
@ -5,6 +5,7 @@ use FireflyIII\Repositories\Tag\TagRepository;
|
|||||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||||
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
* Generated by PHPUnit_SkeletonGenerator on 2015-05-05 at 19:19:32.
|
||||||
*/
|
*/
|
||||||
class TagRepositoryTest extends TestCase
|
class TagRepositoryTest extends TestCase
|
||||||
@ -56,9 +57,9 @@ class TagRepositoryTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testConnectBalancingOneDeposit()
|
public function testConnectBalancingOneDeposit()
|
||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||||
@ -82,8 +83,8 @@ class TagRepositoryTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testConnectBalancingOneTransfer()
|
public function testConnectBalancingOneTransfer()
|
||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
@ -109,8 +110,8 @@ class TagRepositoryTest extends TestCase
|
|||||||
public function testConnectBalancingOneWithdrawal()
|
public function testConnectBalancingOneWithdrawal()
|
||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||||
@ -151,10 +152,10 @@ class TagRepositoryTest extends TestCase
|
|||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$expense = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
FactoryMuffin::create('FireflyIII\Models\AccountType');
|
||||||
$revenue = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
FactoryMuffin::create('FireflyIII\Models\AccountType');
|
||||||
$asset = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
$asset = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
||||||
|
|
||||||
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
@ -191,16 +192,17 @@ class TagRepositoryTest extends TestCase
|
|||||||
* Once one or more journals have been accepted by the tag, others must match the asset account
|
* Once one or more journals have been accepted by the tag, others must match the asset account
|
||||||
* id. For this to work, we must also create an asset account, and a transaction.
|
* id. For this to work, we must also create an asset account, and a transaction.
|
||||||
*
|
*
|
||||||
|
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||||
* @covers FireflyIII\Repositories\Tag\TagRepository::connect
|
* @covers FireflyIII\Repositories\Tag\TagRepository::connect
|
||||||
*/
|
*/
|
||||||
public function testConnectPaymentNoMatch()
|
public function testConnectPaymentNoMatch()
|
||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$expense = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
FactoryMuffin::create('FireflyIII\Models\AccountType');
|
||||||
$revenue = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
FactoryMuffin::create('FireflyIII\Models\AccountType');
|
||||||
$asset = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
$asset = FactoryMuffin::create('FireflyIII\Models\AccountType');
|
||||||
|
|
||||||
$account1 = FactoryMuffin::create('FireflyIII\Models\Account');
|
$account1 = FactoryMuffin::create('FireflyIII\Models\Account');
|
||||||
@ -244,8 +246,8 @@ class TagRepositoryTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testConnectPaymentOneTransfer()
|
public function testConnectPaymentOneTransfer()
|
||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
@ -270,8 +272,8 @@ class TagRepositoryTest extends TestCase
|
|||||||
public function testConnectPaymentOneWithdrawal()
|
public function testConnectPaymentOneWithdrawal()
|
||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
|
||||||
@ -295,8 +297,8 @@ class TagRepositoryTest extends TestCase
|
|||||||
public function testConnectPaymentTwoWithdrawals()
|
public function testConnectPaymentTwoWithdrawals()
|
||||||
{
|
{
|
||||||
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
$withdrawal = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$deposit = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
$transfer = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||||
|
|
||||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
$otherJournal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
$otherJournal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||||
|
Loading…
Reference in New Issue
Block a user