-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added expectNotToPerformAssertions method #2898
Added expectNotToPerformAssertions method #2898
Conversation
<?php | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DoNoAssertionTestCase 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)
Can you please elaborate what problem you are trying to solve with this? Thanks! |
@sebastianbergmann added in description. |
3b20e49
to
4956443
Compare
Codecov Report
@@ Coverage Diff @@
## master #2898 +/- ##
============================================
+ Coverage 79.62% 79.63% +<.01%
- Complexity 2850 2851 +1
============================================
Files 105 105
Lines 7519 7521 +2
============================================
+ Hits 5987 5989 +2
Misses 1532 1532
Continue to review full report at Codecov.
|
Also I think I can ignore @stickler-ci error, other tests helper files are also with no namespace. |
👍 for method, I do also prefer to control assertions/expectations or lack of them via code, not via annotations. |
This branch has conflicts that must be resolved. |
here you go: #3042 |
Superseded by #3042. |
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However for php-7.0 it ships phpunit-7.5.0, which works only on php-7.1+. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However for php-7.0 it ships phpunit-7.5.0, which works only on php-7.1+. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However it ships phpunit-7.5.0 for php-7.0 environment, but it works only on php-7.1+. Note: We can not just save downloaded phpunit into /usr/local/bin, because Travis CI have a directory with its own phpunit executable in PATH prior standard directories. So we create our own directory and add it to PATH at beginning. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However it ships phpunit-7.5.0 for php-7.0 environment, but it works only on php-7.1+. Note: We can not just save downloaded phpunit into /usr/local/bin, because Travis CI have a directory with its own phpunit executable in PATH prior standard directories. So we create our own directory and add it to PATH at beginning. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However it ships phpunit-7.5.0 for php-7.0 environment, but it works only on php-7.1+. Note: We can not just save downloaded phpunit into /usr/local/bin, because Travis CI have a directory with its own phpunit executable in PATH prior standard directories. So we create our own directory and add it to PATH at beginning. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However it ships phpunit-7.5.0 for php-7.0 environment, but it works only on php-7.1+. Note: We can not just save downloaded phpunit into /usr/local/bin, because Travis CI have a directory with its own phpunit executable in PATH prior standard directories. So we create our own directory and add it to PATH at beginning. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However it ships phpunit-7.5.0 for php-7.0 environment, but it works only on php-7.1+. Note: We can not just save downloaded phpunit into /usr/local/bin, because Travis CI have a directory with its own phpunit executable in PATH prior standard directories. So we create our own directory and add it to PATH at beginning. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However it ships phpunit-7.5.0 for php-7.0 environment, but it works only on php-7.1+. Note: We can not just save downloaded phpunit into /usr/local/bin, because Travis CI have a directory with its own phpunit executable in PATH prior standard directories. So we create our own directory and add it to PATH at beginning. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
We should use different phpunit versions on different php versions (see [1]). Since we going to enable php from 7.0 to 7.4, the logic of test-run.py is changed to find `phpunit` command in PATH directories, but the Travis-CI script (test.sh) installs appropriate phpunit version to /usr/local/bin. Note: On the first glance it looks that we can skip phpunit installing on Travis-CI, because it is provided already. However it ships phpunit-7.5.0 for php-7.0 environment, but it works only on php-7.1+. Note: We can not just save downloaded phpunit into /usr/local/bin, because Travis CI have a directory with its own phpunit executable in PATH prior standard directories. So we create our own directory and add it to PATH at beginning. Tests are changed to be compatible with phpunit-6+, see [2] and [3]. Aside of this, removed some dead code from test-run.py. The next commit will remove test/phpunit.phar file, it is not used anymore. [1]: https://phpunit.de/supported-versions.html [2]: https://thephp.cc/news/2017/02/migrating-to-phpunit-6 [3]: sebastianbergmann/phpunit#2898
Explicit method for
doesNotPerformAssertions
, see #2484 (comment)