The route function generates a URL for a given named route:
<?php $url = route('route.name');
<?php         $this->app['env'] = 'local';

        $this->app['config']->set('app.debug', true);



        $this->postJson(route('ignition.executeSolution'), $this->solutionPayload())

            ->assertSuccessful();

    }
<?php         $this->app['env'] = 'production';

        $this->app['config']->set('app.debug', true);



        $this->postJson(route('ignition.executeSolution'), $this->solutionPayload())

            ->assertForbidden();

    }
<?php         $this->app['env'] = 'local';

        $this->app['config']->set('app.debug', false);



        $this->postJson(route('ignition.executeSolution'), $this->solutionPayload())

            ->assertNotFound();

    }
<?php         $this->app['config']->set('app.debug', true);

        $this->withServerVariables(['REMOTE_ADDR' => '138.197.187.74']);



        $this->postJson(route('ignition.executeSolution'), $this->solutionPayload())

            ->assertForbidden();

    }