Update test code.

This commit is contained in:
James Cole
2018-05-11 19:58:10 +02:00
parent 9bb4df4cc3
commit 4d6bc55723
174 changed files with 2138 additions and 940 deletions

View File

@@ -42,7 +42,7 @@ class AccountUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService
* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait
*/
public function testDeleteExistingIB()
public function testDeleteExistingIB(): void
{
/** @var Account $account */
$account = Account::create(
@@ -91,7 +91,7 @@ class AccountUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService
* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait
*/
public function testUpdateBasic()
public function testUpdateBasic(): void
{
/** @var Account $account */
$account = $this->user()->accounts()->first();
@@ -114,7 +114,7 @@ class AccountUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService
* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait
*/
public function testUpdateBasicEmptyNote()
public function testUpdateBasicEmptyNote(): void
{
/** @var Account $account */
$account = $this->user()->accounts()->first();
@@ -139,7 +139,7 @@ class AccountUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService
* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait
*/
public function testUpdateBasicExistingNote()
public function testUpdateBasicExistingNote(): void
{
/** @var Account $account */
$account = $this->user()->accounts()->first();
@@ -170,7 +170,7 @@ class AccountUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService
* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait
*/
public function testUpdateExistingIB()
public function testUpdateExistingIB(): void
{
/** @var Account $account */
$account = Account::create(
@@ -222,7 +222,7 @@ class AccountUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService
* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait
*/
public function testUpdateExistingIBZero()
public function testUpdateExistingIBZero(): void
{
$deleteService = $this->mock(JournalDestroyService::class);
$deleteService->shouldReceive('destroy')->once();
@@ -277,7 +277,7 @@ class AccountUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\AccountUpdateService
* @covers \FireflyIII\Services\Internal\Support\AccountServiceTrait
*/
public function testUpdateNewIB()
public function testUpdateNewIB(): void
{
/** @var Account $account */
$account = Account::create(

View File

@@ -44,7 +44,7 @@ class JournalUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService
* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait
*/
public function testUpdateBasic()
public function testUpdateBasic(): void
{
// mock other stuff:
$transactionFactory = $this->mock(TransactionFactory::class);
@@ -86,7 +86,7 @@ class JournalUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService
* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait
*/
public function testUpdateBasicEmptyNote()
public function testUpdateBasicEmptyNote(): void
{
// mock other stuff:
$transactionFactory = $this->mock(TransactionFactory::class);
@@ -128,7 +128,7 @@ class JournalUpdateServiceTest extends TestCase
/**
* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService
*/
public function testUpdateBudget()
public function testUpdateBudget(): void
{
$budget = $this->user()->budgets()->first();
$service = $this->mock(TransactionUpdateService::class);
@@ -151,7 +151,7 @@ class JournalUpdateServiceTest extends TestCase
/**
* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService
*/
public function testUpdateCategory()
public function testUpdateCategory(): void
{
$service = $this->mock(TransactionUpdateService::class);
$service->shouldReceive('setUser');
@@ -175,7 +175,7 @@ class JournalUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\JournalUpdateService
* @covers \FireflyIII\Services\Internal\Support\JournalServiceTrait
*/
public function testUpdateLotsOfTransactions()
public function testUpdateLotsOfTransactions(): void
{
// mock other stuff:
$transactionFactory = $this->mock(TransactionFactory::class);

View File

@@ -39,7 +39,7 @@ class TransactionUpdateServiceTest extends TestCase
/**
* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService
*/
public function testReconcile()
public function testReconcile(): void
{
$transaction = $this->user()->transactions()->inRandomOrder()->first();
@@ -55,7 +55,7 @@ class TransactionUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService
* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait
*/
public function testReconcileNull()
public function testReconcileNull(): void
{
/** @var TransactionUpdateService $service */
$service = app(TransactionUpdateService::class);
@@ -68,7 +68,7 @@ class TransactionUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService
* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait
*/
public function testUpdateBudget()
public function testUpdateBudget(): void
{
/** @var Transaction $source */
@@ -92,7 +92,7 @@ class TransactionUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService
* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait
*/
public function testUpdateCategory()
public function testUpdateCategory(): void
{
/** @var Transaction $source */
@@ -116,7 +116,7 @@ class TransactionUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService
* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait
*/
public function testUpdateDestinationBasic()
public function testUpdateDestinationBasic(): void
{
/** @var Transaction $source */
$source = $this->user()->transactions()->where('amount', '>', 0)->inRandomOrder()->first();
@@ -155,7 +155,7 @@ class TransactionUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService
* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait
*/
public function testUpdateDestinationForeign()
public function testUpdateDestinationForeign(): void
{
/** @var Transaction $source */
$source = $this->user()->transactions()->where('amount', '>', 0)->inRandomOrder()->first();
@@ -198,7 +198,7 @@ class TransactionUpdateServiceTest extends TestCase
* @covers \FireflyIII\Services\Internal\Update\TransactionUpdateService
* @covers \FireflyIII\Services\Internal\Support\TransactionServiceTrait
*/
public function testUpdateSourceBasic()
public function testUpdateSourceBasic(): void
{
/** @var Transaction $source */
$source = $this->user()->transactions()->where('amount', '<', 0)->inRandomOrder()->first();