PHPackages                             alebatistella/duskapiconf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. alebatistella/duskapiconf

ActiveLibrary[Testing &amp; Quality](/categories/testing)

alebatistella/duskapiconf
=========================

Change your Laravel configuration for each Dusk test with an easy API

v1.2.5(2y ago)597.5k↑65.8%1[2 PRs](https://github.com/AlexandreBellas/duskapiconf/pulls)4mitPHPPHP ^8.0

Since Jul 7Pushed 2y agoCompare

[ Source](https://github.com/AlexandreBellas/duskapiconf)[ Packagist](https://packagist.org/packages/alebatistella/duskapiconf)[ RSS](/packages/alebatistella-duskapiconf/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)DependenciesVersions (12)Used By (4)

Dusk API configuration
======================

[](#dusk-api-configuration)

A Laravel module to perform live configuration changes from your Dusk tests. Forked from [Manyapp DuskApiConf repository](https://github.com/manyapp/duskapiconf).

The issue
---------

[](#the-issue)

Currently, the only way to define the configuration of your Laravel app during Dusk tests is to set the relevant variables in a dedicated `.env.dusk.local`file. This file is copied and read during the application's boot, and therefore cannot be changed within Dusk tests.

This behavior can be problematic, as a lot of developers need to change the configuration in specific tests to see if the application reacts accordingly.

As mentioned [here](https://github.com/laravel/dusk/issues/599), there is no easy way to tackle this problem.

The solution
------------

[](#the-solution)

This modules offers an easy possibility to change the configuration of your application during the runtime of your Dusk tests.

It works by making available a hidden API route to register the configuration in a temporary file, which is read on the further requests from the dusk tests.

Installation
------------

[](#installation)

```
composer require alebatistella/duskapiconf --dev

```

You will have to add the trait to your `DustTestCase.php` as shown:

```
