summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormapril <mapril@thebettersoftwarecompany.com>2015-09-02 09:20:33 -0400
committermapril <mapril@thebettersoftwarecompany.com>2015-09-02 09:20:33 -0400
commitc48ff8467d2a4ae229df6a3b8949e82d0d792ee5 (patch)
tree7884f1a4c5b418fda7ef84693f7e1d0aed0b6f0a
parentd1edaca057512c55adfc7db7a50e2fc8ed064642 (diff)
downloadphp-sparkpost-c48ff8467d2a4ae229df6a3b8949e82d0d792ee5.zip
php-sparkpost-c48ff8467d2a4ae229df6a3b8949e82d0d792ee5.tar.gz
php-sparkpost-c48ff8467d2a4ae229df6a3b8949e82d0d792ee5.tar.bz2
Fixed failing unit test - added ability to unset config
-rw-r--r--lib/SparkPost/SparkPost.php4
-rw-r--r--test/unit/SparkPostTest.php1
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/SparkPost/SparkPost.php b/lib/SparkPost/SparkPost.php
index 5c2a554..755df46 100644
--- a/lib/SparkPost/SparkPost.php
+++ b/lib/SparkPost/SparkPost.php
@@ -51,6 +51,10 @@ class SparkPost {
}
return self::$config;
}
+
+ public static function unsetConfig() {
+ self::$config = NULL;
+ }
}
?> \ No newline at end of file
diff --git a/test/unit/SparkPostTest.php b/test/unit/SparkPostTest.php
index 650cb36..f40461d 100644
--- a/test/unit/SparkPostTest.php
+++ b/test/unit/SparkPostTest.php
@@ -20,6 +20,7 @@ class SparkPostTest extends \PHPUnit_Framework_TestCase {
* @expectedExceptionMessage No configuration has been provided
*/
public function testGetConfigEmptyException() {
+ SparkPost::unsetConfig();
SparkPost::getConfig();
}