Skip to content

Firefly III: a personal finances manager

🤖 Auto commit for release 'develop' on 2025-08-16

JC53409240a19c7
diff --git a/app/Api/V1/Controllers/Chart/AccountController.php b/app/Api/V1/Controllers/Chart/AccountController.php
index e60ac1f877..47e37bb466 100644
--- a/app/Api/V1/Controllers/Chart/AccountController.php
+++ b/app/Api/V1/Controllers/Chart/AccountController.php
@@ -47,7 +47,7 @@ class AccountController extends Controller
use CleansChartData;
use CollectsAccountsFromFilter;
- protected array $acceptedRoles = [UserRoleEnum::READ_ONLY];
+ protected array $acceptedRoles = [UserRoleEnum::READ_ONLY];
private array $chartData = [];
private AccountRepositoryInterface $repository;
diff --git a/app/Api/V1/Controllers/Chart/BudgetController.php b/app/Api/V1/Controllers/Chart/BudgetController.php
index f3533231cc..4102693d36 100644
--- a/app/Api/V1/Controllers/Chart/BudgetController.php
+++ b/app/Api/V1/Controllers/Chart/BudgetController.php
@@ -26,7 +26,6 @@ namespace FireflyIII\Api\V1\Controllers\Chart;
use Carbon\Carbon;
use FireflyIII\Api\V1\Controllers\Controller;
-use FireflyIII\Api\V1\Requests\Data\DateRequest;
use FireflyIII\Api\V1\Requests\Data\SameDateRequest;
use FireflyIII\Enums\UserRoleEnum;
use FireflyIII\Exceptions\FireflyException;
diff --git a/app/Api/V1/Controllers/Chart/CategoryController.php b/app/Api/V1/Controllers/Chart/CategoryController.php
index 28ca50f883..2ed6299222 100644
--- a/app/Api/V1/Controllers/Chart/CategoryController.php
+++ b/app/Api/V1/Controllers/Chart/CategoryController.php
@@ -26,7 +26,6 @@ namespace FireflyIII\Api\V1\Controllers\Chart;
use Carbon\Carbon;
use FireflyIII\Api\V1\Controllers\Controller;
-use FireflyIII\Api\V1\Requests\Data\DateRequest;
use FireflyIII\Api\V1\Requests\Data\SameDateRequest;
use FireflyIII\Enums\AccountTypeEnum;
use FireflyIII\Enums\TransactionTypeEnum;
diff --git a/app/Api/V1/Controllers/Data/PurgeController.php b/app/Api/V1/Controllers/Data/PurgeController.php
index 0ba815042e..cea88fa0e6 100644
--- a/app/Api/V1/Controllers/Data/PurgeController.php
+++ b/app/Api/V1/Controllers/Data/PurgeController.php
@@ -46,6 +46,7 @@ use Illuminate\Http\JsonResponse;
class PurgeController extends Controller
{
protected array $acceptedRoles = [UserRoleEnum::FULL];
+
public function __construct()
{
parent::__construct();
diff --git a/app/Console/Commands/Integrity/ValidatesEnvironmentVariables.php b/app/Console/Commands/Integrity/ValidatesEnvironmentVariables.php
index 197bf95a5f..06ba95035a 100644
--- a/app/Console/Commands/Integrity/ValidatesEnvironmentVariables.php
+++ b/app/Console/Commands/Integrity/ValidatesEnvironmentVariables.php
@@ -42,7 +42,7 @@ class ValidatesEnvironmentVariables extends Command
*
* @var string
*/
- protected $signature = 'integrity:validates-environment-variables';
+ protected $signature = 'integrity:validates-environment-variables';
/**
* Execute the console command.
@@ -67,9 +67,9 @@ class ValidatesEnvironmentVariables extends Command
private function validateLanguage(): bool
{
- $language = config('firefly.default_language');
- $locale = config('firefly.default_locale');
- $options = array_keys(config('firefly.languages'));
+ $language = config('firefly.default_language');
+ $locale = config('firefly.default_locale');
+ $options = array_keys(config('firefly.languages'));
if (!in_array($language, $options, true)) {
$this->friendlyError(sprintf('DEFAULT_LANGUAGE "%s" is not a valid language for Firefly III.', $language));
@@ -86,6 +86,7 @@ class ValidatesEnvironmentVariables extends Command
return false;
}
+
return true;
}
@@ -96,8 +97,10 @@ class ValidatesEnvironmentVariables extends Command
$this->friendlyError(sprintf('AUTHENTICATION_GUARD "%s" is not a valid guard for Firefly III.', $guard));
$this->friendlyError('Please check your .env file and make sure you use a valid setting.');
$this->friendlyError('Valid guards are: web, remote_user_guard');
+
return false;
}
+
return true;
}
@@ -107,8 +110,10 @@ class ValidatesEnvironmentVariables extends Command
if ('' !== $token && 32 !== strlen($token)) {
$this->friendlyError('STATIC_CRON_TOKEN must be empty or a 32-character string.');
$this->friendlyError('Please check your .env file and make sure you use a valid setting.');
+
return false;
}
+
return true;
}
}
diff --git a/app/Console/Commands/System/ScansAttachments.php b/app/Console/Commands/System/ScansAttachments.php
index dc889776ff..24c6f6199b 100644
--- a/app/Console/Commands/System/ScansAttachments.php
+++ b/app/Console/Commands/System/ScansAttachments.php
@@ -34,6 +34,7 @@ use Illuminate\Support\Facades\Storage;
use Safe\Exceptions\FileinfoException;
use Safe\Exceptions\FilesystemException;
use Safe\Exceptions\StringsException;
+
use function Safe\file_put_contents;
use function Safe\md5_file;
use function Safe\mime_content_type;
@@ -45,10 +46,11 @@ class ScansAttachments extends Command
protected $description = 'Rescan all attachments and re-set the correct MD5 hash and mime.';
- protected $signature = 'firefly-iii:scan-attachments';
+ protected $signature = 'firefly-iii:scan-attachments';
/**
* Execute the console command.
+ *
* @throws FilesystemException
* @throws StringsException
* @throws FileinfoException
@@ -74,7 +76,7 @@ class ScansAttachments extends Command
Log::error(sprintf('Could not decrypt data of attachment #%d: %s', $attachment->id, $e->getMessage()));
$decryptedContent = $encryptedContent;
}
- $tempFileName = tempnam(sys_get_temp_dir(), 'FireflyIII');
+ $tempFileName = tempnam(sys_get_temp_dir(), 'FireflyIII');
file_put_contents($tempFileName, $decryptedContent);
$attachment->md5 = (string)md5_file($tempFileName);
$attachment->mime = (string)mime_content_type($tempFileName);
diff --git a/app/Helpers/Collector/GroupCollector.php b/app/Helpers/Collector/GroupCollector.php
index b402554570..59b2748730 100644
--- a/app/Helpers/Collector/GroupCollector.php
+++ b/app/Helpers/Collector/GroupCollector.php
@@ -835,8 +835,10 @@ class GroupCollector implements GroupCollectorInterface
if (count($product['transactions']) > 1) {
return $product['title'];
}
+
return 'zzz';
}
+
return 'zzz';
});
}
diff --git a/app/Support/Chart/Category/FrontpageChartGenerator.php b/app/Support/Chart/Category/FrontpageChartGenerator.php
index 14157c72d1..c27f13c686 100644
--- a/app/Support/Chart/Category/FrontpageChartGenerator.php
+++ b/app/Support/Chart/Category/FrontpageChartGenerator.php
@@ -66,16 +66,16 @@ class FrontpageChartGenerator
public function generate(): array
{
Log::debug(sprintf('Now in %s', __METHOD__));
- $categories = $this->repository->getCategories();
- $accounts = $this->accountRepos->getAccountsByType([AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value]);
- $collection = $this->collectExpensesAll($categories, $accounts);
+ $categories = $this->repository->getCategories();
+ $accounts = $this->accountRepos->getAccountsByType([AccountTypeEnum::DEBT->value, AccountTypeEnum::LOAN->value, AccountTypeEnum::MORTGAGE->value, AccountTypeEnum::ASSET->value, AccountTypeEnum::DEFAULT->value]);
+ $collection = $this->collectExpensesAll($categories, $accounts);
// collect for no-category:
- $noCategory = $this->collectNoCatExpenses($accounts);
- $collection = array_merge($collection, $noCategory);
+ $noCategory = $this->collectNoCatExpenses($accounts);
+ $collection = array_merge($collection, $noCategory);
// sort temp array by amount.
- $amounts = array_column($collection, 'sum_float');
+ $amounts = array_column($collection, 'sum_float');
array_multisort($amounts, SORT_ASC, $collection);
$currencyData = $this->createCurrencyGroups($collection);
@@ -168,6 +168,7 @@ class FrontpageChartGenerator
];
}
}
+
return $tempData;
}
}
diff --git a/app/User.php b/app/User.php
index 03976c22c3..3e2eccddf0 100644
--- a/app/User.php
+++ b/app/User.php
@@ -74,7 +74,7 @@ class User extends Authenticatable
use HasApiTokens;
use Notifiable;
use ReturnsIntegerIdTrait;
- protected $fillable = ['email', 'password', 'blocked', 'blocked_code','user_group_id'];
+ protected $fillable = ['email', 'password', 'blocked', 'blocked_code', 'user_group_id'];
protected $hidden = ['password', 'remember_token'];
protected $table = 'users';
diff --git a/composer.lock b/composer.lock
index 013ff5e6ca..f1409d757e 100644
--- a/composer.lock
+++ b/composer.lock
@@ -11771,16 +11771,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "12.3.4",
+ "version": "12.3.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "429095031bd38cb5070ca44166bd9dd5a9245dd6"
+ "reference": "f10ba5f12a256026ad3c7ee4894ffe47f60d7dc7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/429095031bd38cb5070ca44166bd9dd5a9245dd6",
- "reference": "429095031bd38cb5070ca44166bd9dd5a9245dd6",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f10ba5f12a256026ad3c7ee4894ffe47f60d7dc7",
+ "reference": "f10ba5f12a256026ad3c7ee4894ffe47f60d7dc7",
"shasum": ""
},
"require": {
@@ -11802,7 +11802,7 @@
"sebastian/cli-parser": "^4.0.0",
"sebastian/comparator": "^7.1.2",
"sebastian/diff": "^7.0.0",
- "sebastian/environment": "^8.0.2",
+ "sebastian/environment": "^8.0.3",
"sebastian/exporter": "^7.0.0",
"sebastian/global-state": "^8.0.0",
"sebastian/object-enumerator": "^7.0.0",
@@ -11848,7 +11848,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/12.3.4"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/12.3.5"
},
"funding": [
{
@@ -11872,7 +11872,7 @@
"type": "tidelift"
}
],
- "time": "2025-08-12T07:35:30+00:00"
+ "time": "2025-08-16T05:20:09+00:00"
},
{
"name": "rector/rector",
diff --git a/config/firefly.php b/config/firefly.php
index 000cb30cb6..1e3c53c73a 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -79,7 +79,7 @@ return [
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2025-08-16',
- 'build_time' => 1755317476,
+ 'build_time' => 1755365689,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 26,
diff --git a/tests/integration/Api/Autocomplete/BillControllerTest.php b/tests/integration/Api/Autocomplete/BillControllerTest.php
index c464022132..a0ae364922 100644
--- a/tests/integration/Api/Autocomplete/BillControllerTest.php
+++ b/tests/integration/Api/Autocomplete/BillControllerTest.php
@@ -28,8 +28,6 @@ use FireflyIII\Models\Bill;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
use FireflyIII\User;
-use FireflyIII\Models\UserGroup;
-use Override;
/**
* Class BillControllerTest
@@ -45,7 +43,6 @@ final class BillControllerTest extends TestCase
*/
use RefreshDatabase;
-
private function createTestBills(int $count, User $user): void
{
for ($i = 1; $i <= $count; ++$i) {
diff --git a/tests/integration/Api/Autocomplete/BudgetControllerTest.php b/tests/integration/Api/Autocomplete/BudgetControllerTest.php
index f4ccac21f8..23bc8ba048 100644
--- a/tests/integration/Api/Autocomplete/BudgetControllerTest.php
+++ b/tests/integration/Api/Autocomplete/BudgetControllerTest.php
@@ -25,11 +25,9 @@ declare(strict_types=1);
namespace Tests\integration\Api\Autocomplete;
use FireflyIII\Models\Budget;
-use FireflyIII\Models\UserGroup;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
use FireflyIII\User;
-use Override;
/**
* Class BudgetControllerTest
diff --git a/tests/integration/Api/Autocomplete/CategoryControllerTest.php b/tests/integration/Api/Autocomplete/CategoryControllerTest.php
index 2fd62f9412..b678f24bef 100644
--- a/tests/integration/Api/Autocomplete/CategoryControllerTest.php
+++ b/tests/integration/Api/Autocomplete/CategoryControllerTest.php
@@ -25,13 +25,9 @@ declare(strict_types=1);
namespace Tests\integration\Api\Autocomplete;
use FireflyIII\Models\Category;
-use FireflyIII\Models\UserRole;
use Illuminate\Foundation\Testing\RefreshDatabase;
-use Illuminate\Support\Facades\DB;
use Tests\integration\TestCase;
use FireflyIII\User;
-use FireflyIII\Models\UserGroup;
-use Override;
/**
* Class CategoryControllerTest
@@ -47,8 +43,6 @@ final class CategoryControllerTest extends TestCase
*/
use RefreshDatabase;
-
-
private function createTestCategories(int $count, User $user): void
{
for ($i = 1; $i <= $count; ++$i) {
diff --git a/tests/integration/Api/Autocomplete/CurrencyControllerTest.php b/tests/integration/Api/Autocomplete/CurrencyControllerTest.php
index 73fc6952f9..b517ec6445 100644
--- a/tests/integration/Api/Autocomplete/CurrencyControllerTest.php
+++ b/tests/integration/Api/Autocomplete/CurrencyControllerTest.php
@@ -28,8 +28,6 @@ use FireflyIII\Models\TransactionCurrency;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
use FireflyIII\User;
-use FireflyIII\Models\UserGroup;
-use Override;
/**
* Class CurrencyControllerTest
@@ -45,7 +43,6 @@ final class CurrencyControllerTest extends TestCase
*/
use RefreshDatabase;
-
private function createTestCurrencies(int $count, bool $enabled): void
{
for ($i = 1; $i <= $count; ++$i) {
diff --git a/tests/integration/Api/Autocomplete/ObjectGroupControllerTest.php b/tests/integration/Api/Autocomplete/ObjectGroupControllerTest.php
index 14f3cfbc7c..e714115793 100644
--- a/tests/integration/Api/Autocomplete/ObjectGroupControllerTest.php
+++ b/tests/integration/Api/Autocomplete/ObjectGroupControllerTest.php
@@ -28,8 +28,6 @@ use FireflyIII\Models\ObjectGroup;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
use FireflyIII\User;
-use FireflyIII\Models\UserGroup;
-use Override;
/**
* Class ObjectGroupControllerTest
diff --git a/tests/integration/Api/Autocomplete/PiggyBankControllerTest.php b/tests/integration/Api/Autocomplete/PiggyBankControllerTest.php
index 0144d0777c..ce62738b74 100644
--- a/tests/integration/Api/Autocomplete/PiggyBankControllerTest.php
+++ b/tests/integration/Api/Autocomplete/PiggyBankControllerTest.php
@@ -49,7 +49,7 @@ final class PiggyBankControllerTest extends TestCase
private function createTestPiggyBanks(int $count, User $user): void
{
- $type = AccountType::whereType(AccountTypeEnum::DEFAULT->value)->first();
+ $type = AccountType::whereType(AccountTypeEnum::DEFAULT->value)->first();
if (null === $type) {
$type = AccountType::create(['type' => AccountTypeEnum::DEFAULT->value]);
}
@@ -67,7 +67,7 @@ final class PiggyBankControllerTest extends TestCase
$piggyBank = PiggyBank::create(
[
'user_id' => $user->id,
- 'name' => 'Piggy bank ' . $i,
+ 'name' => 'Piggy bank '.$i,
'target_amount' => 1000,
'transaction_currency_id' => $currency->id,
'target_date' => now()->addDays(30),
@@ -78,7 +78,7 @@ final class PiggyBankControllerTest extends TestCase
$account = Account::create(
[
'user_id' => $user->id,
- 'name' => 'Account ' . $i,
+ 'name' => 'Account '.$i,
'user_group_id' => $user->user_group_id,
'account_type_id' => $type->id,
'active' => 1,
@@ -100,7 +100,7 @@ final class PiggyBankControllerTest extends TestCase
public function testGivenAuthenticatedRequestWhenCallingTheBudgetsEndpointThenReturns200HttpCode(): void
{
// act as a user
- $user = $this->createAuthenticatedUser();
+ $user = $this->createAuthenticatedUser();
$this->actingAs($user);
$response = $this->get(route('api.v1.autocomplete.piggy-banks'), ['Accept' => 'application/json']);
@@ -111,7 +111,7 @@ final class PiggyBankControllerTest extends TestCase
public function testGivenAuthenticatedRequestWhenCallingTheBudgetsEndpointThenReturnsBudgets(): void
{
- $user = $this->createAuthenticatedUser();
+ $user = $this->createAuthenticatedUser();
$this->actingAs($user);
$this->createTestPiggyBanks(5, $user);
@@ -121,23 +121,23 @@ final class PiggyBankControllerTest extends TestCase
$response->assertJsonCount(5);
$response->assertJsonFragment(['name' => 'Piggy bank 1']);
$response->assertJsonStructure([
- '*' => [
- 'id',
- 'name',
- ],
- ]);
+ '*' => [
+ 'id',
+ 'name',
+ ],
+ ]);
}
public function testGivenAuthenticatedRequestWhenCallingTheBudgetsEndpointWithQueryThenReturnsBudgetsWithLimit(): void
{
- $user = $this->createAuthenticatedUser();
+ $user = $this->createAuthenticatedUser();
$this->actingAs($user);
$this->createTestPiggyBanks(5, $user);
$response = $this->get(route('api.v1.autocomplete.piggy-banks', [
'query' => 'Piggy',
'limit' => 3,
- ]), ['Accept' => 'application/json']);
+ ]), ['Accept' => 'application/json']);
$response->assertStatus(200);
$response->assertHeader('Content-Type', 'application/json');
@@ -146,14 +146,14 @@ final class PiggyBankControllerTest extends TestCase
public function testGivenAuthenticatedRequestWhenCallingTheBudgetsEndpointWithQueryThenReturnsBudgetsThatMatchQuery(): void
{
- $user = $this->createAuthenticatedUser();
+ $user = $this->createAuthenticatedUser();
$this->actingAs($user);
$this->createTestPiggyBanks(20, $user);
$response = $this->get(route('api.v1.autocomplete.piggy-banks', [
'query' => 'Piggy bank 1',
'limit' => 20,
- ]), ['Accept' => 'application/json']);
+ ]), ['Accept' => 'application/json']);
$response->assertStatus(200);
$response->assertHeader('Content-Type', 'application/json');
diff --git a/tests/integration/Api/Chart/AccountControllerTest.php b/tests/integration/Api/Chart/AccountControllerTest.php
index 5049ad5414..067f347ef8 100644
--- a/tests/integration/Api/Chart/AccountControllerTest.php
+++ b/tests/integration/Api/Chart/AccountControllerTest.php
@@ -1,11 +1,18 @@
<?php
+declare(strict_types=1);
+
namespace Tests\integration\Api\Chart;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
-class AccountControllerTest extends TestCase
+/**
+ * @internal
+ *
+ * @coversNothing
+ */
+final class AccountControllerTest extends TestCase
{
use RefreshDatabase;
private $user;
@@ -28,14 +35,15 @@ class AccountControllerTest extends TestCase
$response->assertStatus(422);
}
+
public function testGetOverviewChart(): void
{
$this->actingAs($this->user);
- $params = [
+ $params = [
'start' => '2024-01-01',
'end' => '2024-01-31',
];
- $response = $this->getJson(route('api.v1.chart.account.overview') . '?' . http_build_query($params));
+ $response = $this->getJson(route('api.v1.chart.account.overview').'?'.http_build_query($params));
$response->assertStatus(200);
}
diff --git a/tests/integration/Api/Chart/BalanceControllerTest.php b/tests/integration/Api/Chart/BalanceControllerTest.php
index ab43528f91..69f0fa9785 100644
--- a/tests/integration/Api/Chart/BalanceControllerTest.php
+++ b/tests/integration/Api/Chart/BalanceControllerTest.php
@@ -1,11 +1,18 @@
<?php
+declare(strict_types=1);
+
namespace Tests\integration\Api\Chart;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
-class BalanceControllerTest extends TestCase
+/**
+ * @internal
+ *
+ * @coversNothing
+ */
+final class BalanceControllerTest extends TestCase
{
use RefreshDatabase;
private $user;
@@ -28,14 +35,15 @@ class BalanceControllerTest extends TestCase
$response->assertStatus(422);
}
+
public function testGetOverviewChart(): void
{
$this->actingAs($this->user);
- $params = [
+ $params = [
'start' => '2024-01-01',
'end' => '2024-01-31',
];
- $response = $this->getJson(route('api.v1.chart.balance.balance') . '?' . http_build_query($params));
+ $response = $this->getJson(route('api.v1.chart.balance.balance').'?'.http_build_query($params));
$response->assertStatus(200);
}
diff --git a/tests/integration/Api/Chart/BudgetControllerTest.php b/tests/integration/Api/Chart/BudgetControllerTest.php
index 07d5f31666..a9457e3822 100644
--- a/tests/integration/Api/Chart/BudgetControllerTest.php
+++ b/tests/integration/Api/Chart/BudgetControllerTest.php
@@ -1,11 +1,18 @@
<?php
+declare(strict_types=1);
+
namespace Tests\integration\Api\Chart;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
-class BudgetControllerTest extends TestCase
+/**
+ * @internal
+ *
+ * @coversNothing
+ */
+final class BudgetControllerTest extends TestCase
{
use RefreshDatabase;
private $user;
@@ -28,14 +35,15 @@ class BudgetControllerTest extends TestCase
$response->assertStatus(422);
}
+
public function testGetOverviewChart(): void
{
$this->actingAs($this->user);
- $params = [
+ $params = [
'start' => '2024-01-01',
'end' => '2024-01-31',
];
- $response = $this->getJson(route('api.v1.chart.budget.overview') . '?' . http_build_query($params));
+ $response = $this->getJson(route('api.v1.chart.budget.overview').'?'.http_build_query($params));
$response->assertStatus(200);
}
diff --git a/tests/integration/Api/Chart/CategoryControllerTest.php b/tests/integration/Api/Chart/CategoryControllerTest.php
index aee7f2daf0..7aa7f8ce0b 100644
--- a/tests/integration/Api/Chart/CategoryControllerTest.php
+++ b/tests/integration/Api/Chart/CategoryControllerTest.php
@@ -1,11 +1,18 @@
<?php
+declare(strict_types=1);
+
namespace Tests\integration\Api\Chart;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\integration\TestCase;
-class CategoryControllerTest extends TestCase
+/**
+ * @internal
+ *
+ * @coversNothing
+ */
+final class CategoryControllerTest extends TestCase
{
use RefreshDatabase;
private $user;
@@ -28,14 +35,15 @@ class CategoryControllerTest extends TestCase
$response->assertStatus(422);
}
+
public function testGetOverviewChart(): void
{
$this->actingAs($this->user);
- $params = [
+ $params = [
'start' => '2024-01-01',
'end' => '2024-01-31',
];
- $response = $this->getJson(route('api.v1.chart.category.overview') . '?' . http_build_query($params));
+ $response = $this->getJson(route('api.v1.chart.category.overview').'?'.http_build_query($params));
$response->assertStatus(200);
}
diff --git a/tests/integration/TestCase.php b/tests/integration/TestCase.php
index ec86a0dbce..e1b42991b2 100644
--- a/tests/integration/TestCase.php
+++ b/tests/integration/TestCase.php
@@ -41,7 +41,7 @@ abstract class TestCase extends BaseTestCase
use RefreshDatabase;
protected const MAX_ITERATIONS = 2;
- protected $seed = true;
+ protected $seed = true;
public function dateRangeProvider(): array
{
@@ -66,10 +66,10 @@ abstract class TestCase extends BaseTestCase
$group = UserGroup::create(['title' => '[email protected]']);
$role = UserRole::where('title', 'owner')->first();
$user = User::create([
- 'email' => '[email protected]',
- 'password' => 'password',
- 'user_group_id' => $group->id,
- ]);
+ 'email' => '[email protected]',
+ 'password' => 'password',
+ 'user_group_id' => $group->id,
+ ]);
GroupMembership::create(
[
@@ -82,6 +82,4 @@ abstract class TestCase extends BaseTestCase
return $user;
}
-
-
}