Lines Matching refs:arguments

79      * @param array                                  $arguments
85 public static function run($test, array $arguments = []) argument
96 $arguments
115 * @param array $arguments
117 private function processSuiteFilters(PHPUnit_Framework_TestSuite $suite, array $arguments) argument
119 if (!$arguments['filter'] &&
120 empty($arguments['groups']) &&
121 empty($arguments['excludeGroups'])) {
127 if (!empty($arguments['excludeGroups'])) {
130 $arguments['excludeGroups']
134 if (!empty($arguments['groups'])) {
137 $arguments['groups']
141 if ($arguments['filter']) {
144 $arguments['filter']
152 * @param array $arguments
157 public function doRun(PHPUnit_Framework_Test $suite, array $arguments = [], $exit = true) argument
159 if (isset($arguments['configuration'])) {
160 $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] = $arguments['configuration'];
163 $this->handleConfiguration($arguments);
165 $this->processSuiteFilters($suite, $arguments);
167 if (isset($arguments['bootstrap'])) {
168 $GLOBALS['__PHPUNIT_BOOTSTRAP'] = $arguments['bootstrap'];
171 if ($arguments['backupGlobals'] === false) {
175 if ($arguments['backupStaticAttributes'] === true) {
179 if ($arguments['beStrictAboutChangesToGlobalState'] === true) {
183 if (is_int($arguments['repeat'])) {
186 $arguments['repeat'],
187 $arguments['processIsolation']
196 if (!$arguments['convertErrorsToExceptions']) {
200 if (!$arguments['convertNoticesToExceptions']) {
204 if (!$arguments['convertWarningsToExceptions']) {
208 if ($arguments['stopOnError']) {
212 if ($arguments['stopOnFailure']) {
216 if ($arguments['stopOnWarning']) {
220 if ($arguments['stopOnIncomplete']) {
224 if ($arguments['stopOnRisky']) {
228 if ($arguments['stopOnSkipped']) {
232 if ($arguments['registerMockObjectsFromTestArgumentsRecursively']) {
237 if (isset($arguments['printer']) &&
238 $arguments['printer'] instanceof PHPUnit_Util_Printer) {
239 $this->printer = $arguments['printer'];
243 if (isset($arguments['printer']) &&
244 is_string($arguments['printer']) &&
245 class_exists($arguments['printer'], false)) {
246 $class = new ReflectionClass($arguments['printer']);
249 $printerClass = $arguments['printer'];
254 … (isset($arguments['stderr']) && $arguments['stderr'] === true) ? 'php://stderr' : null,
255 $arguments['verbose'],
256 $arguments['colors'],
257 $arguments['debug'],
258 $arguments['columns'],
259 $arguments['reverseList']
271 if ($arguments['verbose']) {
283 if (isset($arguments['configuration'])) {
286 $arguments['configuration']->getFilename()
290 foreach ($arguments['loadedExtensions'] as $extension) {
297 foreach ($arguments['notLoadedExtensions'] as $extension) {
305 if (isset($arguments['deprecatedCheckForUnintentionallyCoveredCodeSettingUsed'])) {
309 if (isset($arguments['tapLogfile'])) {
313 if (isset($arguments['jsonLogfile'])) {
318 foreach ($arguments['listeners'] as $listener) {
324 if (isset($arguments['testdoxHTMLFile'])) {
327 $arguments['testdoxHTMLFile'],
328 $arguments['testdoxGroups'],
329 $arguments['testdoxExcludeGroups']
334 if (isset($arguments['testdoxTextFile'])) {
337 $arguments['testdoxTextFile'],
338 $arguments['testdoxGroups'],
339 $arguments['testdoxExcludeGroups']
344 if (isset($arguments['testdoxXMLFile'])) {
347 $arguments['testdoxXMLFile']
354 if (isset($arguments['coverageClover'])) {
358 if (isset($arguments['coverageCrap4J'])) {
362 if (isset($arguments['coverageHtml'])) {
366 if (isset($arguments['coveragePHP'])) {
370 if (isset($arguments['coverageText'])) {
374 if (isset($arguments['coverageXml'])) {
378 if (isset($arguments['noCoverage'])) {
403 $arguments['strictCoverage']
407 $arguments['strictCoverage']
410 if (isset($arguments['forceCoversAnnotation'])) {
412 $arguments['forceCoversAnnotation']
416 if (isset($arguments['disableCodeCoverageIgnore'])) {
420 if (isset($arguments['whitelist'])) {
421 $this->codeCoverageFilter->addDirectoryToWhitelist($arguments['whitelist']);
424 if (isset($arguments['configuration'])) {
425 $filterConfiguration = $arguments['configuration']->getFilterConfiguration();
472 if ($codeCoverageReports > 1 && isset($arguments['cacheTokens'])) {
473 $codeCoverage->setCacheTokens($arguments['cacheTokens']);
477 if (isset($arguments['jsonLogfile'])) {
479 new PHPUnit_Util_Log_JSON($arguments['jsonLogfile'])
483 if (isset($arguments['tapLogfile'])) {
485 new PHPUnit_Util_Log_TAP($arguments['tapLogfile'])
489 if (isset($arguments['teamcityLogfile'])) {
491 new PHPUnit_Util_Log_TeamCity($arguments['teamcityLogfile'])
495 if (isset($arguments['junitLogfile'])) {
498 $arguments['junitLogfile'],
499 $arguments['logIncompleteSkipped']
504 $result->beStrictAboutTestsThatDoNotTestAnything($arguments['reportUselessTests']);
505 $result->beStrictAboutOutputDuringTests($arguments['disallowTestOutput']);
506 $result->beStrictAboutTodoAnnotatedTests($arguments['disallowTodoAnnotatedTests']);
507 …$result->beStrictAboutResourceUsageDuringSmallTests($arguments['beStrictAboutResourceUsageDuringSm…
508 $result->enforceTimeLimit($arguments['enforceTimeLimit']);
509 $result->setTimeoutForSmallTests($arguments['timeoutForSmallTests']);
510 $result->setTimeoutForMediumTests($arguments['timeoutForMediumTests']);
511 $result->setTimeoutForLargeTests($arguments['timeoutForLargeTests']);
514 $suite->setRunTestInSeparateProcess($arguments['processIsolation']);
527 if (isset($arguments['coverageClover'])) {
534 $writer->process($codeCoverage, $arguments['coverageClover']);
545 if (isset($arguments['coverageCrap4J'])) {
551 $writer = new Crap4jReport($arguments['crap4jThreshold']);
552 $writer->process($codeCoverage, $arguments['coverageCrap4J']);
563 if (isset($arguments['coverageHtml'])) {
570 $arguments['reportLowUpperBound'],
571 $arguments['reportHighLowerBound'],
578 $writer->process($codeCoverage, $arguments['coverageHtml']);
589 if (isset($arguments['coveragePHP'])) {
596 $writer->process($codeCoverage, $arguments['coveragePHP']);
607 if (isset($arguments['coverageText'])) {
608 if ($arguments['coverageText'] == 'php://stdout') {
610 …$colors = $arguments['colors'] && $arguments['colors'] != PHPUnit_TextUI_ResultPrinter::COLO…
612 $outputStream = new PHPUnit_Util_Printer($arguments['coverageText']);
617 $arguments['reportLowUpperBound'],
618 $arguments['reportHighLowerBound'],
619 $arguments['coverageTextShowUncoveredFiles'],
620 $arguments['coverageTextShowOnlySummary']
628 if (isset($arguments['coverageXml'])) {
635 $writer->process($codeCoverage, $arguments['coverageXml']);
649 if ($arguments['failOnRisky'] && !$result->allHarmless()) {
653 if ($arguments['failOnWarning'] && $result->warningCount() > 0) {
723 * @param array $arguments
725 protected function handleConfiguration(array &$arguments) argument
727 if (isset($arguments['configuration']) &&
728 !$arguments['configuration'] instanceof PHPUnit_Util_Configuration) {
729 $arguments['configuration'] = PHPUnit_Util_Configuration::getInstance(
730 $arguments['configuration']
734 $arguments['debug'] = isset($arguments['debug']) ? $arguments['debug'] : false;
735 $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : false;
736 $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : [];
738 if (isset($arguments['configuration'])) {
739 $arguments['configuration']->handlePHPConfiguration();
741 $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration();
744 $arguments['deprecatedCheckForUnintentionallyCoveredCodeSettingUsed'] = true;
748 !isset($arguments['backupGlobals'])) {
749 $arguments['backupGlobals'] = $phpunitConfiguration['backupGlobals'];
753 !isset($arguments['backupStaticAttributes'])) {
754 … $arguments['backupStaticAttributes'] = $phpunitConfiguration['backupStaticAttributes'];
758 !isset($arguments['beStrictAboutChangesToGlobalState'])) {
759 …$arguments['beStrictAboutChangesToGlobalState'] = $phpunitConfiguration['beStrictAboutChangesToGlo…
763 !isset($arguments['bootstrap'])) {
764 $arguments['bootstrap'] = $phpunitConfiguration['bootstrap'];
768 !isset($arguments['cacheTokens'])) {
769 $arguments['cacheTokens'] = $phpunitConfiguration['cacheTokens'];
773 !isset($arguments['colors'])) {
774 $arguments['colors'] = $phpunitConfiguration['colors'];
778 !isset($arguments['convertErrorsToExceptions'])) {
779 … $arguments['convertErrorsToExceptions'] = $phpunitConfiguration['convertErrorsToExceptions'];
783 !isset($arguments['convertNoticesToExceptions'])) {
784 … $arguments['convertNoticesToExceptions'] = $phpunitConfiguration['convertNoticesToExceptions'];
788 !isset($arguments['convertWarningsToExceptions'])) {
789 … $arguments['convertWarningsToExceptions'] = $phpunitConfiguration['convertWarningsToExceptions'];
793 !isset($arguments['processIsolation'])) {
794 $arguments['processIsolation'] = $phpunitConfiguration['processIsolation'];
798 !isset($arguments['stopOnError'])) {
799 $arguments['stopOnError'] = $phpunitConfiguration['stopOnError'];
803 !isset($arguments['stopOnFailure'])) {
804 $arguments['stopOnFailure'] = $phpunitConfiguration['stopOnFailure'];
808 !isset($arguments['stopOnWarning'])) {
809 $arguments['stopOnWarning'] = $phpunitConfiguration['stopOnWarning'];
813 !isset($arguments['stopOnIncomplete'])) {
814 $arguments['stopOnIncomplete'] = $phpunitConfiguration['stopOnIncomplete'];
818 !isset($arguments['stopOnRisky'])) {
819 $arguments['stopOnRisky'] = $phpunitConfiguration['stopOnRisky'];
823 !isset($arguments['stopOnSkipped'])) {
824 $arguments['stopOnSkipped'] = $phpunitConfiguration['stopOnSkipped'];
828 !isset($arguments['failOnWarning'])) {
829 $arguments['failOnWarning'] = $phpunitConfiguration['failOnWarning'];
833 !isset($arguments['failOnRisky'])) {
834 $arguments['failOnRisky'] = $phpunitConfiguration['failOnRisky'];
838 !isset($arguments['timeoutForSmallTests'])) {
839 $arguments['timeoutForSmallTests'] = $phpunitConfiguration['timeoutForSmallTests'];
843 !isset($arguments['timeoutForMediumTests'])) {
844 … $arguments['timeoutForMediumTests'] = $phpunitConfiguration['timeoutForMediumTests'];
848 !isset($arguments['timeoutForLargeTests'])) {
849 $arguments['timeoutForLargeTests'] = $phpunitConfiguration['timeoutForLargeTests'];
853 !isset($arguments['reportUselessTests'])) {
854 $arguments['reportUselessTests'] = $phpunitConfiguration['reportUselessTests'];
858 !isset($arguments['strictCoverage'])) {
859 $arguments['strictCoverage'] = $phpunitConfiguration['strictCoverage'];
863 !isset($arguments['disallowTestOutput'])) {
864 $arguments['disallowTestOutput'] = $phpunitConfiguration['disallowTestOutput'];
868 !isset($arguments['enforceTimeLimit'])) {
869 $arguments['enforceTimeLimit'] = $phpunitConfiguration['enforceTimeLimit'];
873 !isset($arguments['disallowTodoAnnotatedTests'])) {
874 … $arguments['disallowTodoAnnotatedTests'] = $phpunitConfiguration['disallowTodoAnnotatedTests'];
878 !isset($arguments['beStrictAboutResourceUsageDuringSmallTests'])) {
879 …$arguments['beStrictAboutResourceUsageDuringSmallTests'] = $phpunitConfiguration['beStrictAboutRes…
883 !isset($arguments['verbose'])) {
884 $arguments['verbose'] = $phpunitConfiguration['verbose'];
888 !isset($arguments['reverseList'])) {
889 $arguments['reverseList'] = $phpunitConfiguration['reverseDefectList'];
893 !isset($arguments['forceCoversAnnotation'])) {
894 … $arguments['forceCoversAnnotation'] = $phpunitConfiguration['forceCoversAnnotation'];
898 !isset($arguments['disableCodeCoverageIgnore'])) {
899 … $arguments['disableCodeCoverageIgnore'] = $phpunitConfiguration['disableCodeCoverageIgnore'];
903 !isset($arguments['registerMockObjectsFromTestArgumentsRecursively'])) {
904 …$arguments['registerMockObjectsFromTestArgumentsRecursively'] = $phpunitConfiguration['registerMoc…
909 if (!empty($arguments['groups'])) {
910 $groupCliArgs = $arguments['groups'];
913 $groupConfiguration = $arguments['configuration']->getGroupConfiguration();
916 !isset($arguments['groups'])) {
917 $arguments['groups'] = $groupConfiguration['include'];
921 !isset($arguments['excludeGroups'])) {
922 … $arguments['excludeGroups'] = array_diff($groupConfiguration['exclude'], $groupCliArgs);
925 foreach ($arguments['configuration']->getListenerConfiguration() as $listener) {
959 $arguments['listeners'][] = $listener;
962 $loggingConfiguration = $arguments['configuration']->getLoggingConfiguration();
965 !isset($arguments['coverageClover'])) {
966 $arguments['coverageClover'] = $loggingConfiguration['coverage-clover'];
970 !isset($arguments['coverageCrap4J'])) {
971 $arguments['coverageCrap4J'] = $loggingConfiguration['coverage-crap4j'];
974 !isset($arguments['crap4jThreshold'])) {
975 $arguments['crap4jThreshold'] = $loggingConfiguration['crap4jThreshold'];
980 !isset($arguments['coverageHtml'])) {
982 !isset($arguments['reportLowUpperBound'])) {
983 $arguments['reportLowUpperBound'] = $loggingConfiguration['lowUpperBound'];
987 !isset($arguments['reportHighLowerBound'])) {
988 $arguments['reportHighLowerBound'] = $loggingConfiguration['highLowerBound'];
991 $arguments['coverageHtml'] = $loggingConfiguration['coverage-html'];
995 !isset($arguments['coveragePHP'])) {
996 $arguments['coveragePHP'] = $loggingConfiguration['coverage-php'];
1000 !isset($arguments['coverageText'])) {
1001 $arguments['coverageText'] = $loggingConfiguration['coverage-text'];
1003 …$arguments['coverageTextShowUncoveredFiles'] = $loggingConfiguration['coverageTextShowUncoveredFil…
1005 $arguments['coverageTextShowUncoveredFiles'] = false;
1008 … $arguments['coverageTextShowOnlySummary'] = $loggingConfiguration['coverageTextShowOnlySummary'];
1010 $arguments['coverageTextShowOnlySummary'] = false;
1015 !isset($arguments['coverageXml'])) {
1016 $arguments['coverageXml'] = $loggingConfiguration['coverage-xml'];
1020 !isset($arguments['jsonLogfile'])) {
1021 $arguments['jsonLogfile'] = $loggingConfiguration['json'];
1025 $arguments['listeners'][] = new PHPUnit_TextUI_ResultPrinter(
1032 !isset($arguments['tapLogfile'])) {
1033 $arguments['tapLogfile'] = $loggingConfiguration['tap'];
1037 !isset($arguments['teamcityLogfile'])) {
1038 $arguments['teamcityLogfile'] = $loggingConfiguration['teamcity'];
1042 !isset($arguments['junitLogfile'])) {
1043 $arguments['junitLogfile'] = $loggingConfiguration['junit'];
1046 !isset($arguments['logIncompleteSkipped'])) {
1047 … $arguments['logIncompleteSkipped'] = $loggingConfiguration['logIncompleteSkipped'];
1052 !isset($arguments['testdoxHTMLFile'])) {
1053 $arguments['testdoxHTMLFile'] = $loggingConfiguration['testdox-html'];
1057 !isset($arguments['testdoxTextFile'])) {
1058 $arguments['testdoxTextFile'] = $loggingConfiguration['testdox-text'];
1062 !isset($arguments['testdoxXMLFile'])) {
1063 $arguments['testdoxXMLFile'] = $loggingConfiguration['testdox-xml'];
1066 … $testdoxGroupConfiguration = $arguments['configuration']->getTestdoxGroupConfiguration();
1069 !isset($arguments['testdoxGroups'])) {
1070 $arguments['testdoxGroups'] = $testdoxGroupConfiguration['include'];
1074 !isset($arguments['testdoxExcludeGroups'])) {
1075 $arguments['testdoxExcludeGroups'] = $testdoxGroupConfiguration['exclude'];
1079 …$arguments['addUncoveredFilesFromWhitelist'] = isset($arguments['addUncoveredFile…
1080 …$arguments['processUncoveredFilesFromWhitelist'] = isset($arguments['processUncovered…
1081 …$arguments['backupGlobals'] = isset($arguments['backupGlobals'])…
1082 …$arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttr…
1083 …$arguments['beStrictAboutChangesToGlobalState'] = isset($arguments['beStrictAboutCha…
1084 …$arguments['cacheTokens'] = isset($arguments['cacheTokens']) …
1085 …$arguments['columns'] = isset($arguments['columns']) …
1086 …$arguments['colors'] = isset($arguments['colors']) …
1087 …$arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToE…
1088 …$arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesTo…
1089 …$arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsT…
1090 …$arguments['excludeGroups'] = isset($arguments['excludeGroups'])…
1091 …$arguments['groups'] = isset($arguments['groups']) …
1092 …$arguments['logIncompleteSkipped'] = isset($arguments['logIncompleteSki…
1093 …$arguments['processIsolation'] = isset($arguments['processIsolation…
1094 …$arguments['repeat'] = isset($arguments['repeat']) …
1095 …$arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerB…
1096 …$arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBo…
1097 …$arguments['crap4jThreshold'] = isset($arguments['crap4jThreshold'…
1098 …$arguments['stopOnError'] = isset($arguments['stopOnError']) …
1099 …$arguments['stopOnFailure'] = isset($arguments['stopOnFailure'])…
1100 …$arguments['stopOnWarning'] = isset($arguments['stopOnWarning'])…
1101 …$arguments['stopOnIncomplete'] = isset($arguments['stopOnIncomplete…
1102 …$arguments['stopOnRisky'] = isset($arguments['stopOnRisky']) …
1103 …$arguments['stopOnSkipped'] = isset($arguments['stopOnSkipped'])…
1104 …$arguments['failOnWarning'] = isset($arguments['failOnWarning'])…
1105 …$arguments['failOnRisky'] = isset($arguments['failOnRisky']) …
1106 …$arguments['timeoutForSmallTests'] = isset($arguments['timeoutForSmallT…
1107 …$arguments['timeoutForMediumTests'] = isset($arguments['timeoutForMedium…
1108 …$arguments['timeoutForLargeTests'] = isset($arguments['timeoutForLargeT…
1109 …$arguments['reportUselessTests'] = isset($arguments['reportUselessTes…
1110 …$arguments['strictCoverage'] = isset($arguments['strictCoverage']…
1111 …$arguments['disallowTestOutput'] = isset($arguments['disallowTestOutp…
1112 …$arguments['enforceTimeLimit'] = isset($arguments['enforceTimeLimit…
1113 …$arguments['disallowTodoAnnotatedTests'] = isset($arguments['disallowTodoAnno…
1114 …$arguments['beStrictAboutResourceUsageDuringSmallTests'] = isset($arguments['beStrictAboutRes…
1115 …$arguments['reverseList'] = isset($arguments['reverseList']) …
1116 …$arguments['registerMockObjectsFromTestArgumentsRecursively'] = isset($arguments['registerMockObje…
1117 …$arguments['verbose'] = isset($arguments['verbose']) …
1118 …$arguments['testdoxExcludeGroups'] = isset($arguments['testdoxExcludeGr…
1119 …$arguments['testdoxGroups'] = isset($arguments['testdoxGroups'])…