From 87885c54fc299211b8168e9d77415cea320a9ab7 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 20 Dec 2016 11:50:13 -0500 Subject: [PATCH 1/2] Add `composer test` command `composer test` seems like a common convention for running tests in PHP projects. This change adds `test` as a script in the composer.json. When you run `composer test` the single test file is run. --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6c25efb..bfccd1e 100644 --- a/composer.json +++ b/composer.json @@ -20,5 +20,8 @@ "psr-4": { "Phospr\\": "src" } - } + }, + "scripts": { + "test": "phpunit tests/FractionTest.php" + } } From 6ee62dff9d3ecc4e78e8b93e3a8a924fb840bfce Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 20 Dec 2016 12:00:41 -0500 Subject: [PATCH 2/2] Run test directory instead of specific file --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index bfccd1e..33718c1 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,6 @@ } }, "scripts": { - "test": "phpunit tests/FractionTest.php" + "test": "phpunit tests" } }