From b468f52e42c261cdfbbdfd55463d53894c8e20d4 Mon Sep 17 00:00:00 2001 From: arubacao Date: Sat, 19 Nov 2016 21:44:27 +0100 Subject: [PATCH 1/2] Update unittest passage Use phpunit from vendor to prevent issues don't suggest to rename `phpunit.xml.dist` https://phpunit.de/manual/current/en/organizing-tests.html#organizing-tests.xml-configuration If there is no `phpunit.xml` then phpunit will use `phpunit.xml.dist` , so whats the point in renaming it? --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1e1a4740c..5a3481aab 100644 --- a/README.md +++ b/README.md @@ -561,13 +561,12 @@ $ composer install --dev Then, run the following command: ``` -$ phpunit +$ ./vendor/bin/phpunit ``` You'll obtain some _skipped_ unit tests due to the need of API keys. -Rename the `phpunit.xml.dist` file to `phpunit.xml`, then uncomment the -following lines and add your own API keys: +Uncomment the following lines in `phpunit.xml.dist` and add your own API keys: ``` xml From 6b2dfe99fcdb30a5b833caa8b66117d5384858c9 Mon Sep 17 00:00:00 2001 From: Christopher Lass Date: Mon, 26 Dec 2016 13:23:47 +0100 Subject: [PATCH 2/2] Implement requested changes - use composer script for unittests - align readme --- README.md | 5 +++-- composer.json | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a3481aab..cb2e0a71a 100644 --- a/README.md +++ b/README.md @@ -561,12 +561,13 @@ $ composer install --dev Then, run the following command: ``` -$ ./vendor/bin/phpunit +$ composer test ``` You'll obtain some _skipped_ unit tests due to the need of API keys. -Uncomment the following lines in `phpunit.xml.dist` and add your own API keys: +Rename the `phpunit.xml.dist` file to `phpunit.xml`, then uncomment the +following lines and add your own API keys: ``` xml diff --git a/composer.json b/composer.json index 8122ff7f7..bd5fece6a 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,9 @@ "autoload": { "psr-0": { "Geocoder": "src/" } }, + "scripts": { + "test": "vendor/bin/phpunit" + }, "extra": { "branch-alias": { "dev-master": "3.3-dev"