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
Fix for declaring test case in data provider #2834
Fix for declaring test case in data provider #2834
Conversation
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class FirstTest extends TestCase |
There was a problem hiding this comment.
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)
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class SecondTest extends TestCase |
There was a problem hiding this comment.
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 Report
@@ Coverage Diff @@
## 5.7 #2834 +/- ##
============================================
- Coverage 51.18% 51.18% -0.01%
- Complexity 2912 2913 +1
============================================
Files 110 110
Lines 9706 9710 +4
============================================
+ Hits 4968 4970 +2
- Misses 4738 4740 +2
Continue to review full report at Codecov.
|
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class FirstTest extends TestCase |
There was a problem hiding this comment.
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)
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class SecondTest extends TestCase |
There was a problem hiding this comment.
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)
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class FirstTest extends TestCase |
There was a problem hiding this comment.
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)
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class SecondTest extends TestCase |
There was a problem hiding this comment.
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)
Ping @sebastianbergmann |
Can you please send a pull request against |
@sebastianbergmann done |
src/Framework/TestSuite.php
Outdated
@@ -292,6 +292,12 @@ public function addTestSuite($testClass) | |||
*/ | |||
public function addTestFile($filename) | |||
{ | |||
static $declaredClasses; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use a method-local, static variable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastianbergmann done, changed to private, dynamic one.
#2833