5 * Copyright (c) 2002-2009, Sebastian Bergmann <sb@sebastian-bergmann.de>.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * * Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
20 * * Neither the name of Sebastian Bergmann nor the names of his
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
27 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
28 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
29 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
34 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
39 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>
40 * @copyright 2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
43 * @link http://www.phpunit.de/
44 * @since File available since Release 2.0.0
47 require_once 'PHPUnit/Framework.php';
48 require_once 'PHPUnit/Runner/BaseTestRunner.php';
49 require_once 'PHPUnit/Extensions/RepeatedTest.php';
50 require_once 'PHPUnit/Runner/StandardTestSuiteLoader.php';
51 require_once 'PHPUnit/Runner/Version.php';
52 require_once 'PHPUnit/TextUI/ResultPrinter.php';
53 require_once 'PHPUnit/Util/Configuration.php';
54 require_once 'PHPUnit/Util/PDO.php';
55 require_once 'PHPUnit/Util/Filesystem.php';
56 require_once 'PHPUnit/Util/Filter.php';
57 require_once 'PHPUnit/Util/Report.php';
58 require_once 'PHPUnit/Util/Timer.php';
60 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
63 * A TestRunner for the Command Line Interface (CLI)
68 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>
69 * @copyright 2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>
70 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
71 * @version Release: 3.3.17
72 * @link http://www.phpunit.de/
73 * @since Class available since Release 2.0.0
75 class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner
77 const SUCCESS_EXIT = 0;
78 const FAILURE_EXIT = 1;
79 const EXCEPTION_EXIT = 2;
82 * @var PHPUnit_Runner_TestSuiteLoader
84 protected static $loader = NULL;
87 * @var PHPUnit_TextUI_ResultPrinter
89 protected $printer = NULL;
94 protected static $versionStringPrinted = FALSE;
98 * @param array $arguments
99 * @throws InvalidArgumentException
101 public static function run($test, array $arguments = array())
103 if ($test instanceof ReflectionClass) {
104 $test = new PHPUnit_Framework_TestSuite($test);
107 if ($test instanceof PHPUnit_Framework_Test) {
108 $aTestRunner = new PHPUnit_TextUI_TestRunner;
110 return $aTestRunner->doRun(
115 throw new InvalidArgumentException(
116 'No test case or test suite found.'
122 * Runs a single test and waits until the user types RETURN.
124 * @param PHPUnit_Framework_Test $suite
126 public static function runAndWait(PHPUnit_Framework_Test $suite)
128 $aTestRunner = new PHPUnit_TextUI_TestRunner;
140 * @return PHPUnit_Framework_TestResult
142 protected function createTestResult()
144 return new PHPUnit_Framework_TestResult;
148 * @param PHPUnit_Framework_Test $suite
149 * @param array $arguments
150 * @return PHPUnit_Framework_TestResult
152 public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
154 $this->handleConfiguration($arguments);
156 if (isset($arguments['bootstrap'])) {
157 PHPUnit_Util_Fileloader::load($arguments['bootstrap']);
160 if (is_integer($arguments['repeat'])) {
161 $suite = new PHPUnit_Extensions_RepeatedTest(
163 $arguments['repeat'],
164 $arguments['filter'],
165 $arguments['groups'],
166 $arguments['excludeGroups']
170 $result = $this->createTestResult();
172 if (!$arguments['convertErrorsToExceptions']) {
173 $result->convertErrorsToExceptions(FALSE);
176 if (!$arguments['convertNoticesToExceptions']) {
177 PHPUnit_Framework_Error_Notice::$enabled = FALSE;
180 if (!$arguments['convertWarningsToExceptions']) {
181 PHPUnit_Framework_Error_Warning::$enabled = FALSE;
184 if ($arguments['stopOnFailure']) {
185 $result->stopOnFailure(TRUE);
188 if ($this->printer === NULL) {
189 if (isset($arguments['printer']) &&
190 $arguments['printer'] instanceof PHPUnit_Util_Printer) {
191 $this->printer = $arguments['printer'];
193 $this->printer = new PHPUnit_TextUI_ResultPrinter(
194 NULL, $arguments['verbose'], $arguments['colors'], $arguments['debug']
199 if (!$this->printer instanceof PHPUnit_Util_Log_TAP) {
200 $this->printer->write(
201 PHPUnit_Runner_Version::getVersionString() . "\n\n"
205 foreach ($arguments['listeners'] as $listener) {
206 $result->addListener($listener);
209 $result->addListener($this->printer);
211 if (isset($arguments['storyHTMLFile'])) {
212 require_once 'PHPUnit/Extensions/Story/ResultPrinter/HTML.php';
214 $result->addListener(
215 new PHPUnit_Extensions_Story_ResultPrinter_HTML(
216 $arguments['storyHTMLFile']
221 if (isset($arguments['storyTextFile'])) {
222 require_once 'PHPUnit/Extensions/Story/ResultPrinter/Text.php';
224 $result->addListener(
225 new PHPUnit_Extensions_Story_ResultPrinter_Text(
226 $arguments['storyTextFile']
231 if (isset($arguments['testdoxHTMLFile'])) {
232 require_once 'PHPUnit/Util/TestDox/ResultPrinter/HTML.php';
234 $result->addListener(
235 new PHPUnit_Util_TestDox_ResultPrinter_HTML(
236 $arguments['testdoxHTMLFile']
241 if (isset($arguments['testdoxTextFile'])) {
242 require_once 'PHPUnit/Util/TestDox/ResultPrinter/Text.php';
244 $result->addListener(
245 new PHPUnit_Util_TestDox_ResultPrinter_Text(
246 $arguments['testdoxTextFile']
251 if (isset($arguments['graphvizLogfile'])) {
252 if (PHPUnit_Util_Filesystem::fileExistsInIncludePath('Image/GraphViz.php')) {
253 require_once 'PHPUnit/Util/Log/GraphViz.php';
255 $result->addListener(
256 new PHPUnit_Util_Log_GraphViz($arguments['graphvizLogfile'])
261 if ((isset($arguments['coverageClover']) ||
262 isset($arguments['coverageSource']) ||
263 isset($arguments['metricsXML']) ||
264 isset($arguments['pmdXML']) ||
265 isset($arguments['reportDirectory'])) &&
266 extension_loaded('xdebug')) {
267 $result->collectCodeCoverageInformation(TRUE);
270 if (isset($arguments['jsonLogfile'])) {
271 require_once 'PHPUnit/Util/Log/JSON.php';
273 $result->addListener(
274 new PHPUnit_Util_Log_JSON($arguments['jsonLogfile'])
278 if (isset($arguments['tapLogfile'])) {
279 require_once 'PHPUnit/Util/Log/TAP.php';
281 $result->addListener(
282 new PHPUnit_Util_Log_TAP($arguments['tapLogfile'])
286 if (isset($arguments['xmlLogfile'])) {
287 require_once 'PHPUnit/Util/Log/XML.php';
289 $result->addListener(
290 new PHPUnit_Util_Log_XML(
291 $arguments['xmlLogfile'], $arguments['logIncompleteSkipped']
296 if (isset($arguments['testDatabaseDSN']) &&
297 isset($arguments['testDatabaseLogRevision']) &&
298 extension_loaded('pdo')) {
299 $writeToTestDatabase = TRUE;
301 $writeToTestDatabase = FALSE;
304 if ($writeToTestDatabase) {
305 $dbh = PHPUnit_Util_PDO::factory($arguments['testDatabaseDSN']);
307 require_once 'PHPUnit/Util/Log/Database.php';
309 $dbListener = PHPUnit_Util_Log_Database::getInstance(
311 $arguments['testDatabaseLogRevision'],
312 isset($arguments['testDatabaseLogInfo']) ? $arguments['testDatabaseLogInfo'] : ''
315 $result->addListener($dbListener);
316 $result->collectCodeCoverageInformation(TRUE);
321 $arguments['filter'],
322 $arguments['groups'],
323 $arguments['excludeGroups']
326 $result->flushListeners();
328 if ($this->printer instanceof PHPUnit_TextUI_ResultPrinter) {
329 $this->printer->printResult($result);
332 if (extension_loaded('tokenizer') && extension_loaded('xdebug')) {
333 if (isset($arguments['coverageClover'])) {
334 $this->printer->write("\nWriting code coverage data to XML file, this may take a moment.");
336 require_once 'PHPUnit/Util/Log/CodeCoverage/XML/Clover.php';
338 $writer = new PHPUnit_Util_Log_CodeCoverage_XML_Clover(
339 $arguments['coverageClover']
342 $writer->process($result);
343 $this->printer->write("\n");
346 if (isset($arguments['coverageSource'])) {
347 $this->printer->write("\nWriting code coverage data to XML files, this may take a moment.");
349 require_once 'PHPUnit/Util/Log/CodeCoverage/XML/Source.php';
351 $writer = new PHPUnit_Util_Log_CodeCoverage_XML_Source(
352 $arguments['coverageSource']
355 $writer->process($result);
356 $this->printer->write("\n");
359 if ($writeToTestDatabase) {
360 $this->printer->write("\nStoring code coverage and software metrics data in database.\nThis may take a moment.");
362 require_once 'PHPUnit/Util/Log/CodeCoverage/Database.php';
364 $testDb = new PHPUnit_Util_Log_CodeCoverage_Database($dbh);
365 $testDb->storeCodeCoverage(
367 $dbListener->getRunId(),
368 $arguments['testDatabaseLogRevision'],
369 $arguments['testDatabasePrefix']
372 $this->printer->write("\n");
375 if (isset($arguments['metricsXML'])) {
376 $this->printer->write("\nWriting metrics report XML file, this may take a moment.");
378 require_once 'PHPUnit/Util/Log/Metrics.php';
380 $writer = new PHPUnit_Util_Log_Metrics(
381 $arguments['metricsXML']
384 $writer->process($result);
385 $this->printer->write("\n");
388 if (isset($arguments['pmdXML'])) {
389 require_once 'PHPUnit/Util/Log/PMD.php';
391 $writer = new PHPUnit_Util_Log_PMD(
392 $arguments['pmdXML'], $arguments['pmd']
395 $this->printer->write("\nWriting violations report XML file, this may take a moment.");
396 $writer->process($result);
398 require_once 'PHPUnit/Util/Log/CPD.php';
400 $writer = new PHPUnit_Util_Log_CPD(
401 str_replace('.xml', '-cpd.xml', $arguments['pmdXML'])
405 $result, $arguments['cpdMinLines'], $arguments['cpdMinMatches']
408 $this->printer->write("\n");
411 if (isset($arguments['reportDirectory'])) {
412 $this->printer->write("\nGenerating code coverage report, this may take a moment.");
416 PHPUnit_Util_Report::render(
418 $arguments['reportDirectory'],
419 $arguments['reportCharset'],
420 $arguments['reportYUI'],
421 $arguments['reportHighlight'],
422 $arguments['reportLowUpperBound'],
423 $arguments['reportHighLowerBound']
426 $this->printer->write("\n");
430 $this->pause($arguments['wait']);
436 * @param boolean $wait
438 protected function pause($wait)
444 if ($this->printer instanceof PHPUnit_TextUI_ResultPrinter) {
445 $this->printer->printWaitPrompt();
452 * @param PHPUnit_TextUI_ResultPrinter $resultPrinter
454 public function setPrinter(PHPUnit_TextUI_ResultPrinter $resultPrinter)
456 $this->printer = $resultPrinter;
462 * @param string $testName
464 public function testStarted($testName)
471 * @param string $testName
473 public function testEnded($testName)
480 * @param integer $status
481 * @param PHPUnit_Framework_Test $test
482 * @param PHPUnit_Framework_AssertionFailedError $e
484 public function testFailed($status, PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e)
489 * Override to define how to handle a failed loading of
492 * @param string $message
494 protected function runFailed($message)
496 self::printVersionString();
497 self::write($message);
498 exit(self::FAILURE_EXIT);
502 * @param string $buffer
503 * @since Method available since Release 3.1.0
505 protected static function write($buffer)
507 if (PHP_SAPI != 'cli') {
508 $buffer = htmlspecialchars($buffer);
515 * Returns the loader to be used.
517 * @return PHPUnit_Runner_TestSuiteLoader
518 * @since Method available since Release 2.2.0
520 public function getLoader()
522 if (self::$loader === NULL) {
523 self::$loader = new PHPUnit_Runner_StandardTestSuiteLoader;
526 return self::$loader;
530 * Sets the loader to be used.
532 * @param PHPUnit_Runner_TestSuiteLoader $loader
533 * @since Method available since Release 3.0.0
535 public static function setLoader(PHPUnit_Runner_TestSuiteLoader $loader)
537 self::$loader = $loader;
542 public static function showError($message)
544 self::printVersionString();
545 self::write($message . "\n");
547 exit(self::FAILURE_EXIT);
553 public static function printVersionString()
555 if (!self::$versionStringPrinted) {
556 self::write(PHPUnit_Runner_Version::getVersionString() . "\n\n");
557 self::$versionStringPrinted = TRUE;
562 * @param array $arguments
563 * @since Method available since Release 3.2.1
565 protected function handleConfiguration(array &$arguments)
567 if (isset($arguments['configuration'])) {
568 $arguments['configuration'] = new PHPUnit_Util_Configuration(
569 $arguments['configuration']
572 $arguments['pmd'] = $arguments['configuration']->getPMDConfiguration();
574 $arguments['pmd'] = array();
577 $arguments['debug'] = isset($arguments['debug']) ? $arguments['debug'] : FALSE;
578 $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : FALSE;
579 $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array();
580 $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : FALSE;
581 $arguments['testDatabasePrefix'] = isset($arguments['testDatabasePrefix']) ? $arguments['testDatabasePrefix'] : '';
582 $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : FALSE;
583 $arguments['wait'] = isset($arguments['wait']) ? $arguments['wait'] : FALSE;
585 if (isset($arguments['configuration'])) {
586 $arguments['configuration']->handlePHPConfiguration();
588 $filterConfiguration = $arguments['configuration']->getFilterConfiguration();
590 PHPUnit_Util_Filter::$addUncoveredFilesFromWhitelist = $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist'];
592 foreach ($filterConfiguration['blacklist']['include']['directory'] as $dir) {
593 PHPUnit_Util_Filter::addDirectoryToFilter(
594 $dir['path'], $dir['suffix']
598 foreach ($filterConfiguration['blacklist']['include']['file'] as $file) {
599 PHPUnit_Util_Filter::addFileToFilter($file);
602 foreach ($filterConfiguration['blacklist']['exclude']['directory'] as $dir) {
603 PHPUnit_Util_Filter::removeDirectoryFromFilter(
604 $dir['path'], $dir['suffix']
608 foreach ($filterConfiguration['blacklist']['exclude']['file'] as $file) {
609 PHPUnit_Util_Filter::removeFileFromFilter($file);
612 foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) {
613 PHPUnit_Util_Filter::addDirectoryToWhitelist(
614 $dir['path'], $dir['suffix']
618 foreach ($filterConfiguration['whitelist']['include']['file'] as $file) {
619 PHPUnit_Util_Filter::addFileToWhitelist($file);
622 foreach ($filterConfiguration['whitelist']['exclude']['directory'] as $dir) {
623 PHPUnit_Util_Filter::removeDirectoryFromWhitelist(
624 $dir['path'], $dir['suffix']
628 foreach ($filterConfiguration['whitelist']['exclude']['file'] as $file) {
629 PHPUnit_Util_Filter::removeFileFromWhitelist($file);
632 $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration();
634 if (isset($phpunitConfiguration['bootstrap']) && !isset($arguments['bootstrap'])) {
635 $arguments['bootstrap'] = $phpunitConfiguration['bootstrap'];
638 if (isset($phpunitConfiguration['colors']) && !isset($arguments['colors'])) {
639 $arguments['colors'] = $phpunitConfiguration['colors'];
642 if (isset($phpunitConfiguration['convertErrorsToExceptions']) && !isset($arguments['convertErrorsToExceptions'])) {
643 $arguments['convertErrorsToExceptions'] = $phpunitConfiguration['convertErrorsToExceptions'];
646 if (isset($phpunitConfiguration['convertNoticesToExceptions']) && !isset($arguments['convertNoticesToExceptions'])) {
647 $arguments['convertNoticesToExceptions'] = $phpunitConfiguration['convertNoticesToExceptions'];
650 if (isset($phpunitConfiguration['convertWarningsToExceptions']) && !isset($arguments['convertWarningsToExceptions'])) {
651 $arguments['convertWarningsToExceptions'] = $phpunitConfiguration['convertWarningsToExceptions'];
654 if (isset($phpunitConfiguration['stopOnFailure']) && !isset($arguments['stopOnFailure'])) {
655 $arguments['stopOnFailure'] = $phpunitConfiguration['stopOnFailure'];
658 $groupConfiguration = $arguments['configuration']->getGroupConfiguration();
660 if (!empty($groupConfiguration['include']) && !isset($arguments['groups'])) {
661 $arguments['groups'] = $groupConfiguration['include'];
664 if (!empty($groupConfiguration['exclude']) && !isset($arguments['excludeGroups'])) {
665 $arguments['excludeGroups'] = $groupConfiguration['exclude'];
668 $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration();
670 if (isset($loggingConfiguration['coverage-html']) && !isset($arguments['reportDirectory'])) {
671 if (isset($loggingConfiguration['charset']) && !isset($arguments['reportCharset'])) {
672 $arguments['reportCharset'] = $loggingConfiguration['charset'];
675 if (isset($loggingConfiguration['yui']) && !isset($arguments['reportYUI'])) {
676 $arguments['reportYUI'] = $loggingConfiguration['yui'];
679 if (isset($loggingConfiguration['highlight']) && !isset($arguments['reportHighlight'])) {
680 $arguments['reportHighlight'] = $loggingConfiguration['highlight'];
683 if (isset($loggingConfiguration['lowUpperBound']) && !isset($arguments['reportLowUpperBound'])) {
684 $arguments['reportLowUpperBound'] = $loggingConfiguration['lowUpperBound'];
687 if (isset($loggingConfiguration['highLowerBound']) && !isset($arguments['reportHighLowerBound'])) {
688 $arguments['reportHighLowerBound'] = $loggingConfiguration['highLowerBound'];
691 $arguments['reportDirectory'] = $loggingConfiguration['coverage-html'];
694 if (isset($loggingConfiguration['coverage-clover']) && !isset($arguments['coverageClover'])) {
695 $arguments['coverageClover'] = $loggingConfiguration['coverage-clover'];
698 if (isset($loggingConfiguration['coverage-xml']) && !isset($arguments['coverageClover'])) {
699 $arguments['coverageClover'] = $loggingConfiguration['coverage-xml'];
702 if (isset($loggingConfiguration['coverage-source']) && !isset($arguments['coverageSource'])) {
703 $arguments['coverageSource'] = $loggingConfiguration['coverage-source'];
706 if (isset($loggingConfiguration['graphviz']) && !isset($arguments['graphvizLogfile'])) {
707 $arguments['graphvizLogfile'] = $loggingConfiguration['graphviz'];
710 if (isset($loggingConfiguration['json']) && !isset($arguments['jsonLogfile'])) {
711 $arguments['jsonLogfile'] = $loggingConfiguration['json'];
714 if (isset($loggingConfiguration['metrics-xml']) && !isset($arguments['metricsXML'])) {
715 $arguments['metricsXML'] = $loggingConfiguration['metrics-xml'];
718 if (isset($loggingConfiguration['plain'])) {
719 $arguments['listeners'][] = new PHPUnit_TextUI_ResultPrinter($loggingConfiguration['plain'], TRUE);
722 if (isset($loggingConfiguration['pmd-xml']) && !isset($arguments['pmdXML'])) {
723 if (isset($loggingConfiguration['cpdMinLines']) && !isset($arguments['cpdMinLines'])) {
724 $arguments['cpdMinLines'] = $loggingConfiguration['cpdMinLines'];
727 if (isset($loggingConfiguration['cpdMinMatches']) && !isset($arguments['cpdMinMatches'])) {
728 $arguments['cpdMinMatches'] = $loggingConfiguration['cpdMinMatches'];
731 $arguments['pmdXML'] = $loggingConfiguration['pmd-xml'];
734 if (isset($loggingConfiguration['tap']) && !isset($arguments['tapLogfile'])) {
735 $arguments['tapLogfile'] = $loggingConfiguration['tap'];
738 if (isset($loggingConfiguration['test-xml']) && !isset($arguments['xmlLogfile'])) {
739 $arguments['xmlLogfile'] = $loggingConfiguration['test-xml'];
741 if (isset($loggingConfiguration['logIncompleteSkipped']) && !isset($arguments['logIncompleteSkipped'])) {
742 $arguments['logIncompleteSkipped'] = $loggingConfiguration['logIncompleteSkipped'];
746 if (isset($loggingConfiguration['story-html']) && !isset($arguments['storyHTMLFile'])) {
747 $arguments['storyHTMLFile'] = $loggingConfiguration['story-html'];
750 if (isset($loggingConfiguration['story-text']) && !isset($arguments['storyTextFile'])) {
751 $arguments['storsTextFile'] = $loggingConfiguration['story-text'];
754 if (isset($loggingConfiguration['testdox-html']) && !isset($arguments['testdoxHTMLFile'])) {
755 $arguments['testdoxHTMLFile'] = $loggingConfiguration['testdox-html'];
758 if (isset($loggingConfiguration['testdox-text']) && !isset($arguments['testdoxTextFile'])) {
759 $arguments['testdoxTextFile'] = $loggingConfiguration['testdox-text'];
763 $arguments['cpdMinLines'] = isset($arguments['cpdMinLines']) ? $arguments['cpdMinLines'] : 5;
764 $arguments['cpdMinMatches'] = isset($arguments['cpdMinMatches']) ? $arguments['cpdMinMatches'] : 70;
765 $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : FALSE;
766 $arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : TRUE;
767 $arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : TRUE;
768 $arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsToExceptions']) ? $arguments['convertWarningsToExceptions'] : TRUE;
769 $arguments['excludeGroups'] = isset($arguments['excludeGroups']) ? $arguments['excludeGroups'] : array();
770 $arguments['groups'] = isset($arguments['groups']) ? $arguments['groups'] : array();
771 $arguments['logIncompleteSkipped'] = isset($arguments['logIncompleteSkipped']) ? $arguments['logIncompleteSkipped'] : FALSE;
772 $arguments['reportCharset'] = isset($arguments['reportCharset']) ? $arguments['reportCharset'] : 'ISO-8859-1';
773 $arguments['reportHighlight'] = isset($arguments['reportHighlight']) ? $arguments['reportHighlight'] : FALSE;
774 $arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerBound']) ? $arguments['reportHighLowerBound'] : 70;
775 $arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBound']) ? $arguments['reportLowUpperBound'] : 35;
776 $arguments['reportYUI'] = isset($arguments['reportYUI']) ? $arguments['reportYUI'] : TRUE;
777 $arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : FALSE;
779 if ($arguments['filter'] !== FALSE && preg_match('/^[a-zA-Z0-9_]/', $arguments['filter'])) {
780 $arguments['filter'] = '/' . $arguments['filter'] . '/';