Codeception / Codeception/Codeception
generate:test generate invalid code when test suite has no actor
- Dominant language
- PHP
- Stars
- 4.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
#### What are you trying to achieve?
Generate valid unit test
#### What do you get instead?
```
Provide console output if related. Use `-vvv` mode for more details.
```bash
$ ./vendor/bin/codecept init unit
This will install Codeception for unit testing only
? Where tests will be stored? (tests)
Codeception provides additional features for integration tests
Like accessing frameworks, ORM, Database.
? Do you wish to enable them? (y/n) n
Adding codeception/module-asserts for Asserts to composer.json
1 new packages added to require
? composer.json updated. Do you want to run "composer update"? (y/n) y
Running composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking codeception/module-asserts (dev-master 1b6b150)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing codeception/module-asserts (dev-master 1b6b150): Extracting archive
Generating autoload files
39 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Created test directory inside at tests
INSTALLATION COMPLETE
Unit tests will be executed in random order
Use @depends annotation to change the order of tests
Next steps:
Create the first test using codecept g:test unit MyTest
Run tests with codecept run
Happy testing!
$ ./vendor/bin/codecept ge:test unit First
Test was created in /.../tests/./FirstTest.php
$ ./vendor/bin/codecept run
Codeception PHP Testing Framework v5.0.5 https://helpukrainewin.org
[Seed] 1521305280
In Parser.php line 103:
Couldn't parse test '/.../tests/./FirstTest.php' on line 6
syntax error, unexpected token ";", expecting "{"
```
Contributor guide
Assessment
This issue has not been assessed yet.