2017 © Pedro Peláez
 

library php-test-generator

PHP test skeletons generator

image

kristijorgji/php-test-generator

PHP test skeletons generator

  • Tuesday, June 19, 2018
  • by kristi.jorgji
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-test-generator

A framework for generating test boilerplate from the specified suites., (*1)

Table of Contents

Installation

composer require kristijorgji/php-test-generator

Run the following command to initialize phpTestGenerator, (*2)

vendor/bin/phpTestGenerator init

This command will create in your project root folder the config file phpTestGenerator.cfg.php You need to edit that to your desired settings., (*3)

Config

The config and it's keys try to be as much self explanatory as possible. Example config:, (*4)

<?php

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'
        ],
    ]
];

The exclude patterns can be directory names (relative to suite source paths), or regular expressions. In the former case, the pattern should be defined within #, like in the example config., (*5)

License

php-test-generator is released under the MIT Licence. See the bundled LICENSE file for details., (*6)

The Versions

19/06 2018

dev-master

9999999-dev

PHP test skeletons generator

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kristi Jorgji

test php code generator

19/06 2018

v1.0.0

1.0.0.0

PHP test skeletons generator

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kristi Jorgji

test php code generator