From 1637190c273d8954a3c1a91a9b0a1fe69f3c9f5b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 12 Feb 2017 13:15:23 +0100 Subject: [PATCH] Fix various tests. --- app/Http/Requests/RuleGroupFormRequest.php | 1 - tests/Feature/Controllers/ProfileControllerTest.php | 1 + tests/Feature/Controllers/RuleControllerTest.php | 2 ++ tests/Feature/Controllers/RuleGroupControllerTest.php | 3 +++ tests/Feature/Controllers/SearchControllerTest.php | 2 ++ tests/Feature/Controllers/TagControllerTest.php | 2 ++ 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/RuleGroupFormRequest.php b/app/Http/Requests/RuleGroupFormRequest.php index 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.php index 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 TestCase diff --git a/tests/Feature/Controllers/RuleControllerTest.php b/tests/Feature/Controllers/RuleControllerTest.php index 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 TestCase diff --git a/tests/Feature/Controllers/RuleGroupControllerTest.php b/tests/Feature/Controllers/RuleGroupControllerTest.php index 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 TestCase diff --git a/tests/Feature/Controllers/SearchControllerTest.php b/tests/Feature/Controllers/SearchControllerTest.php index 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 TestCase diff --git a/tests/Feature/Controllers/TagControllerTest.php b/tests/Feature/Controllers/TagControllerTest.php index 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