PHP code example of stateforge / scenario-laravel
1. Go to this page and download the library: Download stateforge/scenario-laravel library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
stateforge / scenario-laravel example snippets
use Stateforge\Scenario\Core\Attribute\ApplyScenario;
#[ApplyScenario('my-scenario')]
final class MyTest extends TestCase
{
#[ApplyScenario('my-second-scenario')]
public function testSomethingImportant(): void
{
// scenario has already been applied, data can be tested
}
}
config('scenario.allowed_envs');
bash
php artisan scenario:install
bash
php artisan list scenario