PHP code example of trinet / mezzio-test

1. Go to this page and download the library: Download trinet/mezzio-test library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

trinet / mezzio-test example snippets


protected function setUp(): void
{
    parent::setUp();
    $this->mezzioApp = new MezzioTestEnvironment();
}

$providers = [
    \A\ConfigProvider::class,
    \B\ConfigProvider::class,
    // ...
];

if (getenv('APP_TESTING') !== false) {
    $providers = array_merge($providers, \Trinet\MezzioTest\TestConfigProvider::load());
}

$aggregator = new ConfigAggregator($providers, null, []);

$providers = [
    \A\ConfigProvider::class,
    \B\ConfigProvider::class,
    // ...
];

if (getenv('APP_TESTING') !== false) {
    $providers = array_merge($providers, \Trinet\MezzioTest\TestConfigProvider::load('custom/path'));
}

$aggregator = new ConfigAggregator($providers, null, []);