withoutMiddleware( ThrottleRequests::class ); $this->makeTestData(); Session::start(); $this->faker = \Faker\Factory::create(); Model::reguard(); $this->withoutMiddleware( ThrottleRequests::class ); } public function testShowTemplate() { $data = [ 'body' => $this->faker->firstName, 'subject' => $this->faker->firstName, ]; $response = $this->withHeaders([ 'X-API-SECRET' => config('ninja.api_secret'), 'X-API-TOKEN' => $this->token ])->post('/api/v1/templates', $data); $response->assertStatus(200); } }