From fbb9c5fc8fd734185c1f506416db4759550d87a2 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Tue, 15 Mar 2022 12:03:00 +0100 Subject: [PATCH] Fixed initialize test --- tests/Feature/Initialize/InitializeTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/Feature/Initialize/InitializeTest.php b/tests/Feature/Initialize/InitializeTest.php index 1ebc1720..48d3d1d2 100644 --- a/tests/Feature/Initialize/InitializeTest.php +++ b/tests/Feature/Initialize/InitializeTest.php @@ -26,7 +26,9 @@ class InitializeTest extends TestCase public function initializeProvider(callable $callback = null): void { - app(GroupFake::class)->fetches(null, [1000 => ['name' => 'testgroup']]); + app(GroupFake::class) + ->fetches(null, [1000 => ['name' => 'testgroup']]) + ->fetches(1000, []); $backend = app(FakeBackend::class) ->addSearch(123, ['entries_vorname' => '::firstname::', 'entries_nachname' => '::lastname::', 'entries_gruppierungId' => 1000]) ->fakeNationalities([['name' => 'deutsch', 'id' => 291]]) @@ -105,7 +107,7 @@ class InitializeTest extends TestCase 'name' => '1a', 'nami_id' => 506, ]); - $this->assertDatabaseHas('groups', ['nami_id' => 1000, 'name' => '::group::']); + $this->assertDatabaseHas('groups', ['nami_id' => 1000, 'name' => 'testgroup']); $this->assertDatabaseHas('members', [ 'nami_id' => 411, 'gender_id' => Gender::nami(303)->id, @@ -119,7 +121,7 @@ class InitializeTest extends TestCase ]); $this->assertEquals([306], Activity::where('nami_id', 305)->firstOrFail()->subactivities()->pluck('nami_id')->toArray()); - Http::assertSentCount(15); + Http::assertSentCount(17); } public function testItInitializesFromCommandLine(): void