mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Update test code.
This commit is contained in:
@@ -57,7 +57,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::allAccounts
|
||||
*/
|
||||
public function testAllAccounts()
|
||||
public function testAllAccounts(): void
|
||||
{
|
||||
// mock stuff
|
||||
$accountA = factory(Account::class)->make();
|
||||
@@ -77,7 +77,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::allTransactionJournals
|
||||
*/
|
||||
public function testAllTransactionJournals()
|
||||
public function testAllTransactionJournals(): void
|
||||
{
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
$collector->shouldReceive('setLimit')->withArgs([250])->andReturnSelf();
|
||||
@@ -92,7 +92,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::budgets
|
||||
*/
|
||||
public function testBudgets()
|
||||
public function testBudgets(): void
|
||||
{
|
||||
// mock stuff
|
||||
$budget = factory(Budget::class)->make();
|
||||
@@ -109,7 +109,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::categories
|
||||
*/
|
||||
public function testCategories()
|
||||
public function testCategories(): void
|
||||
{
|
||||
// mock stuff
|
||||
$category = factory(Category::class)->make();
|
||||
@@ -126,7 +126,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::expenseAccounts
|
||||
*/
|
||||
public function testExpenseAccounts()
|
||||
public function testExpenseAccounts(): void
|
||||
{
|
||||
// mock stuff
|
||||
$accountA = factory(Account::class)->make();
|
||||
@@ -148,7 +148,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::journalsWithId
|
||||
*/
|
||||
public function testJournalsWithId()
|
||||
public function testJournalsWithId(): void
|
||||
{
|
||||
$journal = $this->user()->transactionJournals()->where('id', '!=', 1)->first();
|
||||
$journal->journal_id = $journal->id;
|
||||
@@ -167,7 +167,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::revenueAccounts
|
||||
*/
|
||||
public function testRevenueAccounts()
|
||||
public function testRevenueAccounts(): void
|
||||
{
|
||||
// mock stuff
|
||||
$accountA = factory(Account::class)->make();
|
||||
@@ -189,7 +189,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::tags
|
||||
*/
|
||||
public function testTags()
|
||||
public function testTags(): void
|
||||
{
|
||||
// mock stuff
|
||||
$tag = factory(Tag::class)->make();
|
||||
@@ -207,7 +207,7 @@ class AutoCompleteControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\AutoCompleteController::transactionJournals
|
||||
*/
|
||||
public function testTransactionJournals()
|
||||
public function testTransactionJournals(): void
|
||||
{
|
||||
// mock stuff
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
|
||||
@@ -51,7 +51,7 @@ class BoxControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\BoxController::available
|
||||
*/
|
||||
public function testAvailable()
|
||||
public function testAvailable(): void
|
||||
{
|
||||
$return = [
|
||||
0 => [
|
||||
@@ -72,7 +72,7 @@ class BoxControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\BoxController::balance
|
||||
*/
|
||||
public function testBalance()
|
||||
public function testBalance(): void
|
||||
{
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
@@ -93,7 +93,7 @@ class BoxControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\BoxController::bills
|
||||
*/
|
||||
public function testBills()
|
||||
public function testBills(): void
|
||||
{
|
||||
$billRepos = $this->mock(BillRepositoryInterface::class);
|
||||
$billRepos->shouldReceive('getBillsPaidInRange')->andReturn('0');
|
||||
@@ -107,7 +107,7 @@ class BoxControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\BoxController::netWorth()
|
||||
*/
|
||||
public function testNetWorth()
|
||||
public function testNetWorth(): void
|
||||
{
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||
@@ -124,7 +124,7 @@ class BoxControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\BoxController::netWorth()
|
||||
*/
|
||||
public function testNetWorthFuture()
|
||||
public function testNetWorthFuture(): void
|
||||
{
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||
|
||||
@@ -48,7 +48,7 @@ class ExchangeControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\ExchangeController::getRate
|
||||
*/
|
||||
public function testGetRate()
|
||||
public function testGetRate(): void
|
||||
{
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
|
||||
@@ -63,7 +63,7 @@ class ExchangeControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\ExchangeController::getRate
|
||||
*/
|
||||
public function testGetRateAmount()
|
||||
public function testGetRateAmount(): void
|
||||
{
|
||||
$repository = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$rate = factory(CurrencyExchangeRate::class)->make();
|
||||
|
||||
@@ -48,7 +48,7 @@ class FrontpageControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\FrontpageController::piggyBanks
|
||||
*/
|
||||
public function testPiggyBanks()
|
||||
public function testPiggyBanks(): void
|
||||
{
|
||||
$piggy = $this->user()->piggyBanks()->first();
|
||||
$repository = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
@@ -49,7 +49,7 @@ class IntroControllerTest extends TestCase
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::getSpecificSteps
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::hasOutroStep
|
||||
*/
|
||||
public function testGetIntroSteps()
|
||||
public function testGetIntroSteps(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('json.intro', ['index']));
|
||||
@@ -62,7 +62,7 @@ class IntroControllerTest extends TestCase
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::getSpecificSteps
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::hasOutroStep
|
||||
*/
|
||||
public function testGetIntroStepsAsset()
|
||||
public function testGetIntroStepsAsset(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('json.intro', ['accounts_create', 'asset']));
|
||||
@@ -75,7 +75,7 @@ class IntroControllerTest extends TestCase
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::getSpecificSteps
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::hasOutroStep
|
||||
*/
|
||||
public function testGetIntroStepsOutro()
|
||||
public function testGetIntroStepsOutro(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('json.intro', ['reports_report', 'category']));
|
||||
@@ -85,7 +85,7 @@ class IntroControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::postEnable
|
||||
*/
|
||||
public function testPostEnable()
|
||||
public function testPostEnable(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('json.intro.enable', ['accounts_create', 'asset']));
|
||||
@@ -95,7 +95,7 @@ class IntroControllerTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Json\IntroController::postFinished
|
||||
*/
|
||||
public function testPostFinished()
|
||||
public function testPostFinished(): void
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('json.intro.finished', ['accounts_create', 'asset']));
|
||||
|
||||
Reference in New Issue
Block a user