]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Rename `ArcanistTestResultParser` subclasses for consistency
authorJoshua Spence <josh@joshuaspence.com>
Sun, 4 Jan 2015 19:45:14 +0000 (06:45 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 4 Jan 2015 19:45:31 +0000 (06:45 +1100)
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

src/__phutil_library_map__.php
src/unit/engine/ArcanistGoTestResultParser.php [moved from src/unit/engine/GoTestResultParser.php with 98% similarity]
src/unit/engine/ArcanistPhpunitTestResultParser.php [moved from src/unit/engine/PhpunitResultParser.php with 98% similarity]
src/unit/engine/PhpunitTestEngine.php
src/unit/engine/__tests__/ArcanistGoTestResultParserTestCase.php [moved from src/unit/engine/__tests__/GoTestResultParserTestCase.php with 88% similarity]

index 5a141d0b24ba6b587d0c7f86a17713956387d61a..8f4309a541ddf397e39c082a8815ddfafae3fdf9 100644 (file)
@@ -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',
similarity index 98%
rename from src/unit/engine/GoTestResultParser.php
rename to src/unit/engine/ArcanistGoTestResultParser.php
index 017e700dfe227a01abb21119e29ed3f42e3edc02..c57294163f41b9962ad5c6e2a2a621edcc4105f9 100644 (file)
@@ -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
similarity index 98%
rename from src/unit/engine/PhpunitResultParser.php
rename to src/unit/engine/ArcanistPhpunitTestResultParser.php
index 693d8bcc2dbbc3d7085667e453ed5d1835b95ba8..ff06a62750751f855c407bc08d9eb2dde582de44 100644 (file)
@@ -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
index ca54178356a4058565589d548986d3a91a93a656..eb545fb11c92a3b0d64fe693d4bb748bcc63ee5e 100644 (file)
@@ -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)
similarity index 88%
rename from src/unit/engine/__tests__/GoTestResultParserTestCase.php
rename to src/unit/engine/__tests__/ArcanistGoTestResultParserTestCase.php
index ace64a688a3953a98df4ca15635c89bbdd2cc409..abf62108bae606404ba72d5ebaacd9b13148e63d 100644 (file)
@@ -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));