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 testThrowExceptionWhenBausteinFetchingFails(): void { $this->expectException(NotSuccessfulException::class); Auth::success('12345', 'secret'); app(BausteinFake::class)->failsToFetch(); Nami::login('12345', 'secret')->courses(); } }