mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 16:22:42 +01:00
Rename ArcanistTestResultParser
subclasses for consistency
Summary: Ref T5655. Test Plan: `grep` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: aurelijus, Korvin, epriestley Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D11201
This commit is contained in:
parent
9fdf53452c
commit
63c9c6c4ff
5 changed files with 16 additions and 16 deletions
|
@ -84,6 +84,8 @@ phutil_register_library_map(array(
|
|||
'ArcanistGitHookPreReceiveWorkflow' => 'workflow/ArcanistGitHookPreReceiveWorkflow.php',
|
||||
'ArcanistGoLintLinter' => 'lint/linter/ArcanistGoLintLinter.php',
|
||||
'ArcanistGoLintLinterTestCase' => 'lint/linter/__tests__/ArcanistGoLintLinterTestCase.php',
|
||||
'ArcanistGoTestResultParser' => 'unit/engine/ArcanistGoTestResultParser.php',
|
||||
'ArcanistGoTestResultParserTestCase' => 'unit/engine/__tests__/ArcanistGoTestResultParserTestCase.php',
|
||||
'ArcanistHLintLinter' => 'lint/linter/ArcanistHLintLinter.php',
|
||||
'ArcanistHLintLinterTestCase' => 'lint/linter/__tests__/ArcanistHLintLinterTestCase.php',
|
||||
'ArcanistHelpWorkflow' => 'workflow/ArcanistHelpWorkflow.php',
|
||||
|
@ -136,6 +138,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistPhpLinterTestCase' => 'lint/linter/__tests__/ArcanistPhpLinterTestCase.php',
|
||||
'ArcanistPhpcsLinter' => 'lint/linter/ArcanistPhpcsLinter.php',
|
||||
'ArcanistPhpcsLinterTestCase' => 'lint/linter/__tests__/ArcanistPhpcsLinterTestCase.php',
|
||||
'ArcanistPhpunitTestResultParser' => 'unit/engine/ArcanistPhpunitTestResultParser.php',
|
||||
'ArcanistPhrequentWorkflow' => 'workflow/ArcanistPhrequentWorkflow.php',
|
||||
'ArcanistPhutilLibraryLinter' => 'lint/linter/ArcanistPhutilLibraryLinter.php',
|
||||
'ArcanistPhutilTestCase' => 'unit/engine/phutil/ArcanistPhutilTestCase.php',
|
||||
|
@ -202,11 +205,8 @@ phutil_register_library_map(array(
|
|||
'ArcanistXUnitTestResultParser' => 'unit/engine/ArcanistXUnitTestResultParser.php',
|
||||
'CSharpToolsTestEngine' => 'unit/engine/CSharpToolsTestEngine.php',
|
||||
'ComprehensiveLintEngine' => 'lint/engine/ComprehensiveLintEngine.php',
|
||||
'GoTestResultParser' => 'unit/engine/GoTestResultParser.php',
|
||||
'GoTestResultParserTestCase' => 'unit/engine/__tests__/GoTestResultParserTestCase.php',
|
||||
'NoseTestEngine' => 'unit/engine/NoseTestEngine.php',
|
||||
'PHPUnitTestEngineTestCase' => 'unit/engine/__tests__/PHPUnitTestEngineTestCase.php',
|
||||
'PhpunitResultParser' => 'unit/engine/PhpunitResultParser.php',
|
||||
'PhpunitTestEngine' => 'unit/engine/PhpunitTestEngine.php',
|
||||
'PhutilUnitTestEngine' => 'unit/engine/PhutilUnitTestEngine.php',
|
||||
'PhutilUnitTestEngineTestCase' => 'unit/engine/__tests__/PhutilUnitTestEngineTestCase.php',
|
||||
|
@ -278,6 +278,8 @@ phutil_register_library_map(array(
|
|||
'ArcanistGitHookPreReceiveWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistGoLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistGoLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistGoTestResultParser' => 'ArcanistTestResultParser',
|
||||
'ArcanistGoTestResultParserTestCase' => 'ArcanistTestCase',
|
||||
'ArcanistHLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistHLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistHelpWorkflow' => 'ArcanistWorkflow',
|
||||
|
@ -319,6 +321,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistPhpLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistPhpcsLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPhpcsLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistPhpunitTestResultParser' => 'ArcanistTestResultParser',
|
||||
'ArcanistPhrequentWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistPhutilLibraryLinter' => 'ArcanistLinter',
|
||||
'ArcanistPhutilTestCaseTestCase' => 'ArcanistPhutilTestCase',
|
||||
|
@ -374,11 +377,8 @@ phutil_register_library_map(array(
|
|||
'ArcanistXMLLinterTestCase' => 'ArcanistArcanistLinterTestCase',
|
||||
'CSharpToolsTestEngine' => 'XUnitTestEngine',
|
||||
'ComprehensiveLintEngine' => 'ArcanistLintEngine',
|
||||
'GoTestResultParser' => 'ArcanistTestResultParser',
|
||||
'GoTestResultParserTestCase' => 'ArcanistTestCase',
|
||||
'NoseTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'PHPUnitTestEngineTestCase' => 'ArcanistTestCase',
|
||||
'PhpunitResultParser' => 'ArcanistTestResultParser',
|
||||
'PhpunitTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'PhutilUnitTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'PhutilUnitTestEngineTestCase' => 'ArcanistTestCase',
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* (To generate test output, run something like: `go test -v`)
|
||||
*/
|
||||
final class GoTestResultParser extends ArcanistTestResultParser {
|
||||
final class ArcanistGoTestResultParser extends ArcanistTestResultParser {
|
||||
|
||||
/**
|
||||
* Parse test results from Go test report
|
|
@ -6,7 +6,7 @@
|
|||
* For an example on how to integrate with your test engine, see
|
||||
* @{class:PhpunitTestEngine}.
|
||||
*/
|
||||
final class PhpunitResultParser extends ArcanistTestResultParser {
|
||||
final class ArcanistPhpunitTestResultParser extends ArcanistTestResultParser {
|
||||
|
||||
/**
|
||||
* Parse test results from phpunit json report
|
|
@ -101,7 +101,7 @@ final class PhpunitTestEngine extends ArcanistUnitTestEngine {
|
|||
*/
|
||||
private function parseTestResults($path, $json_tmp, $clover_tmp, $stderr) {
|
||||
$test_results = Filesystem::readFile($json_tmp);
|
||||
return id(new PhpunitResultParser())
|
||||
return id(new ArcanistPhpunitTestResultParser())
|
||||
->setEnableCoverage($this->getEnableCoverage())
|
||||
->setProjectRoot($this->projectRoot)
|
||||
->setCoverageFile($clover_tmp)
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Test for @{class:GoTestResultParser}.
|
||||
* Test for @{class:ArcanistGoTestResultParser}.
|
||||
*/
|
||||
final class GoTestResultParserTestCase extends ArcanistTestCase {
|
||||
final class ArcanistGoTestResultParserTestCase extends ArcanistTestCase {
|
||||
|
||||
public function testSingleTestCaseSuccessful() {
|
||||
$stubbed_results = Filesystem::readFile(
|
||||
dirname(__FILE__).'/testresults/go.single-test-case-successful');
|
||||
|
||||
$parsed_results = id(new GoTestResultParser())
|
||||
$parsed_results = id(new ArcanistGoTestResultParser())
|
||||
->parseTestResults('subpackage_test.go', $stubbed_results);
|
||||
|
||||
$this->assertEqual(2, count($parsed_results));
|
||||
|
@ -27,7 +27,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase {
|
|||
$stubbed_results = Filesystem::readFile(
|
||||
dirname(__FILE__).'/testresults/go.single-test-case-failure');
|
||||
|
||||
$parsed_results = id(new GoTestResultParser())
|
||||
$parsed_results = id(new ArcanistGoTestResultParser())
|
||||
->parseTestResults('subpackage_test.go', $stubbed_results);
|
||||
|
||||
$this->assertEqual(2, count($parsed_results));
|
||||
|
@ -43,7 +43,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase {
|
|||
$stubbed_results = Filesystem::readFile(
|
||||
dirname(__FILE__).'/testresults/go.multiple-test-cases-successful');
|
||||
|
||||
$parsed_results = id(new GoTestResultParser())
|
||||
$parsed_results = id(new ArcanistGoTestResultParser())
|
||||
->parseTestResults('package', $stubbed_results);
|
||||
|
||||
$this->assertEqual(3, count($parsed_results));
|
||||
|
@ -64,7 +64,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase {
|
|||
$stubbed_results = Filesystem::readFile(
|
||||
dirname(__FILE__).'/testresults/go.multiple-test-cases-failure');
|
||||
|
||||
$parsed_results = id(new GoTestResultParser())
|
||||
$parsed_results = id(new ArcanistGoTestResultParser())
|
||||
->parseTestResults('package', $stubbed_results);
|
||||
|
||||
$this->assertEqual(3, count($parsed_results));
|
||||
|
@ -86,7 +86,7 @@ final class GoTestResultParserTestCase extends ArcanistTestCase {
|
|||
$stubbed_results = Filesystem::readFile(
|
||||
dirname(__FILE__).'/testresults/go.nonverbose');
|
||||
|
||||
$parsed_results = id(new GoTestResultParser())
|
||||
$parsed_results = id(new ArcanistGoTestResultParser())
|
||||
->parseTestResults('package', $stubbed_results);
|
||||
|
||||
$this->assertEqual(2, count($parsed_results));
|
Loading…
Reference in a new issue