$summit_id, ]; $data = [ 'type' => \models\summit\ISummitMetricType::General, ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, "CONTENT_TYPE" => "application/json", 'REMOTE_ADDR' => '10.1.0.1', 'HTTP_REFERER' => 'https://www.test.com' ]; $response = $this->action( "PUT", "OAuth2SummitMetricsApiController@enter", $params, [], [], [], $headers, json_encode($data) ); $content = $response->getContent(); $this->assertResponseStatus(201); $metric = json_decode($content); $this->assertTrue(!is_null($metric)); return $metric; } /** * @param int $summit_id * @return mixed */ public function testEnterEvent($summit_id = 18, $event_id = 706){ $params = [ 'id' => $summit_id, 'event_id' => $event_id, 'member_id' => 'me' ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, "CONTENT_TYPE" => "application/json", 'REMOTE_ADDR' => '10.1.0.1', 'HTTP_REFERER' => 'https://www.test.com' ]; $response = $this->action( "PUT", "OAuth2SummitMetricsApiController@enterToEvent", $params, [], [], [], $headers ); $content = $response->getContent(); $this->assertResponseStatus(201); $metric = json_decode($content); $this->assertTrue(!is_null($metric)); return $metric; } }