toArray()['context']; $this->assertArrayHasKey('exception', $context); $this->assertSame($sql, $context['exception']['raw_sql']); } /** @test */ public function it_wont_add_query_information_without_a_query_exception() { $report = Flare::createReport(new Exception()); $context = $report->toArray()['context']; $this->assertArrayNotHasKey('exception', $context); } }