fetches([['id' => 788, 'descriptor' => 'abc']]); $courses = Nami::login(12345, 'secret')->courses(); $this->assertCount(1, $courses); $this->assertEquals(788, $courses->first()->id); $this->assertEquals('abc', $courses->first()->name); } public function test_throw_exception_when_baustein_fetching_fails(): void { $this->expectException(NamiException::class); Auth::success(12345, 'secret'); app(BausteinFake::class)->failsToFetch(); Nami::login(12345, 'secret')->courses(); } }