From f8be81e17fdc14c18faa83c5c3657051e9362066 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 11 Jan 2017 15:46:12 -0700 Subject: [PATCH] Clear instance singleton on destruct Allows for unit testing --- api/src/Accounts.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/Accounts.php b/api/src/Accounts.php index 16facb4458..c051046825 100644 --- a/api/src/Accounts.php +++ b/api/src/Accounts.php @@ -1255,4 +1255,8 @@ class Accounts self::$cache = array(); } } + + public function __destruct() { + self::$_instance = NULL; + } }