com phpruntests: fix to deal with directories that have no runnable tests: src/testgroup/rtPhpTestGroup.php

From: Date: Wed, 01 Jul 2009 20:17:35 +0000
Subject: com phpruntests: fix to deal with directories that have no runnable tests: src/testgroup/rtPhpTestGroup.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66384@lists.php.net to get a copy of this message
Commit: f29f98e3031827a326915c0d04d86eaa24bd63c8 Author: Zoe Slattery <zoe@php.net> Wed, 1 Jul 2009 20:17:35 +0000 Parents: e8f4c0052b5c5749caa4940904992f73f924a5aa Branches: master Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=f29f98e3031827a326915c0d04d86eaa24bd63c8 Log: fix to deal with directories that have no runnable tests Changed paths: M src/testgroup/rtPhpTestGroup.php Diff: diff --git a/src/testgroup/rtPhpTestGroup.php b/src/testgroup/rtPhpTestGroup.php index 1fd09ad..200f4f9 100644 --- a/src/testgroup/rtPhpTestGroup.php +++ b/src/testgroup/rtPhpTestGroup.php @@ -25,12 +25,12 @@ class rtPhpTestGroup } public function init(rtRuntestsConfiguration $runConfiguration) - { + { $this->testFiles = rtUtil::getTestList($this->testDirectory); foreach ($this->testFiles as $testFileName) { - //testFiles is a list of file namnes relative to the current working directory + //testFiles is a list of file names relative to the current working directory if (!file_exists($testFileName)) { echo rtText::get('invalidTestFileName', array($testFileName)); @@ -60,6 +60,9 @@ class rtPhpTestGroup public function runGroup(rtRuntestsConfiguration $runConfiguration) { + if (count($this->testCases) == 0) { + return; + } foreach ($this->testCases as $testCase) { $testCase->executeTest($runConfiguration);

« previous php.qa (#66384) next »