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

Added expectNotToPerformAssertions method #2898

Conversation

VladaHejda
Copy link

@VladaHejda VladaHejda commented Dec 5, 2017

Explicit method for doesNotPerformAssertions, see #2484 (comment)

<?php
use PHPUnit\Framework\TestCase;

class DoNoAssertionTestCase 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)

@sebastianbergmann
Copy link
Owner

Can you please elaborate what problem you are trying to solve with this? Thanks!

@sebastianbergmann sebastianbergmann added type/enhancement A new idea that should be implemented status/waiting-for-feedback Waiting for feedback from original reporter labels Dec 5, 2017
@VladaHejda
Copy link
Author

@sebastianbergmann added in description.

@sebastianbergmann sebastianbergmann removed the status/waiting-for-feedback Waiting for feedback from original reporter label Dec 5, 2017
@VladaHejda VladaHejda force-pushed the vladahejda-expectNotToPerformAssertions branch from 3b20e49 to 4956443 Compare December 5, 2017 15:10
@codecov-io
Copy link

Codecov Report

Merging #2898 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ Complexity Δ
src/Framework/TestCase.php 65.72% <100%> (+0.08%) 320 <1> (+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 150bb82...4956443. Read the comment docs.

@VladaHejda
Copy link
Author

Also I think I can ignore @stickler-ci error, other tests helper files are also with no namespace.

@keradus
Copy link
Contributor

keradus commented Jan 12, 2018

👍 for method, I do also prefer to control assertions/expectations or lack of them via code, not via annotations.
Yet, is it not a BC breaker, please don't target 7.0@dev

@sebastianbergmann
Copy link
Owner

This branch has conflicts that must be resolved.

@keradus
Copy link
Contributor

keradus commented Mar 15, 2018

here you go: #3042

@sebastianbergmann
Copy link
Owner

Superseded by #3042.

Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 18, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 19, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 19, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 19, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 19, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 20, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 23, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 23, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 25, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 26, 2020
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
Totktonada added a commit to tarantool/tarantool-php that referenced this pull request Mar 28, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A new idea that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants