Codeception / Codeception/Codeception
generate:test generate invalid code when test suite has no actor
- Linguagem predominante
- PHP
- Estrelas
- 4.9k
- Forks
- 1.3k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
#### 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 "{"
```
Guia de contribuição
Direção de pesquisa
Reproduza o problema com `./vendor/bin/codecept init unit` e, em seguida, gere `FirstTest.php` com `./vendor/bin/codecept ge:test unit First`. Inspecione o arquivo gerado e execute `./vendor/bin/codecept run`; está concluído quando a suíte de testes unitários sem actor gera PHP válido e a execução dos testes não falha mais ao analisá-lo.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- php
- Domínio
- testing-qa
- Tipo de issue
- Bug
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100