Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix various tests.
James Cole1637190c273d
diff --git a/app/Http/Requests/RuleGroupFormRequest.php b/app/Http/Requests/RuleGroupFormRequest.phpindex b5917242d7..7d2250882f 100644--- a/app/Http/Requests/RuleGroupFormRequest.php+++ b/app/Http/Requests/RuleGroupFormRequest.php@@ -50,7 +50,6 @@ class RuleGroupFormRequest extends Request{/** @var RuleGroupRepositoryInterface $repository */$repository = app(RuleGroupRepositoryInterface::class);- $repository->setUser(auth()->user());$titleRule = 'required|between:1,100|uniqueObjectForUser:rule_groups,title';if (!is_null($repository->find(intval($this->get('id')))->id)) {$titleRule = 'required|between:1,100|uniqueObjectForUser:rule_groups,title,' . intval($this->get('id'));diff --git a/tests/Feature/Controllers/ProfileControllerTest.php b/tests/Feature/Controllers/ProfileControllerTest.phpindex 20fce4f183..196d4124a6 100644--- a/tests/Feature/Controllers/ProfileControllerTest.php+++ b/tests/Feature/Controllers/ProfileControllerTest.php@@ -11,6 +11,7 @@ declare(strict_types = 1);namespace Tests\Feature\Controllers;+use FireflyIII\Repositories\User\UserRepositoryInterface;use Tests\TestCase;class ProfileControllerTest extends TestCasediff --git a/tests/Feature/Controllers/RuleControllerTest.php b/tests/Feature/Controllers/RuleControllerTest.phpindex 29d3bbbed6..f25f2b0999 100644--- a/tests/Feature/Controllers/RuleControllerTest.php+++ b/tests/Feature/Controllers/RuleControllerTest.php@@ -11,6 +11,8 @@ declare(strict_types = 1);namespace Tests\Feature\Controllers;+use FireflyIII\Models\Rule;+use FireflyIII\Repositories\Rule\RuleRepositoryInterface;use Tests\TestCase;class RuleControllerTest extends TestCasediff --git a/tests/Feature/Controllers/RuleGroupControllerTest.php b/tests/Feature/Controllers/RuleGroupControllerTest.phpindex 70494e8034..740c5f332f 100644--- a/tests/Feature/Controllers/RuleGroupControllerTest.php+++ b/tests/Feature/Controllers/RuleGroupControllerTest.php@@ -11,6 +11,9 @@ declare(strict_types = 1);namespace Tests\Feature\Controllers;+use Carbon\Carbon;+use FireflyIII\Models\RuleGroup;+use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;use Tests\TestCase;class RuleGroupControllerTest extends TestCasediff --git a/tests/Feature/Controllers/SearchControllerTest.php b/tests/Feature/Controllers/SearchControllerTest.phpindex 23dfe78cd6..1c53646475 100644--- a/tests/Feature/Controllers/SearchControllerTest.php+++ b/tests/Feature/Controllers/SearchControllerTest.php@@ -11,6 +11,8 @@ declare(strict_types = 1);namespace Tests\Feature\Controllers;+use FireflyIII\Support\Search\SearchInterface;+use Illuminate\Support\Collection;use Tests\TestCase;class SearchControllerTest extends TestCasediff --git a/tests/Feature/Controllers/TagControllerTest.php b/tests/Feature/Controllers/TagControllerTest.phpindex 4d4155c827..317278a94b 100644--- a/tests/Feature/Controllers/TagControllerTest.php+++ b/tests/Feature/Controllers/TagControllerTest.php@@ -11,6 +11,8 @@ declare(strict_types = 1);namespace Tests\Feature\Controllers;+use FireflyIII\Models\Tag;+use FireflyIII\Repositories\Tag\TagRepositoryInterface;use Tests\TestCase;class TagControllerTest extends TestCase