assertTrue($response->isSuccessful()); } public function testCanConstructAlertFromResponse() { $response = new GetAlertResponse(200, [ 'data' => [ 'entity' => 'entity', 'alias' => 'alias', 'message' => 'message', 'source' => 'source', 'priority' => 'P1', 'tags' => ["1","2","3"], 'description' => "foo mag bar", 'responders' => [ ['id' => 1, 'type' => 'foo'], ['id' => 2, 'type' => 'ba'] ] ] ]); $this->assertInstanceOf(Alert::class, $response->getAlert()); } public function testNoAlertIsConstructedWhenNoData() { $response = new GetAlertResponse(200, []); $this->assertNull($response->getAlert()); } }