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

PHPUnit shouldn't crash when a test suite contains both *.phpt files and unconventionally named tests #2973

Closed
wants to merge 3 commits into from

Conversation

narkq
Copy link
Contributor

@narkq narkq commented Jan 26, 2018

Should fix #2972 and probably #2950 .

…les and unconventionally named tests

There's no point in calling the TestSuite constructor with any class
which is not instance of TestSuite and does not extend TestCase.
<?php
use PHPUnit\Framework\TestCase;

class Issue2972Test extends TestCase

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each class must be in a namespace of at least one level (a top-level vendor name)

@codecov-io
Copy link

codecov-io commented Jan 26, 2018

Codecov Report

Merging #2973 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master   #2973   +/-   ##
========================================
  Coverage      80.4%   80.4%           
- Complexity     2820    2821    +1     
========================================
  Files           107     107           
  Lines          7426    7426           
========================================
  Hits           5971    5971           
  Misses         1455    1455
Impacted Files Coverage Δ Complexity Δ
src/Framework/TestSuite.php 83.61% <100%> (ø) 150 <0> (+1) ⬆️

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 3e2ff3b...b2a31f1. Read the comment docs.

@narkq narkq changed the title PHPUnit shouldn't fail when a test suite contains both *.phpt files and unconventionally named tests PHPUnit shouldn't crash when a test suite contains both *.phpt files and unconventionally named tests Jan 26, 2018
@sebastianbergmann
Copy link
Owner

Merged manually, thanks.

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

Successfully merging this pull request may close these issues.

PHPUnit crashes when test suite contains both *.phpt files and unconventionally named tests
4 participants