yii2-gii icon indicating copy to clipboard operation
yii2-gii copied to clipboard

FR: Extension generator with unittest

Open mdmunir opened this issue 9 years ago • 6 comments

I wish we have template configuration for phpunit, travis etc and etc. Also we have TestCase base class and composer.json with require-dev section.

mdmunir avatar Feb 05 '16 03:02 mdmunir

?

samdark avatar Feb 05 '16 08:02 samdark

Also generate phpunit.xml, .travis.yml, tests/TestCase.php, etc.

mdmunir avatar Feb 05 '16 08:02 mdmunir

Based on what?

samdark avatar Feb 05 '16 08:02 samdark

I am sure. Base on your favorite :D

mdmunir avatar Feb 05 '16 08:02 mdmunir

Basic travis.yml and phpunit.xml.dist can be added. As for TestCase - I am unsure. Still, since we have a namespace generator input, we can try to do so: generate tests/TestCase.php and tests/bootstrap.php.

klimov-paul avatar Feb 05 '16 09:02 klimov-paul

I think we should move this to the https://github.com/yiisoft/yii2-app-advanced repo. We can create an example of a fixture to load user and then make an small acceptance test for frontend\controllers\SiteController and frontend\controllers\SiteController handling a login and a frontpage.

Faryshta avatar Apr 15 '16 07:04 Faryshta