apility / test-utilities
Installs: 27
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/apility/test-utilities
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();