1. Go to this page and download the library: Download unicorn/lumen-testbench 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/ */
unicorn / lumen-testbench example snippets
class TestCase extends Orchestra\Testbench\TestCase
{
//
}
protected function getPackageProviders($app)
{
return ['Acme\AcmeServiceProvider'];
}
/**
* Setup the test environment.
*/
protected function setUp()
{
parent::setUp();
$this->loadMigrationsFrom(__DIR__ . '/database/migrations');
// and other test setup steps you need to perform
}
$this->withFactories(__DIR__.'/factories');
xml
<phpunit>
// ...
<php>
<env name="DB_CONNECTION" value="testing"/>
</php>
</phpunit>
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.