]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Link Arcanist test cases
authorvrana <jakubv@fb.com>
Fri, 7 Sep 2012 22:16:39 +0000 (15:16 -0700)
committervrana <jakubv@fb.com>
Fri, 7 Sep 2012 22:31:14 +0000 (15:31 -0700)
Summary: See D3455.

Test Plan: This diff (after rebase).

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3460

src/__phutil_library_map__.php
src/difference/__tests__/ArcanistDiffUtilsTestCase.php
src/infrastructure/testing/ArcanistTestCase.php [new file with mode: 0644]
src/lint/linter/__tests__/ArcanistLinterTestCase.php
src/lint/linter/xhpast/__tests__/ArcanistXHPASTLintNamingHookTestCase.php
src/parser/__tests__/ArcanistBaseCommitParserTestCase.php
src/parser/__tests__/ArcanistBundleTestCase.php
src/parser/__tests__/ArcanistCommentRemoverTestCase.php
src/parser/__tests__/ArcanistDiffParserTestCase.php
src/repository/parser/__tests__/ArcanistMercurialParserTestCase.php
src/unit/engine/__tests__/PhutilUnitTestEngineTestCase.php

index a69de0b8e32c0d531cdec126903374f1ca21c372..96c1044f9f250a85eb5b4afa7b00dcb7a202e7bc 100644 (file)
@@ -113,6 +113,7 @@ phutil_register_library_map(array(
     'ArcanistSubversionHookAPI' => 'repository/hookapi/ArcanistSubversionHookAPI.php',
     'ArcanistSvnHookPreCommitWorkflow' => 'workflow/ArcanistSvnHookPreCommitWorkflow.php',
     'ArcanistTasksWorkflow' => 'workflow/ArcanistTasksWorkflow.php',
+    'ArcanistTestCase' => 'infrastructure/testing/ArcanistTestCase.php',
     'ArcanistTextLinter' => 'lint/linter/ArcanistTextLinter.php',
     'ArcanistTextLinterTestCase' => 'lint/linter/__tests__/ArcanistTextLinterTestCase.php',
     'ArcanistTodoWorkflow' => 'workflow/ArcanistTodoWorkflow.php',
@@ -148,21 +149,21 @@ phutil_register_library_map(array(
     'ArcanistAnoidWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistApacheLicenseLinter' => 'ArcanistLicenseLinter',
     'ArcanistApacheLicenseLinterTestCase' => 'ArcanistLinterTestCase',
-    'ArcanistBaseCommitParserTestCase' => 'ArcanistPhutilTestCase',
+    'ArcanistBaseCommitParserTestCase' => 'ArcanistTestCase',
     'ArcanistBranchWorkflow' => 'ArcanistBaseWorkflow',
-    'ArcanistBundleTestCase' => 'ArcanistPhutilTestCase',
+    'ArcanistBundleTestCase' => 'ArcanistTestCase',
     'ArcanistCallConduitWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistCapabilityNotSupportedException' => 'Exception',
     'ArcanistChooseInvalidRevisionException' => 'Exception',
     'ArcanistChooseNoRevisionsException' => 'Exception',
     'ArcanistCloseRevisionWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistCloseWorkflow' => 'ArcanistBaseWorkflow',
-    'ArcanistCommentRemoverTestCase' => 'ArcanistPhutilTestCase',
+    'ArcanistCommentRemoverTestCase' => 'ArcanistTestCase',
     'ArcanistCommitWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistConduitLinter' => 'ArcanistLinter',
     'ArcanistCoverWorkflow' => 'ArcanistBaseWorkflow',
-    'ArcanistDiffParserTestCase' => 'ArcanistPhutilTestCase',
-    'ArcanistDiffUtilsTestCase' => 'ArcanistPhutilTestCase',
+    'ArcanistDiffParserTestCase' => 'ArcanistTestCase',
+    'ArcanistDiffUtilsTestCase' => 'ArcanistTestCase',
     'ArcanistDiffWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistDifferentialCommitMessageParserException' => 'Exception',
     'ArcanistDownloadWorkflow' => 'ArcanistBaseWorkflow',
@@ -188,11 +189,11 @@ phutil_register_library_map(array(
     'ArcanistLintLikeCompilerRenderer' => 'ArcanistLintRenderer',
     'ArcanistLintSummaryRenderer' => 'ArcanistLintRenderer',
     'ArcanistLintWorkflow' => 'ArcanistBaseWorkflow',
-    'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase',
+    'ArcanistLinterTestCase' => 'ArcanistTestCase',
     'ArcanistListWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistMarkCommittedWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistMercurialAPI' => 'ArcanistRepositoryAPI',
-    'ArcanistMercurialParserTestCase' => 'ArcanistPhutilTestCase',
+    'ArcanistMercurialParserTestCase' => 'ArcanistTestCase',
     'ArcanistNoEffectException' => 'ArcanistUsageException',
     'ArcanistNoEngineException' => 'ArcanistUsageException',
     'ArcanistNoLintLinter' => 'ArcanistLinter',
@@ -217,6 +218,7 @@ phutil_register_library_map(array(
     'ArcanistSubversionHookAPI' => 'ArcanistHookAPI',
     'ArcanistSvnHookPreCommitWorkflow' => 'ArcanistBaseWorkflow',
     'ArcanistTasksWorkflow' => 'ArcanistBaseWorkflow',
+    'ArcanistTestCase' => 'ArcanistPhutilTestCase',
     'ArcanistTextLinter' => 'ArcanistLinter',
     'ArcanistTextLinterTestCase' => 'ArcanistLinterTestCase',
     'ArcanistTodoWorkflow' => 'ArcanistBaseWorkflow',
@@ -227,7 +229,7 @@ phutil_register_library_map(array(
     'ArcanistUsageException' => 'Exception',
     'ArcanistUserAbortException' => 'ArcanistUsageException',
     'ArcanistWhichWorkflow' => 'ArcanistBaseWorkflow',
-    'ArcanistXHPASTLintNamingHookTestCase' => 'ArcanistPhutilTestCase',
+    'ArcanistXHPASTLintNamingHookTestCase' => 'ArcanistTestCase',
     'ArcanistXHPASTLinter' => 'ArcanistLinter',
     'ArcanistXHPASTLinterTestCase' => 'ArcanistLinterTestCase',
     'ComprehensiveLintEngine' => 'ArcanistLintEngine',
@@ -236,7 +238,7 @@ phutil_register_library_map(array(
     'PhpunitTestEngine' => 'ArcanistBaseUnitTestEngine',
     'PhutilLintEngine' => 'ArcanistLintEngine',
     'PhutilUnitTestEngine' => 'ArcanistBaseUnitTestEngine',
-    'PhutilUnitTestEngineTestCase' => 'ArcanistPhutilTestCase',
+    'PhutilUnitTestEngineTestCase' => 'ArcanistTestCase',
     'UnitTestableArcanistLintEngine' => 'ArcanistLintEngine',
   ),
 ));
index a2e4f12d66792a5fab9300722853601b08bf9134..d84eb8fa219364a17ad293573551e976a59e0ae5 100644 (file)
@@ -21,7 +21,7 @@
  *
  * @group testcase
  */
-final class ArcanistDiffUtilsTestCase extends ArcanistPhutilTestCase {
+final class ArcanistDiffUtilsTestCase extends ArcanistTestCase {
   public function testLevenshtein() {
     $tests = array(
       array(
diff --git a/src/infrastructure/testing/ArcanistTestCase.php b/src/infrastructure/testing/ArcanistTestCase.php
new file mode 100644 (file)
index 0000000..9e011b7
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+/*
+ * Copyright 2012 Facebook, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+abstract class ArcanistTestCase extends ArcanistPhutilTestCase {
+
+  protected function getLink($method) {
+    $arcanist_project = 'PHID-APRJ-703e0b140530f17ede30';
+    return
+      'https://secure.phabricator.com/diffusion/symbol/'.$method.
+      '/?lang=php&projects='.$arcanist_project.
+      '&jump=true&context='.get_class($this);
+  }
+
+}
index 631ed013450e7f68596fbab34eb4c6f52ee6d62f..6e6da6408e2a9b6c3786fb65bb195bdbc1ba1272 100644 (file)
@@ -21,7 +21,7 @@
  *
  * @group testcase
  */
-abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
+abstract class ArcanistLinterTestCase extends ArcanistTestCase {
 
   public function executeTestsInDirectory($root, $linter, $working_copy) {
     foreach (Filesystem::listDirectory($root, $hidden = false) as $file) {
index dd96e2cf14a4dfa3656ef130b481e5f52f23d1f1..bac8a49bc35d6ef9e6d19713cc5801cf91cde35a 100644 (file)
@@ -22,7 +22,7 @@
  * @group testcase
  */
 final class ArcanistXHPASTLintNamingHookTestCase
-  extends ArcanistPhutilTestCase {
+  extends ArcanistTestCase {
 
   public function testCaseUtilities() {
     $tests = array(
index b03c91227c67f8f125e88c4c874255d4e9ba2a2a..0f64914f768fbd837033a05d6f2bddabd9fd7102 100644 (file)
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-final class ArcanistBaseCommitParserTestCase extends ArcanistPhutilTestCase {
+final class ArcanistBaseCommitParserTestCase extends ArcanistTestCase {
 
   public function testBasics() {
 
index 8766f33f2420df505bfaca4756faacfc253e0ec2..e7151b96ac32265e76b85b27dda48e2eaa39b66a 100644 (file)
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-final class ArcanistBundleTestCase extends ArcanistPhutilTestCase {
+final class ArcanistBundleTestCase extends ArcanistTestCase {
 
   private function loadResource($name) {
     return Filesystem::readFile($this->getResourcePath($name));
index 75883c884c13fda9a2aa001648880ac4e94f8d80..cc559f195ede17c8cc348ed92e7405682f4a867d 100644 (file)
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-final class ArcanistCommentRemoverTestCase extends ArcanistPhutilTestCase {
+final class ArcanistCommentRemoverTestCase extends ArcanistTestCase {
 
   public function testRemover() {
     $test = <<<EOTEXT
index 9846d256701860bdebb6efe943d4b280f51c123d..025dbae4946dba184268a3ded4b7da5cc0168218 100644 (file)
@@ -21,7 +21,7 @@
  *
  * @group testcase
  */
-final class ArcanistDiffParserTestCase extends ArcanistPhutilTestCase {
+final class ArcanistDiffParserTestCase extends ArcanistTestCase {
 
   public function testParser() {
     $root = dirname(__FILE__).'/diff/';
index 6b2615a97fff94fb38f533012ea6a50082e3521b..e54237ccda35507104cc3f481cdacc65c7d697e8 100644 (file)
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-final class ArcanistMercurialParserTestCase extends ArcanistPhutilTestCase {
+final class ArcanistMercurialParserTestCase extends ArcanistTestCase {
 
   public function testParseAll() {
     $root = dirname(__FILE__).'/mercurial/';
index 796540207cb171ee40f977e32c71dd366dae5830..eb5bc58b43708f09c3bcdc66506c47597ee9b0af 100644 (file)
@@ -21,7 +21,7 @@
  *
  * @group testcase
  */
-final class PhutilUnitTestEngineTestCase extends ArcanistPhutilTestCase {
+final class PhutilUnitTestEngineTestCase extends ArcanistTestCase {
 
   static $allTestsCounter = 0;
   static $oneTestCounter = 0;