Skip to content

Commit e98b8f6

Browse files
committed
Group tests by test suite.
- Grouping the tests by test suite to avoid warning failures when there are no test in a suite. Requires the use of the phpunit `--group` flag.
1 parent c63a596 commit e98b8f6

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ sudo: false
99
# all of the reference implementations?
1010
script:
1111
- git clone https://github.com/json-ld/json-ld.org.git _json-ld.org
12-
- phpunit test.php -d ./_json-ld.org/test-suite
12+
- phpunit --group json-ld.org test.php -d ./_json-ld.org/test-suite
1313
- git clone https://github.com/json-ld/normalization.git _normalization
14-
- phpunit test.php -d ./_normalization/tests
14+
- phpunit --group normalization test.php -d ./_normalization/tests
1515
notifications:
1616
email:
1717
on_success: change

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ the `json-ld.org` and `normalization` repositories hosted on GitHub:
179179
Then run the PHPUnit test.php application and point it at the directories
180180
containing the tests:
181181

182-
phpunit test.php -d {PATH_TO_JSON_LD_ORG/test-suite}
183-
phpunit test.php -d {PATH_TO_NORMALIZATION/tests}
182+
phpunit --group json-ld.org test.php -d {PATH_TO_JSON_LD_ORG/test-suite}
183+
phpunit --group normalization test.php -d {PATH_TO_NORMALIZATION/tests}
184184

185185
[Digital Bazaar]: http://digitalbazaar.com/
186186
[JSON-LD]: http://json-ld.org/

test.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function run(PHPUnit_Framework_TestResult $result = NULL) {
2828
* @param JsonLdTest $test the test to run.
2929
*
3030
* @group expand
31+
* @group json-ld.org
3132
* @dataProvider expandProvider
3233
*/
3334
public function testExpand($test) {
@@ -43,6 +44,7 @@ public function testExpand($test) {
4344
* @param JsonLdTest $test the test to run.
4445
*
4546
* @group compact
47+
* @group json-ld.org
4648
* @dataProvider compactProvider
4749
*/
4850
public function testCompact($test) {
@@ -59,6 +61,7 @@ public function testCompact($test) {
5961
* @param JsonLdTest $test the test to run.
6062
*
6163
* @group flatten
64+
* @group json-ld.org
6265
* @dataProvider flattenProvider
6366
*/
6467
public function testFlatten($test) {
@@ -75,6 +78,7 @@ public function testFlatten($test) {
7578
* @param JsonLdTest $test the test to run.
7679
*
7780
* @group toRdf
81+
* @group json-ld.org
7882
* @dataProvider toRdfProvider
7983
*/
8084
public function testToRdf($test) {
@@ -90,6 +94,7 @@ public function testToRdf($test) {
9094
* @param JsonLdTest $test the test to run.
9195
*
9296
* @group fromRdf
97+
* @group json-ld.org
9398
* @dataProvider fromRdfProvider
9499
*/
95100
public function testFromRdf($test) {
@@ -105,6 +110,7 @@ public function testFromRdf($test) {
105110
* @param JsonLdTest $test the test to run.
106111
*
107112
* @group frame
113+
* @group json-ld.org
108114
* @dataProvider frameProvider
109115
*/
110116
public function testFrame($test) {
@@ -121,6 +127,7 @@ public function testFrame($test) {
121127
* @param JsonLdTest $test the test to run.
122128
*
123129
* @group normalize
130+
* @group json-ld.org
124131
* @dataProvider normalizeProvider
125132
*/
126133
public function testNormalize($test) {
@@ -136,6 +143,7 @@ public function testNormalize($test) {
136143
* @param JsonLdTest $test the test to run.
137144
*
138145
* @group normalize
146+
* @group normalization
139147
* @dataProvider urgna2012Provider
140148
*/
141149
public function testUrgna2012($test) {
@@ -154,6 +162,7 @@ public function testUrgna2012($test) {
154162
* @param JsonLdTest $test the test to run.
155163
*
156164
* @group normalize
165+
* @group normalization
157166
* @dataProvider urdna2015Provider
158167
*/
159168
public function testUrdna2015($test) {

0 commit comments

Comments
 (0)