Skip to content

Commit 6e2688f

Browse files
authored
Merge pull request #194 from Zegnat/internet-tests
Filter tests relying on live internet connections
2 parents ef7329a + 248f8f8 commit 6e2688f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ Pull requests very welcome, please try to maintain stylistic, structural and nam
347347

348348
### Testing
349349

350-
There are currently two separate test suites: one, in `tests/Mf2`, is written in phpunit, containing many microformats parsing examples as well as internal parser tests and regression tests for specific issues over php-mf2’s history. Run it with `./vendor/bin/phpunit`.
350+
There are currently two separate test suites: one, in `tests/Mf2`, is written in phpunit, containing many microformats parsing examples as well as internal parser tests and regression tests for specific issues over php-mf2’s history. Run it with `./vendor/bin/phpunit`. If you do not have a live internet connection, you can exclude tests that depend on it: `./vendor/bin/phpunit --exclude-group internet`.
351351

352352
The other, in `tests/test-suite`, is a custom test harness which hooks up php-mf2 to the cross-platform [microformats test suite](https://github.com/microformats/tests). To run these tests you must first install the tests with `./composer.phar install`. Each test consists of a HTML file and a corresponding JSON file, and the suite can be run with `php ./tests/test-suite/test-suite.php`.
353353

tests/Mf2/ParserTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function testParsesNestedMicroformatsWithClassnamesInAnyOrder() {
253253
}
254254

255255
/**
256-
* @group network
256+
* @group internet
257257
*/
258258
public function testFetchMicroformats() {
259259
$mf = Mf2\fetch('http://waterpigs.co.uk/');
@@ -367,6 +367,7 @@ public function testApplyTransformationToSrcset() {
367367

368368
/**
369369
* @see https://github.com/indieweb/php-mf2/issues/84
370+
* @group internet
370371
*/
371372
public function testRelativeURLResolvedWithFinalURL() {
372373
$mf = Mf2\fetch('http://aaron.pk/4Zn5');

0 commit comments

Comments
 (0)