1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00

Replace ArcanistPhutilTestCase refs with PhutilTestCase

Summary: Ref T7977. Remove the `PhabricatorTestCase::getLink` method. Depends on D12665.

Test Plan: `arc unit`.

Reviewers: avivey, #blessed_reviewers, epriestley

Reviewed By: avivey, #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7977

Differential Revision: https://secure.phabricator.com/D12667
This commit is contained in:
Joshua Spence 2015-05-20 09:37:39 +10:00
parent 2154f17b3d
commit 69940f2b9e
8 changed files with 13 additions and 21 deletions

View file

@ -3532,7 +3532,7 @@ phutil_register_library_map(array(
'DifferentialActionEmailCommand' => 'MetaMTAEmailTransactionCommand', 'DifferentialActionEmailCommand' => 'MetaMTAEmailTransactionCommand',
'DifferentialActionMenuEventListener' => 'PhabricatorEventListener', 'DifferentialActionMenuEventListener' => 'PhabricatorEventListener',
'DifferentialAddCommentView' => 'AphrontView', 'DifferentialAddCommentView' => 'AphrontView',
'DifferentialAdjustmentMapTestCase' => 'ArcanistPhutilTestCase', 'DifferentialAdjustmentMapTestCase' => 'PhutilTestCase',
'DifferentialAffectedPath' => 'DifferentialDAO', 'DifferentialAffectedPath' => 'DifferentialDAO',
'DifferentialApplyPatchField' => 'DifferentialCustomField', 'DifferentialApplyPatchField' => 'DifferentialCustomField',
'DifferentialAsanaRepresentationField' => 'DifferentialCustomField', 'DifferentialAsanaRepresentationField' => 'DifferentialCustomField',
@ -3597,7 +3597,7 @@ phutil_register_library_map(array(
'DifferentialDiffProperty' => 'DifferentialDAO', 'DifferentialDiffProperty' => 'DifferentialDAO',
'DifferentialDiffQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'DifferentialDiffQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'DifferentialDiffTableOfContentsView' => 'AphrontView', 'DifferentialDiffTableOfContentsView' => 'AphrontView',
'DifferentialDiffTestCase' => 'ArcanistPhutilTestCase', 'DifferentialDiffTestCase' => 'PhutilTestCase',
'DifferentialDiffTransaction' => 'PhabricatorApplicationTransaction', 'DifferentialDiffTransaction' => 'PhabricatorApplicationTransaction',
'DifferentialDiffViewController' => 'DifferentialController', 'DifferentialDiffViewController' => 'DifferentialController',
'DifferentialDoorkeeperRevisionFeedStoryPublisher' => 'DoorkeeperFeedStoryPublisher', 'DifferentialDoorkeeperRevisionFeedStoryPublisher' => 'DoorkeeperFeedStoryPublisher',
@ -3626,7 +3626,7 @@ phutil_register_library_map(array(
), ),
'DifferentialHunkParserTestCase' => 'PhabricatorTestCase', 'DifferentialHunkParserTestCase' => 'PhabricatorTestCase',
'DifferentialHunkQuery' => 'PhabricatorCursorPagedPolicyAwareQuery', 'DifferentialHunkQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'DifferentialHunkTestCase' => 'ArcanistPhutilTestCase', 'DifferentialHunkTestCase' => 'PhutilTestCase',
'DifferentialInlineComment' => 'PhabricatorInlineCommentInterface', 'DifferentialInlineComment' => 'PhabricatorInlineCommentInterface',
'DifferentialInlineCommentEditController' => 'PhabricatorInlineCommentController', 'DifferentialInlineCommentEditController' => 'PhabricatorInlineCommentController',
'DifferentialInlineCommentPreviewController' => 'PhabricatorInlineCommentPreviewController', 'DifferentialInlineCommentPreviewController' => 'PhabricatorInlineCommentPreviewController',
@ -3861,7 +3861,7 @@ phutil_register_library_map(array(
'DiffusionTagListController' => 'DiffusionController', 'DiffusionTagListController' => 'DiffusionController',
'DiffusionTagListView' => 'DiffusionView', 'DiffusionTagListView' => 'DiffusionView',
'DiffusionTagsQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod', 'DiffusionTagsQueryConduitAPIMethod' => 'DiffusionQueryConduitAPIMethod',
'DiffusionURITestCase' => 'ArcanistPhutilTestCase', 'DiffusionURITestCase' => 'PhutilTestCase',
'DiffusionUpdateCoverageConduitAPIMethod' => 'DiffusionConduitAPIMethod', 'DiffusionUpdateCoverageConduitAPIMethod' => 'DiffusionConduitAPIMethod',
'DiffusionView' => 'AphrontView', 'DiffusionView' => 'AphrontView',
'DivinerArticleAtomizer' => 'DivinerAtomizer', 'DivinerArticleAtomizer' => 'DivinerAtomizer',
@ -6083,7 +6083,7 @@ phutil_register_library_map(array(
'PhabricatorTOTPAuthFactorTestCase' => 'PhabricatorTestCase', 'PhabricatorTOTPAuthFactorTestCase' => 'PhabricatorTestCase',
'PhabricatorTaskmasterDaemon' => 'PhabricatorDaemon', 'PhabricatorTaskmasterDaemon' => 'PhabricatorDaemon',
'PhabricatorTestApplication' => 'PhabricatorApplication', 'PhabricatorTestApplication' => 'PhabricatorApplication',
'PhabricatorTestCase' => 'ArcanistPhutilTestCase', 'PhabricatorTestCase' => 'PhutilTestCase',
'PhabricatorTestController' => 'PhabricatorController', 'PhabricatorTestController' => 'PhabricatorController',
'PhabricatorTestNoCycleEdgeType' => 'PhabricatorEdgeType', 'PhabricatorTestNoCycleEdgeType' => 'PhabricatorEdgeType',
'PhabricatorTestStorageEngine' => 'PhabricatorFileStorageEngine', 'PhabricatorTestStorageEngine' => 'PhabricatorFileStorageEngine',

View file

@ -1,6 +1,6 @@
<?php <?php
final class DifferentialAdjustmentMapTestCase extends ArcanistPhutilTestCase { final class DifferentialAdjustmentMapTestCase extends PhutilTestCase {
public function testBasicMaps() { public function testBasicMaps() {
$change_map = array( $change_map = array(

View file

@ -1,6 +1,6 @@
<?php <?php
final class DifferentialDiffTestCase extends ArcanistPhutilTestCase { final class DifferentialDiffTestCase extends PhutilTestCase {
public function testDetectCopiedCode() { public function testDetectCopiedCode() {
$copies = $this->detectCopiesIn('lint_engine.diff'); $copies = $this->detectCopiesIn('lint_engine.diff');

View file

@ -1,6 +1,6 @@
<?php <?php
final class DifferentialHunkTestCase extends ArcanistPhutilTestCase { final class DifferentialHunkTestCase extends PhutilTestCase {
public function testMakeChanges() { public function testMakeChanges() {
$root = dirname(__FILE__).'/hunk/'; $root = dirname(__FILE__).'/hunk/';

View file

@ -1,6 +1,6 @@
<?php <?php
final class DiffusionURITestCase extends ArcanistPhutilTestCase { final class DiffusionURITestCase extends PhutilTestCase {
public function testBlobDecode() { public function testBlobDecode() {
$map = array( $map = array(

View file

@ -21,7 +21,7 @@ To add new tests to a libphutil, Arcanist or Phabricator module:
- Create a ##__tests__/## directory in the module if it doesn't exist yet. - Create a ##__tests__/## directory in the module if it doesn't exist yet.
- Add classes to the ##__tests__/## directory which extend from - Add classes to the ##__tests__/## directory which extend from
@{class:PhabricatorTestCase} (in Phabricator) or @{class:PhabricatorTestCase} (in Phabricator) or
@{class@arcanist:ArcanistPhutilTestCase} (elsewhere). @{class@arcanist:PhutilTestCase} (elsewhere).
- Run ##arc liberate## on the library root so your classes are loadable. - Run ##arc liberate## on the library root so your classes are loadable.
= Running Tests = = Running Tests =
@ -60,7 +60,7 @@ You can see this class at @{class:PhabricatorTrivialTestCase} and run it with:
PASS <1ms* testAllIsRightWithTheWorld PASS <1ms* testAllIsRightWithTheWorld
For more information on writing tests, see For more information on writing tests, see
@{class@arcanist:ArcanistPhutilTestCase} and @{class:PhabricatorTestCase}. @{class@arcanist:PhutilTestCase} and @{class:PhabricatorTestCase}.
= Database Isolation = = Database Isolation =

View file

@ -64,6 +64,6 @@ might look like this:
); );
You may also want to filter coverage information to the paths passed to the You may also want to filter coverage information to the paths passed to the
unit test engine. See @{class@arcanist:ArcanistPhutilTestCase} and unit test engine. See @{class@arcanist:PhutilTestCase} and
@{class@arcanist:PhutilUnitTestEngine} for an example of coverage integration @{class@arcanist:PhutilUnitTestEngine} for an example of coverage integration
in PHP using Xdebug. in PHP using Xdebug.

View file

@ -1,6 +1,6 @@
<?php <?php
abstract class PhabricatorTestCase extends ArcanistPhutilTestCase { abstract class PhabricatorTestCase extends PhutilTestCase {
const NAMESPACE_PREFIX = 'phabricator_unittest_'; const NAMESPACE_PREFIX = 'phabricator_unittest_';
@ -166,14 +166,6 @@ abstract class PhabricatorTestCase extends ArcanistPhutilTestCase {
return new PhabricatorStorageFixtureScopeGuard($name); return new PhabricatorStorageFixtureScopeGuard($name);
} }
protected function getLink($method) {
$phabricator_project = 'PHID-APRJ-3f1fc779edeab89b2171';
return
'https://secure.phabricator.com/diffusion/symbol/'.$method.
'/?lang=php&projects='.$phabricator_project.
'&jump=true&context='.get_class($this);
}
/** /**
* Returns an integer seed to use when building unique identifiers (e.g., * Returns an integer seed to use when building unique identifiers (e.g.,
* non-colliding usernames). The seed is unstable and its value will change * non-colliding usernames). The seed is unstable and its value will change