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?
script:
- 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
- phpunit test.php -d ./_normalization/tests
- phpunit --group normalization test.php -d ./_normalization/tests
notifications:
email:
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
containing the tests:
phpunit test.php -d {PATH_TO_JSON_LD_ORG/test-suite}
phpunit test.php -d {PATH_TO_NORMALIZATION/tests}
phpunit --group json-ld.org test.php -d {PATH_TO_JSON_LD_ORG/test-suite}
phpunit --group normalization test.php -d {PATH_TO_NORMALIZATION/tests}
[Digital Bazaar]: http://digitalbazaar.com/
[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.
*
* @group expand
* @group json-ld.org
* @dataProvider expandProvider
*/
public function testExpand($test) {
@ -43,6 +44,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group compact
* @group json-ld.org
* @dataProvider compactProvider
*/
public function testCompact($test) {
@ -59,6 +61,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group flatten
* @group json-ld.org
* @dataProvider flattenProvider
*/
public function testFlatten($test) {
@ -75,6 +78,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group toRdf
* @group json-ld.org
* @dataProvider toRdfProvider
*/
public function testToRdf($test) {
@ -90,6 +94,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group fromRdf
* @group json-ld.org
* @dataProvider fromRdfProvider
*/
public function testFromRdf($test) {
@ -105,6 +110,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group frame
* @group json-ld.org
* @dataProvider frameProvider
*/
public function testFrame($test) {
@ -121,6 +127,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group normalize
* @group json-ld.org
* @dataProvider normalizeProvider
*/
public function testNormalize($test) {
@ -136,6 +143,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group normalize
* @group normalization
* @dataProvider urgna2012Provider
*/
public function testUrgna2012($test) {
@ -154,6 +162,7 @@ class JsonLdTestCase extends PHPUnit_Framework_TestCase {
* @param JsonLdTest $test the test to run.
*
* @group normalize
* @group normalization
* @dataProvider urdna2015Provider
*/
public function testUrdna2015($test) {