### Custom TestCase Setup for Pest Source: https://github.com/jeffersongoncalves/pest-plugin-mysql-compat/blob/main/README.md Alternative setup without the Pest-specific helper: bind your own base TestCase and call MysqlCompat::install() in setUp() before parent::setUp(). ```php // tests/Pest.php uses(Tests\TestCase::class)->in('Feature', 'Unit'); ``` ```php // tests/TestCase.php use JeffersonGoncalves\PestPluginMysqlCompat\MysqlCompat; abstract class TestCase extends BaseTestCase { protected function setUp(): void { MysqlCompat::install(); parent::setUp(); } } ``` -------------------------------- ### Install MysqlCompat in beforeEach Source: https://github.com/jeffersongoncalves/pest-plugin-mysql-compat/blob/main/README.md Equivalent to Plugin::boot(), manually installing MysqlCompat before each test. ```php // tests/Pest.php use JeffersonGoncalves\PestPluginMysqlCompat\MysqlCompat; pest()->beforeEach(fn () => MysqlCompat::install()); ``` -------------------------------- ### PHPUnit TestCase Setup Source: https://github.com/jeffersongoncalves/pest-plugin-mysql-compat/blob/main/README.md For PHPUnit or plain Laravel, override setUp() to call MysqlCompat::install() before parent::setUp(). Must run before the first database connection is resolved. ```php abstract class TestCase extends BaseTestCase { protected function setUp(): void { MysqlCompat::install(); parent::setUp(); } } ``` -------------------------------- ### Install with Composer Source: https://github.com/jeffersongoncalves/pest-plugin-mysql-compat/blob/main/README.md Install the package as a dev dependency via Composer. ```bash composer require jeffersongoncalves/pest-plugin-mysql-compat --dev ``` -------------------------------- ### Boot Plugin in Pest Source: https://github.com/jeffersongoncalves/pest-plugin-mysql-compat/blob/main/README.md Boot the plugin in Pest. This is shorthand for calling MysqlCompat::install() in a beforeEach hook. ```php // tests/Pest.php use JeffersonGoncalves\PestPluginMysqlCompat\Pest\Plugin; Plugin::boot(); ``` -------------------------------- ### Run tests with composer test Source: https://github.com/jeffersongoncalves/pest-plugin-mysql-compat/blob/main/README.md Runs the package's test suite. Use this command to execute all unit tests for the plugin. ```bash composer test ``` -------------------------------- ### Granular Configuration of MysqlCompat Source: https://github.com/jeffersongoncalves/pest-plugin-mysql-compat/blob/main/README.md Configure which MySQL functions to emulate. The rewriters and strict options are reserved for future phases and currently have no effect. ```php MysqlCompat::install( functions: ['DATE_FORMAT', 'IF', 'CONCAT'], // default: all rewriters: MysqlCompat::REWRITE_ALL, // reserved for Phase 2, no-op today strict: true, // reserved for Phase 3, no-op today ); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.