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

v0.0.13 2021-11-05 12:15 UTC

This package is auto-updated.

Last update: 2025-10-05 21:21:24 UTC


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();