$summit_id, ]; $title = str_random(16).'_presentation'; $data = [ 'title' => $title, 'description' => 'this is a description', 'social_description' => 'this is a social description', 'level' => 'N/A', 'attendees_expected_learnt' => 'super duper', 'type_id' => 171, 'track_id' => 248, 'attending_media' => true, 'links' => ['https://www.google.com'], 'extra_questions' => [ [ 'id' => 24, 'value' => 'test', ] ] ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, "CONTENT_TYPE" => "application/json" ]; $response = $this->action( "POST", "OAuth2PresentationApiController@submitPresentation", $params, [], [], [], $headers, json_encode($data) ); $content = $response->getContent(); $this->assertResponseStatus(201); $presentation = json_decode($content); $this->assertTrue(!is_null($presentation)); $this->assertEquals($title, $presentation->title); return $presentation; } }