PHP code example of spiral / testing
1. Go to this page and download the library: Download spiral/testing 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/ */
spiral / testing example snippets
namespace MyPackage\Tests;
abstract class TestCase extends \Spiral\Testing\TestCase
{
public function rootDirectory(): string
{
return __DIR__.'/../';
}
public function defineBootloaders(): array
{
return [
\MyPackage\Bootloaders\PackageBootloader::class,
// ...
];
}
}
tests
- app
- config
- my-config.php
- ...
- src
- TestCase.php
- MyFirstTestCase.php