Page MenuHomePhabricator

Improve getLink method for unit tests
ClosedPublic

Authored by joshuaspence on May 3 2015, 7:00 AM.
Tags
None
Referenced Files
F18114416: D12664.id30627.diff
Wed, Aug 13, 4:26 AM
F18104474: D12664.diff
Sun, Aug 10, 12:37 PM
F18072819: D12664.id30424.diff
Mon, Aug 4, 5:06 PM
F18007828: D12664.id.diff
Sat, Aug 2, 2:24 PM
F17967002: D12664.diff
Fri, Aug 1, 12:13 PM
Unknown Object (File)
Jun 20 2025, 1:54 PM
Unknown Object (File)
Jun 19 2025, 1:51 AM
Unknown Object (File)
Jun 18 2025, 10:25 PM

Details

Summary

Ref T7977. The PhutilTestCase::getLink method currently relies on arcanist projects instead of repositories. Instead, make this logic a bit smarter by looking up the base URI from phabricator.uri (currently it is hardcoded to https://secure.phabricator.com).

Ideally, we would pass ?repositories=$REPOSITORY_PHID to DiffusionSymbolController as well, but I don't know if this is worth pursuing.

Test Plan

This diff.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/unit/engine/phutil/ArcanistPhutilTestCase.php:620XHP16TODO Comment
Unit
No Test Coverage
Build Status
Buildable 5687
Build 5706: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Improve getLink method for unit tests.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added reviewers: epriestley, avivey.
joshuaspence edited edge metadata.

Simplify diff, will move other stuff to a separate diff

joshuaspence edited the test plan for this revision. (Show Details)

Ok, it took me a while to understand what getLink is actually for in this code (It links to the source of the test).

The whole set looks ok to me, and is mostly technical, so .

avivey edited edge metadata.
joshuaspence edited edge metadata.

Use PhutilInvalidStateException

epriestley edited edge metadata.
This revision is now accepted and ready to land.May 19 2015, 2:10 PM
This revision was automatically updated to reflect the committed changes.