apility / test-utilities
v0.0.13
2021-11-05 12:15 UTC
Requires
- laravel/framework: ^8.0
- vlucas/phpdotenv: ^5.3
Requires (Dev)
- larapack/dd: ^1.1
README
This is a simple utility library for bootstrapping a minimal Laravel like container.
This can be used to test your Laravel packages without bootstrapping a full Laravel instance. You just specify upfront what config and service providers to load, and this library takes care of the rest.
Installation
composer require apility/test-utilities
Example
use Apility\Testing\Laravel; $app = Laravel::createApplication() ->withRoot(__DIR__) ->withConfig([ 'cache' => [ 'default' => 'file', 'stores' => [ 'file' => [ 'driver' => 'file', 'path' => __DIR__ . '/cache', ], ], ], ]) ->withFrameworkProvider(Illuminate\Cache\CacheServiceProvider::class) ->withProvider(MyPlugin\Providers\MyPluginServiceProvider::class) ->boot();