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.
This commit is contained in:
David I. Lehn 2015-10-13 14:08:27 -04:00
parent c63a5961fb
commit e98b8f61ba
3 changed files with 13 additions and 4 deletions

View file

@ -9,9 +9,9 @@ sudo: false
# all of the reference implementations? # all of the reference implementations?
script: script:
- git clone https://github.com/json-ld/json-ld.org.git _json-ld.org - git clone https://github.com/json-ld/json-ld.org.git _json-ld.org
- phpunit test.php -d ./_json-ld.org/test-suite - phpunit --group json-ld.org test.php -d ./_json-ld.org/test-suite
- git clone https://github.com/json-ld/normalization.git _normalization - git clone https://github.com/json-ld/normalization.git _normalization
- phpunit test.php -d ./_normalization/tests - phpunit --group normalization test.php -d ./_normalization/tests
notifications: notifications:
email: email:
on_success: change on_success: change

View file

@ -179,8 +179,8 @@ the `json-ld.org` and `normalization` repositories hosted on GitHub:
Then run the PHPUnit test.php application and point it at the directories Then run the PHPUnit test.php application and point it at the directories
containing the tests: containing the tests:
phpunit test.php -d {PATH_TO_JSON_LD_ORG/test-suite} phpunit --group json-ld.org test.php -d {PATH_TO_JSON_LD_ORG/test-suite}
phpunit test.php -d {PATH_TO_NORMALIZATION/tests} phpunit --group normalization test.php -d {PATH_TO_NORMALIZATION/tests}
[Digital Bazaar]: http://digitalbazaar.com/ [Digital Bazaar]: http://digitalbazaar.com/
[JSON-LD]: http://json-ld.org/ [JSON-LD]: http://json-ld.org/

View file

@ -28,6 +28,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group expand * @group expand
* @group json-ld.org
* @dataProvider expandProvider * @dataProvider expandProvider
*/ */
public function testExpand($test) { public function testExpand($test) {
@ -43,6 +44,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group compact * @group compact
* @group json-ld.org
* @dataProvider compactProvider * @dataProvider compactProvider
*/ */
public function testCompact($test) { public function testCompact($test) {
@ -59,6 +61,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group flatten * @group flatten
* @group json-ld.org
* @dataProvider flattenProvider * @dataProvider flattenProvider
*/ */
public function testFlatten($test) { public function testFlatten($test) {
@ -75,6 +78,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group toRdf * @group toRdf
* @group json-ld.org
* @dataProvider toRdfProvider * @dataProvider toRdfProvider
*/ */
public function testToRdf($test) { public function testToRdf($test) {
@ -90,6 +94,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group fromRdf * @group fromRdf
* @group json-ld.org
* @dataProvider fromRdfProvider * @dataProvider fromRdfProvider
*/ */
public function testFromRdf($test) { public function testFromRdf($test) {
@ -105,6 +110,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group frame * @group frame
* @group json-ld.org
* @dataProvider frameProvider * @dataProvider frameProvider
*/ */
public function testFrame($test) { public function testFrame($test) {
@ -121,6 +127,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group normalize * @group normalize
* @group json-ld.org
* @dataProvider normalizeProvider * @dataProvider normalizeProvider
*/ */
public function testNormalize($test) { public function testNormalize($test) {
@ -136,6 +143,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group normalize * @group normalize
* @group normalization
* @dataProvider urgna2012Provider * @dataProvider urgna2012Provider
*/ */
public function testUrgna2012($test) { public function testUrgna2012($test) {
@ -154,6 +162,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run. * @param JsonLdTest $test the test to run.
* *
* @group normalize * @group normalize
* @group normalization
* @dataProvider urdna2015Provider * @dataProvider urdna2015Provider
*/ */
public function testUrdna2015($test) { public function testUrdna2015($test) {