PHP code example of roundly-consulting / testing-for-laravel
1. Go to this page and download the library: Download roundly-consulting/testing-for-laravel 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/ */
roundly-consulting / testing-for-laravel example snippets
use RoundlyConsulting\Testing\PackageTestCase;
use RoundlyConsulting\Wallet\WalletServiceProvider;
abstract class TestCase extends PackageTestCase
{
protected function packageProviders(): array
{
return [WalletServiceProvider::class];
}
protected function migrationSources(): array
{
return [WalletServiceProvider::class];
}
}
use RoundlyConsulting\Testing\Arch\ArchPresets;
it('has a runnable migration order', function (): void {
expect(__DIR__.'/../../database/migrations')
->toHaveRunnableMigrationOrder(foreignKeys: 3, externalTables: ['users']);
});
it('ships exactly the config keys it reads', function (): void {
expect(__DIR__.'/../../config/wallet.php')->toSatisfyConfigContract(__DIR__.'/../../src');
});
ArchPresets::strictTypes('RoundlyConsulting\Wallet');
ArchPresets::finalByDefault('RoundlyConsulting\Wallet');
ArchPresets::noDebuggingLeftovers();