jeudi 4 août 2016

Does Codeception have an equivalent to PHPUnit's "strict coverage"?

When using PHPUnit, you can annotate a test case with @covers SomeClass::someMethod to ensure that only code inside of that method is recorded as covered when running the test. I like to use this feature because it helps me separate code that was incidentally executed during a test from code that was actually tested.

After using Codeception to implement some acceptance tests for my project, I decided I would rather use it than PHPUnit to run my unit tests. I would like to remove PHPUnit from the project if possible.

I am using Codeception's Cest format for my unit tests, and the @covers and @codeCoverageIgnore annotations no longer work. Code coverage reports show executed code outside of the methods specified with @covers as covered. Is there any way to mimic that "strict coverage" functionality using Codeception?

Aucun commentaire:

Enregistrer un commentaire