From e3b52bf90112f423f1a0fb99b6507040ac2404ff Mon Sep 17 00:00:00 2001 From: philipp lang Date: Fri, 30 Aug 2024 21:06:16 +0200 Subject: [PATCH] Fixed tests --- tests/Feature/Member/EditTest.php | 7 +++++++ tests/Feature/Member/ShowTest.php | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Member/EditTest.php b/tests/Feature/Member/EditTest.php index 612413f0..7ebdf4cb 100644 --- a/tests/Feature/Member/EditTest.php +++ b/tests/Feature/Member/EditTest.php @@ -3,6 +3,7 @@ namespace Tests\Feature\Member; use App\Activity; +use App\Country; use App\Member\Member; use App\Subactivity; use Illuminate\Foundation\Testing\DatabaseTransactions; @@ -12,6 +13,12 @@ class EditTest extends TestCase { use DatabaseTransactions; + public function setUp(): void + { + parent::setUp(); + Country::factory()->create(['name' => 'Deutschland']); + } + public function testItDisplaysEditPage(): void { $this->withoutExceptionHandling(); diff --git a/tests/Feature/Member/ShowTest.php b/tests/Feature/Member/ShowTest.php index 682ac205..7be28c6d 100644 --- a/tests/Feature/Member/ShowTest.php +++ b/tests/Feature/Member/ShowTest.php @@ -2,9 +2,9 @@ namespace Tests\Feature\Member; +use App\Country; use App\Course\Models\Course; use App\Course\Models\CourseMember; -use App\Fee; use App\Gender; use App\Group; use App\Invoice\Models\Invoice; @@ -12,19 +12,23 @@ use App\Invoice\Models\InvoicePosition; use App\Member\Member; use App\Member\Membership; use App\Nationality; -use App\Payment\Payment; use App\Payment\Subscription; use App\Region; use Carbon\Carbon; use Generator; use Illuminate\Foundation\Testing\DatabaseTransactions; -use Tests\RequestFactories\Child; use Tests\TestCase; class ShowTest extends TestCase { use DatabaseTransactions; + public function setUp(): void + { + parent::setUp(); + Country::factory()->create(['name' => 'Deutschland']); + } + public function testItShowsSingleMember(): void { Carbon::setTestNow(Carbon::parse('2006-01-01 15:00:00'));