'ArcanistPhpunitTestResultParser' => 'unit/parser/ArcanistPhpunitTestResultParser.php',
'ArcanistPhrequentWorkflow' => 'workflow/ArcanistPhrequentWorkflow.php',
'ArcanistPhutilLibraryLinter' => 'lint/linter/ArcanistPhutilLibraryLinter.php',
- 'ArcanistPhutilTestCase' => 'unit/engine/phutil/ArcanistPhutilTestCase.php',
- 'ArcanistPhutilTestCaseTestCase' => 'unit/engine/phutil/testcase/ArcanistPhutilTestCaseTestCase.php',
- 'ArcanistPhutilTestSkippedException' => 'unit/engine/phutil/testcase/ArcanistPhutilTestSkippedException.php',
- 'ArcanistPhutilTestTerminatedException' => 'unit/engine/phutil/testcase/ArcanistPhutilTestTerminatedException.php',
'ArcanistPhutilXHPASTLinter' => 'lint/linter/ArcanistPhutilXHPASTLinter.php',
'ArcanistPhutilXHPASTLinterTestCase' => 'lint/linter/__tests__/ArcanistPhutilXHPASTLinterTestCase.php',
'ArcanistPuppetLintLinter' => 'lint/linter/ArcanistPuppetLintLinter.php',
'ArcanistSubversionAPI' => 'repository/api/ArcanistSubversionAPI.php',
'ArcanistSummaryLintRenderer' => 'lint/renderer/ArcanistSummaryLintRenderer.php',
'ArcanistTasksWorkflow' => 'workflow/ArcanistTasksWorkflow.php',
- 'ArcanistTestCase' => 'infrastructure/testing/ArcanistTestCase.php',
'ArcanistTestResultParser' => 'unit/parser/ArcanistTestResultParser.php',
'ArcanistTestXHPASTLintSwitchHook' => 'lint/linter/__tests__/ArcanistTestXHPASTLintSwitchHook.php',
'ArcanistTextLinter' => 'lint/linter/ArcanistTextLinter.php',
'NoseTestEngine' => 'unit/engine/NoseTestEngine.php',
'PhpunitTestEngine' => 'unit/engine/PhpunitTestEngine.php',
'PhpunitTestEngineTestCase' => 'unit/engine/__tests__/PhpunitTestEngineTestCase.php',
+ 'PhutilTestCase' => 'unit/engine/phutil/PhutilTestCase.php',
+ 'PhutilTestCaseTestCase' => 'unit/engine/phutil/testcase/PhutilTestCaseTestCase.php',
+ 'PhutilTestSkippedException' => 'unit/engine/phutil/testcase/PhutilTestSkippedException.php',
+ 'PhutilTestTerminatedException' => 'unit/engine/phutil/testcase/PhutilTestTerminatedException.php',
'PhutilUnitTestEngine' => 'unit/engine/PhutilUnitTestEngine.php',
'PhutilUnitTestEngineTestCase' => 'unit/engine/__tests__/PhutilUnitTestEngineTestCase.php',
'PytestTestEngine' => 'unit/engine/PytestTestEngine.php',
'ArcanistAmendWorkflow' => 'ArcanistWorkflow',
'ArcanistAnoidWorkflow' => 'ArcanistWorkflow',
'ArcanistBackoutWorkflow' => 'ArcanistWorkflow',
- 'ArcanistBaseCommitParserTestCase' => 'ArcanistTestCase',
+ 'ArcanistBaseCommitParserTestCase' => 'PhutilTestCase',
'ArcanistBaseXHPASTLinter' => 'ArcanistFutureLinter',
'ArcanistBookmarkWorkflow' => 'ArcanistFeatureWorkflow',
'ArcanistBranchWorkflow' => 'ArcanistFeatureWorkflow',
- 'ArcanistBritishTestCase' => 'ArcanistTestCase',
+ 'ArcanistBritishTestCase' => 'PhutilTestCase',
'ArcanistBrowseWorkflow' => 'ArcanistWorkflow',
- 'ArcanistBundleTestCase' => 'ArcanistTestCase',
+ 'ArcanistBundleTestCase' => 'PhutilTestCase',
'ArcanistCSSLintLinter' => 'ArcanistExternalLinter',
'ArcanistCSSLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistCSharpLinter' => 'ArcanistLinter',
'ArcanistClosureLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistCoffeeLintLinter' => 'ArcanistExternalLinter',
'ArcanistCoffeeLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
- 'ArcanistCommentRemoverTestCase' => 'ArcanistTestCase',
+ 'ArcanistCommentRemoverTestCase' => 'PhutilTestCase',
'ArcanistCommitWorkflow' => 'ArcanistWorkflow',
'ArcanistCompilerLintRenderer' => 'ArcanistLintRenderer',
'ArcanistComprehensiveLintEngine' => 'ArcanistLintEngine',
'ArcanistCppcheckLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistCpplintLinter' => 'ArcanistExternalLinter',
'ArcanistCpplintLinterTestCase' => 'ArcanistExternalLinterTestCase',
- 'ArcanistDiffParserTestCase' => 'ArcanistTestCase',
- 'ArcanistDiffUtilsTestCase' => 'ArcanistTestCase',
+ 'ArcanistDiffParserTestCase' => 'PhutilTestCase',
+ 'ArcanistDiffUtilsTestCase' => 'PhutilTestCase',
'ArcanistDiffWorkflow' => 'ArcanistWorkflow',
'ArcanistDifferentialCommitMessageParserException' => 'Exception',
'ArcanistDifferentialDependencyGraph' => 'AbstractDirectedGraph',
'ArcanistGoLintLinter' => 'ArcanistExternalLinter',
'ArcanistGoLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistGoTestResultParser' => 'ArcanistTestResultParser',
- 'ArcanistGoTestResultParserTestCase' => 'ArcanistTestCase',
+ 'ArcanistGoTestResultParserTestCase' => 'PhutilTestCase',
'ArcanistHLintLinter' => 'ArcanistExternalLinter',
'ArcanistHLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistHelpWorkflow' => 'ArcanistWorkflow',
'ArcanistLiberateWorkflow' => 'ArcanistWorkflow',
'ArcanistLibraryTestCase' => 'PhutilLibraryTestCase',
'ArcanistLintWorkflow' => 'ArcanistWorkflow',
- 'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase',
+ 'ArcanistLinterTestCase' => 'PhutilTestCase',
'ArcanistLintersWorkflow' => 'ArcanistWorkflow',
'ArcanistListWorkflow' => 'ArcanistWorkflow',
'ArcanistMercurialAPI' => 'ArcanistRepositoryAPI',
- 'ArcanistMercurialParserTestCase' => 'ArcanistTestCase',
+ 'ArcanistMercurialParserTestCase' => 'PhutilTestCase',
'ArcanistMergeConflictLinter' => 'ArcanistLinter',
'ArcanistMergeConflictLinterTestCase' => 'ArcanistLinterTestCase',
'ArcanistMissingLinterException' => 'Exception',
'ArcanistPhpunitTestResultParser' => 'ArcanistTestResultParser',
'ArcanistPhrequentWorkflow' => 'ArcanistWorkflow',
'ArcanistPhutilLibraryLinter' => 'ArcanistLinter',
- 'ArcanistPhutilTestCaseTestCase' => 'ArcanistPhutilTestCase',
- 'ArcanistPhutilTestSkippedException' => 'Exception',
- 'ArcanistPhutilTestTerminatedException' => 'Exception',
'ArcanistPhutilXHPASTLinter' => 'ArcanistBaseXHPASTLinter',
'ArcanistPhutilXHPASTLinterTestCase' => 'ArcanistLinterTestCase',
'ArcanistPuppetLintLinter' => 'ArcanistExternalLinter',
'ArcanistPyFlakesLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistPyLintLinter' => 'ArcanistExternalLinter',
'ArcanistPyLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
- 'ArcanistRepositoryAPIMiscTestCase' => 'ArcanistTestCase',
- 'ArcanistRepositoryAPIStateTestCase' => 'ArcanistTestCase',
+ 'ArcanistRepositoryAPIMiscTestCase' => 'PhutilTestCase',
+ 'ArcanistRepositoryAPIStateTestCase' => 'PhutilTestCase',
'ArcanistRevertWorkflow' => 'ArcanistWorkflow',
'ArcanistRuboCopLinter' => 'ArcanistExternalLinter',
'ArcanistRuboCopLinterTestCase' => 'ArcanistExternalLinterTestCase',
'ArcanistSubversionAPI' => 'ArcanistRepositoryAPI',
'ArcanistSummaryLintRenderer' => 'ArcanistLintRenderer',
'ArcanistTasksWorkflow' => 'ArcanistWorkflow',
- 'ArcanistTestCase' => 'ArcanistPhutilTestCase',
'ArcanistTestXHPASTLintSwitchHook' => 'ArcanistXHPASTLintSwitchHook',
'ArcanistTextLinter' => 'ArcanistLinter',
'ArcanistTextLinterTestCase' => 'ArcanistLinterTestCase',
'ArcanistVersionWorkflow' => 'ArcanistWorkflow',
'ArcanistWhichWorkflow' => 'ArcanistWorkflow',
'ArcanistWorkflow' => 'Phobject',
- 'ArcanistXHPASTLintNamingHookTestCase' => 'ArcanistTestCase',
+ 'ArcanistXHPASTLintNamingHookTestCase' => 'PhutilTestCase',
'ArcanistXHPASTLinter' => 'ArcanistBaseXHPASTLinter',
'ArcanistXHPASTLinterTestCase' => 'ArcanistLinterTestCase',
'ArcanistXMLLinter' => 'ArcanistLinter',
'CSharpToolsTestEngine' => 'XUnitTestEngine',
'NoseTestEngine' => 'ArcanistUnitTestEngine',
'PhpunitTestEngine' => 'ArcanistUnitTestEngine',
- 'PhpunitTestEngineTestCase' => 'ArcanistTestCase',
+ 'PhpunitTestEngineTestCase' => 'PhutilTestCase',
+ 'PhutilTestCaseTestCase' => 'PhutilTestCase',
+ 'PhutilTestSkippedException' => 'Exception',
+ 'PhutilTestTerminatedException' => 'Exception',
'PhutilUnitTestEngine' => 'ArcanistUnitTestEngine',
- 'PhutilUnitTestEngineTestCase' => 'ArcanistTestCase',
+ 'PhutilUnitTestEngineTestCase' => 'PhutilTestCase',
'PytestTestEngine' => 'ArcanistUnitTestEngine',
'XUnitTestEngine' => 'ArcanistUnitTestEngine',
- 'XUnitTestResultParserTestCase' => 'ArcanistTestCase',
+ 'XUnitTestResultParserTestCase' => 'PhutilTestCase',
),
));
* @task hook Hooks for Setup and Teardown
* @task internal Internals
*/
-abstract class ArcanistPhutilTestCase {
+abstract class PhutilTestCase {
private $assertions = 0;
private $runningTest;
}
$this->failTest($output);
- throw new ArcanistPhutilTestTerminatedException($output);
+ throw new PhutilTestTerminatedException($output);
}
*/
final protected function assertFailure($message) {
$this->failTest($message);
- throw new ArcanistPhutilTestTerminatedException($message);
+ throw new PhutilTestTerminatedException($message);
}
/**
*/
final protected function assertSkipped($message) {
$this->skipTest($message);
- throw new ArcanistPhutilTestSkippedException($message);
+ throw new PhutilTestSkippedException($message);
}
try {
call_user_func($callable, $input);
} catch (Exception $ex) {
- if ($ex instanceof ArcanistPhutilTestTerminatedException) {
+ if ($ex instanceof PhutilTestTerminatedException) {
throw $ex;
}
if (!($ex instanceof $exception_class)) {
* This hook is invoked once, before any test cases execute. It gives you
* an opportunity to perform setup steps for the entire suite of test cases.
*
- * @param list<ArcanistPhutilTestCase> List of test cases to be run.
+ * @param list<PhutilTestCase> List of test cases to be run.
* @return void
* @task hook
*/
/**
* This hook is invoked once, after all test cases execute.
*
- * @param list<ArcanistPhutilTestCase> List of test cases that ran.
+ * @param list<PhutilTestCase> List of test cases that ran.
* @return void
* @task hook
*/
'least one assertion.'));
}
- } catch (ArcanistPhutilTestTerminatedException $ex) {
+ } catch (PhutilTestTerminatedException $ex) {
// Continue with the next test.
- } catch (ArcanistPhutilTestSkippedException $ex) {
+ } catch (PhutilTestSkippedException $ex) {
// Continue with the next test.
} catch (Exception $ex) {
$ex_class = get_class($ex);
$output = $description."\n\n".$header."\n".$actual_result;
$this->failTest($output);
- throw new ArcanistPhutilTestTerminatedException($output);
+ throw new PhutilTestTerminatedException($output);
}
}