diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2748,6 +2748,7 @@ 'PhabricatorDraftInterface' => 'applications/transactions/draft/PhabricatorDraftInterface.php', 'PhabricatorDrydockApplication' => 'applications/drydock/application/PhabricatorDrydockApplication.php', 'PhabricatorEdgeChangeRecord' => 'infrastructure/edges/util/PhabricatorEdgeChangeRecord.php', + 'PhabricatorEdgeChangeRecordTestCase' => 'infrastructure/edges/__tests__/PhabricatorEdgeChangeRecordTestCase.php', 'PhabricatorEdgeConfig' => 'infrastructure/edges/constants/PhabricatorEdgeConfig.php', 'PhabricatorEdgeConstants' => 'infrastructure/edges/constants/PhabricatorEdgeConstants.php', 'PhabricatorEdgeCycleException' => 'infrastructure/edges/exception/PhabricatorEdgeCycleException.php', @@ -8173,6 +8174,7 @@ 'PhabricatorDraftEngine' => 'Phobject', 'PhabricatorDrydockApplication' => 'PhabricatorApplication', 'PhabricatorEdgeChangeRecord' => 'Phobject', + 'PhabricatorEdgeChangeRecordTestCase' => 'PhabricatorTestCase', 'PhabricatorEdgeConfig' => 'PhabricatorEdgeConstants', 'PhabricatorEdgeConstants' => 'Phobject', 'PhabricatorEdgeCycleException' => 'Exception', diff --git a/src/infrastructure/edges/__tests__/PhabricatorEdgeChangeRecordTestCase.php b/src/infrastructure/edges/__tests__/PhabricatorEdgeChangeRecordTestCase.php new file mode 100644 --- /dev/null +++ b/src/infrastructure/edges/__tests__/PhabricatorEdgeChangeRecordTestCase.php @@ -0,0 +1,158 @@ +setOldValue($old_bulky); + $bulky_xaction->setNewValue($new_bulky); + + $slim_xaction = new ManiphestTransaction(); + $slim_xaction->setOldValue($old_slim); + $slim_xaction->setNewValue($new_slim); + + $bulky_record = PhabricatorEdgeChangeRecord::newFromTransaction( + $bulky_xaction); + + $slim_record = PhabricatorEdgeChangeRecord::newFromTransaction( + $slim_xaction); + + $this->assertEqual( + $bulky_record->getAddedPHIDs(), + $slim_record->getAddedPHIDs()); + + $this->assertEqual( + $bulky_record->getRemovedPHIDs(), + $slim_record->getRemovedPHIDs()); + } + +}