What is the proper way of executing unit tests for octobercms/library ?
I could successfully execute unit tests with the following condition.
bootstrap
path in october/rain/tests/phpunit.xml to bootstrap="../../../../vendor/autoload.php"
../../../../vendor/bin/phpunit
from october/rain/tests. But, I feel like there is a better way. I wonder how other committer is executing tests.
First of all thanks for showing interest in contributing to October CMS,
I would say you don't need to modify a single line.
first let's be specific and we only need to test octobercms/library
as we don't need to make things complex
let's assume you have working local October CMS based website on your machine.
now go to vendor\\october\\rain
folder as october lib
resides there. (inside termial)
now do composer install
there
if you find any dependency issue in installation.(Then ONLY follow this) , I found some problem here some dependency issue so, i need to remove this 2 dependencies from
composer.json
if you find same issue then : go to "require-dev" section -> remove
1. "illuminate/routing": "5.5.*"
2. "swiftmailer/swiftmailer": "~5.1"
3. now try to install
composer install
again.
when its done.
just got vendor\\october\\rain\\tests
directory (inside termial)
execute command for windows .\\..\\vendor\\bin\\phpunit.bat
and for linux/mac ./../vendor/bin/phpunit
it will automatically detect all the stuff and execute tests for you.
if you face any issue please add comment.
https://github.com/octobercms/library/wiki/How-To-Use-Unit-Tests-%3F
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.