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

Add the ability to skip tests that require an internet connection #115

Merged
merged 1 commit into from
Jun 28, 2016

Conversation

sidkshatriya
Copy link
Contributor

Sometimes you want to run tests that don't require an internet connection. This PR adds that ability.

How to use

  • Set environment variable AMP_TEST_SKIP_INTERNET=1 and then run phpunit tests and the tests
    that require an internet connection will be skipped

    As a shortcut from the command line

    $ AMP_TEST_SKIP_INTERNET=1 vendor/bin/phpunit tests
  • unset AMP_TEST_SKIP_INTERNET (or set it to 0) if you don't want internet tests to be skipped

…g. tests that make oembed calls or need image size determination)

- Set environment variable AMP_TEST_SKIP_INTERNET=1 and then run `phpunit tests` and the tests
  that require an internet connection will be skipped
@sidkshatriya sidkshatriya self-assigned this Jun 28, 2016
@sidkshatriya sidkshatriya merged commit 30344de into master Jun 28, 2016
@sidkshatriya sidkshatriya deleted the skip-internet-tests branch June 28, 2016 10:46
@sidkshatriya
Copy link
Contributor Author

This becomes useful in cases when you want to get an idea of the total runtime of the test suite without worrying about network download time influencing the result.

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

Successfully merging this pull request may close these issues.

None yet

1 participant