Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed single test execution of phpunit tests. #1027

Merged
merged 2 commits into from
Feb 9, 2019
Merged

Conversation

siad007
Copy link
Member

@siad007 siad007 commented Feb 9, 2019

It is not possible to execute unit tests with codecoverage of a single phpunit file.
Example: running PhingTest as phpunit test under phpstorm wich will execute:

php.exe -dxdebug.coverage_enable=1 C:\XXX\phing/vendor/phpunit/phpunit/phpunit --coverage-clover C:\XXX\.PhpStorm2018.3\system\coverage\phingPhpArrayRebase$PhingTest.xml --configuration C:\XXX\phing\test\phpunit.xml PhingTest C:\XXX\phing\test\classes\phing\PhingTest.php --teamcity

will end with:

PHPUnit 7.5.3 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.1.8 with Xdebug 2.5.5
Configuration: C:\XXX\phing\test\phpunit.xml

  Warning - The configuration file did not pass validation!
  The following problems have been detected:

  Line 13:
  - Element 'phpunit', attribute 'syntaxCheck': The attribute 'syntaxCheck' is not allowed.
  - Element 'phpunit', attribute 'strict': The attribute 'strict' is not allowed.

  Test results may not be as expected.




Time: 1.01 seconds, Memory: 10.00MB

OK (3 tests, 17 assertions)

Generating code coverage report in Clover XML format ... done

Process finished with exit code 0

with no coverage generated inside the IDE.

So I removed syntaxCheck and strict attribute from phpunit.xml and extended the whitelist.

@siad007 siad007 added the defect label Feb 9, 2019
@siad007 siad007 added this to the 3.0.0-alpha3 milestone Feb 9, 2019
@codecov
Copy link

codecov bot commented Feb 9, 2019

Codecov Report

Merging #1027 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1027   +/-   ##
=========================================
  Coverage     46.11%   46.11%           
  Complexity    10029    10029           
=========================================
  Files           505      505           
  Lines         24460    24460           
=========================================
  Hits          11279    11279           
  Misses        13181    13181

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f363b9...f4a979b. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant