### Scaffold package with workbench:install Source: https://packages.tools/testbench Run this command to scaffold your package with the recommended Testbench setup. ```bash vendor/bin/testbench workbench:install ``` -------------------------------- ### Install Testbench Dusk Source: https://packages.tools/testbench-dusk Install the Testbench Dusk package as a development dependency. ```bash composer require --dev "orchestra/testbench-dusk" ``` -------------------------------- ### Run testbench passport:install Source: https://packages.tools/testbench/cli Installs Passport on the stub Laravel application, setting up the testing environment. ```bash vendor/bin/testbench passport:install ``` -------------------------------- ### Overriding setUp() method Source: https://packages.tools/testbench/the-basic When overriding setUp, ensure you call parent::setUp() and maintain proper declaration compatibility. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Setup the test environment. */ protected function setUp(): void { // Code before application created. $this->afterApplicationCreated(function () { // Code after application created. }); $this->beforeApplicationDestroyed(function () { // Code before application destroyed. }); parent::setUp(); } } ``` -------------------------------- ### Install Testbench via Composer Source: https://packages.tools/testbench Run this command to install Testbench as a dev dependency for your Laravel package. ```bash composer require --dev "orchestra/testbench" ``` -------------------------------- ### Installing Collision Source: https://packages.tools/testbench/integrations Add the Collision package to your development dependencies using Composer. ```bash composer require --dev "nunomaduro/collision" ``` -------------------------------- ### Modify served app config with beforeServingApplication() Source: https://packages.tools/testbench-dusk/the-basic Apply configuration changes to the served application instance before it starts. Use beforeServingApplication() with a closure to modify the config (e.g., set mail.default to 'log') for a single test. Note that changes made in the TestCase are not applied to the served instance unless you use this method. ```php use Laravel\Dusk\Browser; use PHPUnit\Framework\Attributes\Test; // ... #[Test] public function it_can_send_email() { $this->beforeServingApplication(function ($app, $config) { $config->set('mail.default', 'log'); }); $this->browse(function (Browser $browser) { }); } ``` -------------------------------- ### Chrome version error message Source: https://packages.tools/testbench-dusk/troubleshooting Example of the SessionNotCreatedException error indicating a mismatch between the installed Chrome version and the driver. ```text Facebook\WebDriver\Exception\SessionNotCreatedException: session not created: Chrome version must be between 70 and 73 ``` -------------------------------- ### Install guzzlehttp/guzzle for Laravel 7 HTTP Client Source: https://packages.tools/testbench/troubleshooting Adds the Guzzle HTTP client dependency required by Laravel 7's HTTP Client when developing packages with Testbench. Run this in your package's root directory. ```bash composer require "guzzlehttp/guzzle" ``` -------------------------------- ### Require laravel/legacy-factories for legacy factories Source: https://packages.tools/testbench/troubleshooting Installs the legacy factories package to support Laravel 8 and below without splitting your package. Requires PHP 7.3 or higher and a minimum orchestra/testbench version per the table. ```bash composer require --dev "laravel/legacy-factories:^1.0.4" ``` -------------------------------- ### Using Spatie Ray in Tests Source: https://packages.tools/testbench/integrations Use the ray() helper function within your PHPUnit tests to debug responses starting from Testbench 6.10. ```php use PHPUnit\Framework\Attributes\Test; #[Test] public function it_can_resolve_domain_route() { /** @var \Illuminate\Testing\TestResponse $response */ $response = $this->get('http://api.localhost/hello'); ray($response); } ``` -------------------------------- ### Update ChromeDriver via dusk-updater Source: https://packages.tools/testbench-dusk/troubleshooting Command to update the ChromeDriver to match the installed Chrome version. ```bash vendor/bin/dusk-updater update ``` -------------------------------- ### Detect and auto-update ChromeDriver Source: https://packages.tools/testbench-dusk/troubleshooting Command to detect the installed ChromeDriver and automatically update it if necessary. ```bash vendor/bin/dusk-updater detect --auto-update ``` -------------------------------- ### Composer requirement for orchestra/testbench with legacy factories Source: https://packages.tools/testbench/troubleshooting Example composer.json requirement for supporting Laravel 5.6 and above with legacy factories. The version constraint covers the minimum orchestra/testbench versions listed in the table. ```json { "require-dev": { "orchestra/testbench": "~3.6.7 || ~3.7.8 || ~3.8.6 || ^4.8 || ^5.2 || ^6.0" } } ``` -------------------------------- ### Fallback Method getEnvironmentSetup() Source: https://packages.tools/testbench/the-basic/environment Use the getEnvironmentSetup method for backward compatibility. ```php /** * Define environment setup. * * @param \Illuminate\Foundation\Application $app * @return void */ protected function getEnvironmentSetup($app) { // } ``` -------------------------------- ### Define Environment with defineEnvironment() Source: https://packages.tools/testbench/the-basic/environment Use the defineEnvironment method to add configurations during the application bootstrapping process. ```php use Illuminate\Contracts\Config\Repository; class TestCase extends \Orchestra\Testbench\TestCase { /** * Define environment setup. * * @param \Illuminate\Foundation\Application $app * @return void */ protected function defineEnvironment($app) { // Setup default database to use sqlite :memory: tap($app['config'], function (Repository $config) { $config->set('database.default', 'testbench'); $config->set('database.connections.testbench', [ 'driver' => 'sqlite', 'database' => ':memory:', 'prefix' => '', ]); // Setup queue database connections. $config([ 'queue.batching.database' => 'testbench', 'queue.failed.database' => 'testbench', ]); }); } } ``` -------------------------------- ### Create SQLite database with testbench Source: https://packages.tools/testbench/cli Creates database/database.sqlite on the package's Laravel skeleton. ```bash vendor/bin/testbench package:create-sqlite-db ``` -------------------------------- ### Set database.default to testing using WithConfig attribute Source: https://packages.tools/testbench/the-basic/databases Use the WithConfig attribute to set the database.default configuration to 'testing'. ```php use Orchestra\Testbench\Attributes\WithConfig; #[WithConfig('database.default', 'testing')] class TestCase extends \Orchestra\Testbench\TestCase { // } ``` -------------------------------- ### Implement defineRoutes() method Source: https://packages.tools/testbench/the-basic/routes Use the defineRoutes() method to add routes early in the application bootstrapping process, between registering and booting service providers. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Define routes setup. * * @param \Illuminate\Routing\Router $router * @return void */ protected function defineRoutes($router) { // Define routes. } } ``` -------------------------------- ### Set database.default to testing in defineEnvironment() Source: https://packages.tools/testbench/the-basic/databases Explicitly set the default database connection to 'testing' in the defineEnvironment() method. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Define environment setup. * * @param \Illuminate\Foundation\Application $app * @return void */ protected function defineEnvironment($app) { $app['config']->set('database.default', 'testing'); } } ``` -------------------------------- ### Create SQLite database with testbench-dusk package:create-sqlite-db Source: https://packages.tools/testbench-dusk/the-basic Create the SQLite database file required for using SQLite with Testbench Dusk. Run this command before running tests that use the sqlite connection. ```bash vendor/bin/testbench-dusk package:create-sqlite-db ``` -------------------------------- ### Run testbench migrate Source: https://packages.tools/testbench/cli Runs the migrate command on the stub Laravel application, useful for seeding the database before running phpunit. ```bash vendor/bin/testbench migrate ``` -------------------------------- ### Load testing migrations from workbench_path() Source: https://packages.tools/testbench/the-basic/databases Load testing-only migrations from the workbench/database/migrations directory using workbench_path() in defineDatabaseMigrations(). ```php use function Orchestra\Testbench\workbench_path; class TestCase extends \Orchestra\Testbench\TestCase { /** * Define database migrations. * * @return void */ protected function defineDatabaseMigrations() { $this->loadMigrationsFrom( workbench_path('database/migrations') ); } } ``` -------------------------------- ### Customize Testbench Dusk host and port with $baseServeHost and $baseServePort Source: https://packages.tools/testbench-dusk/the-basic Override the default host and port (http://127.0.0.1:8001) by setting the protected static properties $baseServeHost and $baseServePort in your DuskTestCase class. Use this when you need to run the test server on a different address or port. ```php class DuskTestCase extends \Orchestra\Testbench\Dusk\TestCase { /** * The base serve host URL to use while testing the application. * * @var string */ protected static $baseServeHost = '127.0.0.1'; /** * The base serve port to use while testing the application. * * @var int */ protected static $baseServePort = 9000; } ``` -------------------------------- ### Set SQLite as default database in defineEnvironment() Source: https://packages.tools/testbench-dusk/the-basic Set the default database connection to sqlite when using SQLite with Testbench Dusk. Note that using :memory: is not supported; you must create a SQLite database file first. Override defineEnvironment() to change the database configuration. ```php class DuskTestCase extends \Orchestra\Testbench\Dusk\TestCase { /** * Define environment setup. * * @param Illuminate\Foundation\Application $app * * @return void */ protected function defineEnvironment($app) { $this->app['config']->set('database.default', 'sqlite'); } } ``` -------------------------------- ### Configure purge and run package:purge-skeleton Source: https://packages.tools/testbench/cli Configures the purge section in testbench.yaml to specify directories and files to remove, then runs the purge-skeleton command to reset the skeleton to default. ```yaml purge: directories: - public/vendor/* files: - lang/*.json ``` ```bash vendor/bin/testbench package:purge-skeleton ``` -------------------------------- ### Manually run and rollback migrations with artisan() Source: https://packages.tools/testbench/the-basic/databases Manually run migrations using the artisan() helper in defineDatabaseMigrations(), and rollback them before application destruction. ```php use function Orchestra\Testbench\artisan; class TestCase extends \Orchestra\Testbench\TestCase { /** * Define database migrations. * * @return void */ protected function defineDatabaseMigrations() { artisan($this, 'migrate', ['--database' => 'testbench']); $this->beforeApplicationDestroyed( fn () => artisan($this, 'migrate:rollback', ['--database' => 'testbench']) ); } } ``` -------------------------------- ### Running Tests with Collision Source: https://packages.tools/testbench/integrations Execute the package:test command via the Testbench CLI to run tests with Laravel-flavored output. ```bash vendor/bin/testbench package:test ``` -------------------------------- ### Enable Auto-Discovery for All Vendor Packages Source: https://packages.tools/testbench/the-basic Return an empty array in ignorePackageDiscoveriesFrom to enable auto-discovery for all vendor packages. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Ignore package discovery from. * * @return array */ public function ignorePackageDiscoveriesFrom() { return []; } } ``` -------------------------------- ### Define Environment with Attribute Source: https://packages.tools/testbench/the-basic/environment Use the DefineEnvironment attribute to customize environment settings for specific tests. ```php use Orchestra\Testbench\Attributes\DefineEnvironment; use PHPUnit\Framework\Attributes\Test; class TestCase extends \Orchestra\Testbench\TestCase { protected function usesMySqlConnection($app) { $app['config']->set('database.default', 'mysql'); } protected function usesSqliteConnection($app) { $app['config']->set('database.default', 'sqlite'); } #[Test] #[DefineEnvironment('usesMySqlConnection')] public function it_can_be_connected_with_mysql() { // write your tests } #[Test] #[DefineEnvironment('usesSqliteConnection')] public function it_can_be_connected_with_sqlite() { // write your tests } } ``` -------------------------------- ### Run additional Laravel migrations with WithMigration parameters Source: https://packages.tools/testbench/the-basic/databases Run migrations for additional components (cache, queue, session) by providing parameters to the WithMigration attribute. ```php use Orchestra\Testbench\Attributes\WithMigration; #[WithMigration('laravel', 'cache', 'queue')] #[WithMigration('session')] class TestCase extends \Orchestra\Testbench\TestCase { // } ``` -------------------------------- ### Toggle Dusk UI visibility with Options::withUI() and Options::withoutUI() Source: https://packages.tools/testbench-dusk/the-basic Control whether the browser window is shown during Dusk tests. The default is without UI (headless) which is slightly quicker; call Options::withUI() to show the UI or Options::withoutUI() to hide it. Override defineWebDriverOptions() in your DuskTestCase to set this behavior. ```php use Orchestra\Testbench\Dusk\Options; class DuskTestCase extends \Orchestra\Testbench\Dusk\TestCase { /** * Prepare the testing environment web driver options. * * @api * * @return void */ public static function defineWebDriverOptions() { // To show the UI during testing Options::withUI(); // To hide the UI during testing Options::withoutUI(); } } ``` -------------------------------- ### Run feature tests with --testsuite=Feature Source: https://packages.tools/testbench Run only the Feature test suite using PHPUnit's --testsuite option. ```bash vendor/bin/phpunit --testsuite=Feature ``` -------------------------------- ### Run default Laravel migrations with WithMigration Source: https://packages.tools/testbench/the-basic/databases Run the default Laravel migrations (users and password_resets tables) by adding the WithMigration attribute. ```php use Orchestra\Testbench\Attributes\WithMigration; #[WithMigration] class TestCase extends \Orchestra\Testbench\TestCase { // } ``` -------------------------------- ### Register Package Service Providers Source: https://packages.tools/testbench/the-basic Override the getPackageProviders method to load your package service provider within the test environment. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Get package providers. * * @param \Illuminate\Foundation\Application $app * @return array> */ protected function getPackageProviders($app) { return [ 'Acme\AcmeServiceProvider', ]; } } ``` -------------------------------- ### Extend Dusk TestCase Source: https://packages.tools/testbench-dusk Extend the Orchestra Testbench Dusk TestCase to enable browser testing capabilities. ```php class DuskTestCase extends \PHPUnit\Framework\TestCase class DuskTestCase extends \Orchestra\Testbench\Dusk\TestCase { // } ``` -------------------------------- ### Run Browser Tests Source: https://packages.tools/testbench-dusk Execute only the browser test suite using the PHPUnit testsuite option. ```bash vendor/bin/phpunit --testsuite=Browser ``` -------------------------------- ### Configuring Ray in phpunit.xml Source: https://packages.tools/testbench/integrations Configure Ray settings by adding environment variables within the block of your phpunit.xml file. ```xml // ... ``` -------------------------------- ### testbench.yaml providers configuration Source: https://packages.tools/testbench Define package service providers in testbench.yaml to be loaded by WithWorkbench. ```yaml providers: - Laravel\Sanctum\SanctumServiceProvider - Workbench\App\Providers\WorkbenchServiceProvider ``` -------------------------------- ### Overriding Console Kernel Source: https://packages.tools/testbench/the-basic Swap the Console Kernel for application bootstrap by overriding the resolveApplicationConsoleKernel method. ```php use Illuminate\Contracts\Console\Kernel as ConsoleKernel; class TestCase extends \Orchestra\Testbench\TestCase { /** * Resolve application Console Kernel implementation. * * @param \Illuminate\Foundation\Application $app * @return void */ protected function resolveApplicationConsoleKernel($app) { $app->singleton( ConsoleKernel::class, 'Tests\Console\Kernel' ); } } ``` -------------------------------- ### Drop SQLite database with testbench Source: https://packages.tools/testbench/cli Drops database/database.sqlite on the package's Laravel skeleton. ```bash vendor/bin/testbench package:drop-sqlite-db ``` -------------------------------- ### Set DB_CONNECTION to testing using WithEnv attribute Source: https://packages.tools/testbench/the-basic/databases Use the WithEnv attribute to set the DB_CONNECTION environment variable to 'testing' for the test case. ```php use Orchestra\Testbench\Attributes\WithEnv; #[WithEnv('DB_CONNECTION', 'testing')] class TestCase extends \Orchestra\Testbench\TestCase { // } ``` -------------------------------- ### Define Application Key in phpunit.xml Source: https://packages.tools/testbench/the-basic/environment Define the APP_KEY in the phpunit.xml configuration file for encryption requirements. ```xml // ... ``` -------------------------------- ### testbench.yaml laravel configuration Source: https://packages.tools/testbench Specify a custom Laravel skeleton path in testbench.yaml using the laravel key. ```yaml laravel: ./skeleton ``` -------------------------------- ### Automatically run package migrations with RefreshDatabase Source: https://packages.tools/testbench/the-basic/databases Use the RefreshDatabase trait to automatically run package migrations defined through the package's service provider. ```php use Illuminate\Foundation\Testing\RefreshDatabase; class TestCase extends \Orchestra\Testbench\TestCase { use RefreshDatabase; } ``` -------------------------------- ### Override Default Service Providers Source: https://packages.tools/testbench/the-basic Use the overrideApplicationBindings method to replace default application service providers with your own implementations. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Get package providers. * * @param \Illuminate\Foundation\Application $app * @return array, class-string<\Illuminate\Support\ServiceProvider>> */ protected function overrideApplicationBindings($app) { return [ 'Illuminate\View\ViewServiceProvider' => 'Acme\ViewServiceProvider', ]; } } ``` -------------------------------- ### Enable Global Auto-Discovery Source: https://packages.tools/testbench/the-basic Set the $enablesPackageDiscoveries property to true in your TestCase class to enable auto-discovery globally. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Automatically enables package discoveries. * * @var bool */ protected $enablesPackageDiscoveries = true; } ``` -------------------------------- ### Extend Orchestra\Testbench\TestCase Source: https://packages.tools/testbench Replace PHPUnit\Framework\TestCase with Orchestra\Testbench\TestCase to use Testbench's predefined Laravel application skeleton. ```php class TestCase extends \PHPUnit\Framework\TestCase class TestCase extends \Orchestra\Testbench\TestCase { // } ``` -------------------------------- ### Define Environment with Annotation Source: https://packages.tools/testbench/the-basic/environment Use the @define-env annotation to customize environment settings for specific tests. This method is deprecated. ```php class TestCase extends \Orchestra\Testbench\TestCase { protected function usesMySqlConnection($app) { $app['config']->set('database.default', 'mysql'); } protected function usesSqliteConnection($app) { $app['config']->set('database.default', 'sqlite'); } /** * @test * @define-env usesMySqlConnection */ public function it_can_be_connected_with_mysql() { // write your tests } /** * @test * @define-env usesSqliteConnection */ public function it_can_be_connected_with_sqlite() { // write your tests } } ``` -------------------------------- ### Configure PHPUnit Test Suites Source: https://packages.tools/testbench-dusk Define separate test suites in phpunit.xml to organize and run browser tests independently. ```xml ./tests/Browser ./tests/Feature ./tests/Unit ``` -------------------------------- ### Using Custom Laravel Skeleton Source: https://packages.tools/testbench/the-basic Override the applicationBasePath method to use a custom Laravel skeleton path. ```php use function Orchestra\Testbench\package_path; class TestCase extends \Orchestra\Testbench\TestCase { /** * Get Application base path. * * @return string */ public static function applicationBasePath() { return package_path('skeleton'); } } ``` -------------------------------- ### Use @define-route annotation Source: https://packages.tools/testbench/the-basic/routes Use the @define-route annotation to customize route loading for specific tests. Note that this method is deprecated and will be removed in future versions. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Define routes setup. * * @param \Illuminate\Routing\Router $router * @return void */ protected function usesAuthRoutes($router) { // Load auth routes. } /** * @test * @define-route usesAuthRoutes */ public function it_does_load_auth_routes() { // } /** * @test */ public function it_doesnt_load_auth_routes() { // } } ``` -------------------------------- ### PHPUnit test suites configuration Source: https://packages.tools/testbench Define separate Feature and Unit test suites in phpunit.xml to run tests selectively. ```xml ./tests/Feature ./tests/Unit ``` -------------------------------- ### Overriding HTTP Kernel Source: https://packages.tools/testbench/the-basic Swap the HTTP Kernel for application bootstrap by overriding the resolveApplicationHttpKernel method. ```php use Illuminate\Contracts\Http\Kernel as HttpKernel; class TestCase extends \Orchestra\Testbench\TestCase { /** * Resolve application HTTP Kernel implementation. * * @param \Illuminate\Foundation\Application $app * @return void */ protected function resolveApplicationHttpKernel($app) { $app->singleton( HttpKernel::class, 'Tests\Http\Kernel' ); } } ``` -------------------------------- ### Register Package Aliases Source: https://packages.tools/testbench/the-basic Override the getPackageAliases method to load your package aliases. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Override application aliases. * * @param \Illuminate\Foundation\Application $app * @return array> */ protected function getPackageAliases($app) { return [ 'Acme' => 'Acme\Facade', ]; } } ``` -------------------------------- ### Testing Blade components Source: https://packages.tools/testbench/the-basic Use the InteractsWithViews trait to enable testing for Blade components. ```php use Illuminate\Foundation\Testing\Concerns\InteractsWithViews; class TestCase extends \Orchestra\Testbench\TestCase { use InteractsWithViews; } ``` -------------------------------- ### Use WithWorkbench trait in TestCase Source: https://packages.tools/testbench Add the WithWorkbench trait to your TestCase to enable testbench.yaml configuration. ```php use Orchestra\Testbench\Concerns\WithWorkbench; class TestCase extends \Orchestra\Testbench\TestCase { use WithWorkbench; } ``` -------------------------------- ### Overriding getBasePath for Legacy Support Source: https://packages.tools/testbench/the-basic For versions prior to v6.22.0, override the getBasePath method to change the skeleton path. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Get base path. * * @return string */ protected function getBasePath() { return __DIR__.'/../skeleton'; } } ``` -------------------------------- ### Use DefineRoute attribute Source: https://packages.tools/testbench/the-basic/routes Apply the DefineRoute attribute to specific test methods to customize route loading for those tests. ```php use Orchestra\Testbench\Attributes\DefineRoute; use PHPUnit\Framework\Attributes\Test; class TestCase extends \Orchestra\Testbench\TestCase { /** * Define routes setup. * * @param \Illuminate\Routing\Router $router * @return void */ protected function usesAuthRoutes($router) { // Load auth routes. } #[Test] #[DefineRoute('usesAuthRoutes')] public function it_does_load_auth_routes() { // } #[Test] public function it_doesnt_load_auth_routes() { // } } ``` -------------------------------- ### Disable .env Loading Source: https://packages.tools/testbench/the-basic/environment Set the $loadEnvironmentVariables property to false to prevent Testbench from loading the .env file. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Automatically loads environment file if available. * * @var bool */ protected $loadEnvironmentVariables = false; // } ``` -------------------------------- ### Set DB_CONNECTION to testing in PHPUnit configuration Source: https://packages.tools/testbench/the-basic/databases Configure the testing database connection in PHPUnit by setting the DB_CONNECTION environment variable to 'testing', which uses an in-memory SQLite database. ```xml // ... ``` -------------------------------- ### Ignore Specific Packages in Auto-Discovery Source: https://packages.tools/testbench/the-basic Use the ignorePackageDiscoveriesFrom method to prevent specific packages from being auto-discovered during tests. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Ignore package discovery from. * * @return array */ public function ignorePackageDiscoveriesFrom() { return [ 'laravel/passport', ]; } } ``` -------------------------------- ### Override Application Timezone Source: https://packages.tools/testbench/the-basic/environment Override the default UTC timezone by implementing the getApplicationTimezone method. ```php class TestCase extends \Orchestra\Testbench\TestCase { /** * Get the application timezone. * * @param \Illuminate\Foundation\Application $app * @return string|null */ protected function getApplicationTimezone($app) { return 'Asia/Kuala_Lumpur'; } } ``` -------------------------------- ### Use DatabaseTransactions trait for migrated state Source: https://packages.tools/testbench/the-basic/databases Use the DatabaseTransactions trait to wrap tests in database transactions for a migrated state. ```php use Illuminate\Foundation\Testing\DatabaseTransactions; class TestCase extends \Orchestra\Testbench\TestCase { use DatabaseTransactions; } ``` -------------------------------- ### Override applicationBasePath for migration conflicts Source: https://packages.tools/testbench-dusk/troubleshooting Override applicationBasePath in your test class to ensure all tests use the same Laravel skeleton, preventing migration class name collisions. ```php use function Orchestra\Testbench\package_path; class DuskTestCase extends \Orchestra\Testbench\Dusk\TestCase { /** * Get Application base path. * * @return string */ public static function applicationBasePath() { // Adjust this path depending on where your override is located. return package_path('vendor/orchestra/testbench-dusk/laravel'); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.