HomePhabricator

Name singleton overriding methods more clearly
f0ac32699cffUnpublished

Authored by phuedx on Sep 22 2016, 11:37 AM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Name singleton overriding methods more clearly

MobileContext::setInstance is only used in PHPUnit test suites.
Typically it's used to destroy the singleton instance in order to reset
its state.

Changes:

  • Rename MobileContext::setInstance to ::setInstanceForTesting to make it clear when the method should be used
  • Add MobileContext::resetInstanceForTesting, which handles the common use case above

Bug: T143875
Change-Id: If959a53c57235de1bc74a406b1b42c3ea463897e

Details

Committed
phuedxSep 22 2016, 12:27 PM
Parents
rEMFRcafd7fa3b620: Remove MFPageActions/MFEnableSiteNotice vars
Branches
Unknown
Tags
Unknown
References
refs/changes/43/312243/1
ChangeId
If959a53c57235de1bc74a406b1b42c3ea463897e