seedDefaultEmailFlowEvents(); } protected function tearDown() { self::clearTestData(); parent::tearDown(); } public function testIngestInvitationsAndGet(){ $csv_content = << self::$summit->getId(), ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, ]; $response = $this->action( "POST", "OAuth2SummitRegistrationInvitationApiController@ingestInvitations", $params, [], [], [ 'file' => $file ], $headers ); $content = $response->getContent(); $this->assertResponseStatus(200); $params = [ 'summit_id' => self::$summit->getId(), 'filter'=> 'is_accepted==true' ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, ]; $response = $this->action( "GET", "OAuth2SummitRegistrationInvitationApiController@getAllBySummit", $params, [], [], [ ], $headers ); $content = $response->getContent(); $this->assertResponseStatus(200); } public function testIngestInvitationsAndGetCSV(){ $csv_content = << self::$summit->getId(), ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, ]; $response = $this->action( "POST", "OAuth2SummitRegistrationInvitationApiController@ingestInvitations", $params, [], [], [ 'file' => $file ], $headers ); $content = $response->getContent(); $this->assertResponseStatus(200); $params = [ 'summit_id' => self::$summit->getId(), 'filter'=> 'is_accepted==false' ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, ]; $response = $this->action( "GET", "OAuth2SummitRegistrationInvitationApiController@getAllBySummitCSV", $params, [], [], [ ], $headers ); $content = $response->getContent(); $this->assertResponseStatus(200); $this->assertTrue(!empty($content)); } public function testIngestInvitationsAndResend(){ $csv_content = << self::$summit->getId(), ]; $headers = [ "HTTP_Authorization" => " Bearer " . $this->access_token, ]; $response = $this->action( "POST", "OAuth2SummitRegistrationInvitationApiController@ingestInvitations", $params, [], [], [ 'file' => $file ], $headers ); $content = $response->getContent(); $this->assertResponseStatus(200); $response = $this->action( "PUT", "OAuth2SummitRegistrationInvitationApiController@resendNonAccepted", $params, [], [], [], $headers ); $content = $response->getContent(); $this->assertResponseStatus(200); } }