PHP code example of kristijorgji / php-test-generator

1. Go to this page and download the library: Download kristijorgji/php-test-generator 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/ */

    

kristijorgji / php-test-generator example snippets




return [
    'suites' => [
        'code' => [
            'sourcesPath' => 'app',
            'excludePatterns' => [
                'Console',
                'Constants', 
                '#.*Interface\.php$#',
                '#.*Exception\.php$#',
            ],
            'outputDirectory' => 'tests/unit/app',
            'namespace' => 'UnitTests',
            'extends' => '\Tests\Helpers\TestCase'
        ],
        'database' => [
            'sourcesPath' => 'app/Repositories',
            'excludePatterns' => [
                'Contracts'
            ],
            'outputDirectory' => 'tests/unit/app/Repositories',
            'namespace' => 'UnitTests\App\Repositories',
            'extends' => 'Tests\Helpers\FixtureTestCase'
        ],
    ]
];