Skip to content

Commit 3145087

Browse files
authored
Merge pull request #95 from gRegorLove/test-suite
Updated test suite
2 parents 7c2ca77 + 58cc032 commit 3145087

File tree

4 files changed

+219
-71
lines changed

4 files changed

+219
-71
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,15 @@ Pull requests very welcome, please try to maintain stylistic, structural and nam
266266
4. Run PHPUnit with `./vendor/bin/phpunit`
267267
5. Make your changes
268268
6. Add PHPUnit tests for your changes, either in an existing test file if suitable, or a new one
269-
7. Make sure your tests pass (`./vendor/bin/phpunit`), preferably using both PHP 5.3 and 5.4
269+
7. Make sure your tests pass (`./vendor/bin/phpunit`), using 5.4+
270270
8. Go to your fork of the repo on github.com and make a pull request, preferably with a short summary, detailed description and references to issues/parsing specs as appropriate
271271
9. Bask in the warm feeling of having contributed to a piece of free software
272272

273273
### Testing
274274

275275
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`.
276276

277-
The other, in `tests/test-suite`, is a custom test harness which hooks up php-mf2 to the cross-platform microformats test suite. 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`.
277+
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`.
278278

279279
Currently php-mf2 passes the majority of it’s own test case, and a good percentage of the cross-platform tests. Contributors should ALWAYS test against the PHPUnit suite to ensure any changes don’t negatively impact php-mf2, and SHOULD run the cross-platform suite, especially if you’re changing parsing behaviour.
280280

composer.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99
"homepage": "http://waterpigs.co.uk"
1010
}
1111
],
12+
"repositories": [
13+
{
14+
"type": "vcs",
15+
"url": "https://github.com/microformats/tests"
16+
}
17+
],
1218
"bin": ["bin/fetch-mf2", "bin/parse-mf2"],
1319
"require": {
14-
"php": ">=5.4.0"
20+
"php": ">=5.4.0",
21+
"microformats/test": "@dev"
1522
},
1623
"require-dev": {
1724
"phpunit/phpunit": "3.7.*"

composer.lock

Lines changed: 70 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)