$summit_id, ]; $data = [ 'qr_code' => "BADGE_REGISTRATIONDEVSUMMIT2019|REGISTRATIONDEVSUMMIT2019_TICKET_5D7BE0E518E8C161661586|santipalenque@gmail.com|Santiago, Palenque", "scan_date" => 1572019200, ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, "CONTENT_TYPE" => "application/json" ]; $response = $this->action( "POST", "OAuth2SummitBadgeScanApiController@add", $params, [], [], [], $headers, json_encode($data) ); $content = $response->getContent(); $this->assertResponseStatus(201); $scan = json_decode($content); $this->assertTrue(!is_null($scan)); return $scan; } /** * @param int $summit_id * @return mixed */ public function testGetAllMyBadgeScans($summit_id = 1){ $params = [ 'id' => $summit_id, 'filter'=> 'attendee_email=@santi', 'expand' => 'sponsor,badge,badge.ticket,badge.ticket.owner' ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, "CONTENT_TYPE" => "application/json" ]; $response = $this->action( "GET", "OAuth2SummitBadgeScanApiController@getAllMyBadgeScans", $params, [], [], [], $headers ); $content = $response->getContent(); $this->assertResponseStatus(200); $data = json_decode($content); $this->assertTrue(!is_null($data)); return $data; } }