$summit_id, ]; $name = str_random(16).'_selection_plan'; $data = [ 'name' => $name, 'is_enabled' => true ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, "CONTENT_TYPE" => "application/json" ]; $response = $this->action( "POST", "OAuth2SummitSelectionPlansApiController@addSelectionPlan", $params, [], [], [], $headers, json_encode($data) ); $content = $response->getContent(); $this->assertResponseStatus(201); $selection_plan = json_decode($content); $this->assertTrue(!is_null($selection_plan)); $this->assertEquals($name, $selection_plan->name); return $selection_plan; } }