Codeception / Codeception

Full-stack testing PHP framework
http://codeception.com
MIT License
4.77k stars 1.3k forks source link

codecept generate:test failed #5986

Closed shanezhiu closed 4 years ago

shanezhiu commented 4 years ago

What are you trying to achieve?

I feel like to create a unit test file.

What do you get instead?

vendor/bin/codecept generate:test unit HttpTest

Provide console output if related. Use -vvv mode for more details.


In Configuration.php line 327:

  Suite unit was not loaded  

generate:test <suite> <class>

autoload psr-4 Codeception\ => src/Codeception Codeception\Extension\ => ext

requires behat/gherkin ^4.4.0 codeception/lib-asserts ^1.0 codeception/phpunit-wrapper >6.0.15 <6.1.0 | ^6.6.1 | ^7.7.1 | ^8.1.1 | ^9.0 codeception/stub ^2.0 | ^3.0 ext-curl ext-json ext-mbstring * guzzlehttp/psr7 ~1.4 php >=5.6.0 <8.0 symfony/console >=2.7 <6.0 symfony/css-selector >=2.7 <6.0 symfony/event-dispatcher >=2.7 <6.0 symfony/finder >=2.7 <6.0 symfony/yaml >=2.7 <6.0

requires (dev) codeception/module-asserts @dev codeception/module-cli @dev codeception/module-db @dev codeception/module-filesystem @dev codeception/module-phpbrowser @dev codeception/specify ~0.3 codeception/util-universalframework @dev monolog/monolog ~1.8 squizlabs/php_codesniffer ~2.0 symfony/process >=2.7 <6.0 vlucas/phpdotenv ^2.0 | ^3.0 | ^4.0

suggests codeception/specify BDD-style code blocks codeception/verify BDD-style assertions hoa/console For interactive console functionality stecman/symfony-console-completion For BASH autocompletion symfony/phpunit-bridge For phpunit-bridge support

* Suite configuration:

```yml
paths:
    tests: tests
    output: tests/_output
    data: tests/_data
    support: tests/_support
    envs: tests/_envs
actor_suffix: Tester
extensions:
    enabled:
        - Codeception\Extension\RunFailed

Problem

In Configuration.php line 327:

  Suite unit was not loaded  

generate:test <suite> <class>
shanezhiu commented 4 years ago

I found what caused this. I install phpunit 8 mannually rather than use codeception dependency.