From b766af768220d536182d653311dd3e68892723ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= Date: Wed, 17 Dec 2014 16:53:47 +0100 Subject: [PATCH] Have the PhpUnit plugin reports an explicit error when no test are configured. Closes #711 --- PHPCI/Plugin/PhpUnit.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PHPCI/Plugin/PhpUnit.php b/PHPCI/Plugin/PhpUnit.php index 0d7a7ba8..48874919 100644 --- a/PHPCI/Plugin/PhpUnit.php +++ b/PHPCI/Plugin/PhpUnit.php @@ -142,6 +142,11 @@ class PhpUnit implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin */ public function execute() { + if (empty($this->xmlConfigFile) && empty($this->directory)) { + $this->phpci->logFailure('Neither configuration file nor test directory found.'); + return false; + } + $success = true; $this->phpci->logExecOutput(false);