Skip to content

Commit c48ff84

Browse files
author
mapril
committed
Fixed failing unit test - added ability to unset config
1 parent d1edaca commit c48ff84

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/SparkPost/SparkPost.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public static function getConfig() {
5151
}
5252
return self::$config;
5353
}
54+
55+
public static function unsetConfig() {
56+
self::$config = NULL;
57+
}
5458
}
5559

5660
?>

test/unit/SparkPostTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function testConstructorCannotBeCalled() {
2020
* @expectedExceptionMessage No configuration has been provided
2121
*/
2222
public function testGetConfigEmptyException() {
23+
SparkPost::unsetConfig();
2324
SparkPost::getConfig();
2425
}
2526

0 commit comments

Comments
 (0)