Skip to content

Commit 5bcdaa4

Browse files
committed
Add clearCache
1 parent 8ad6024 commit 5bcdaa4

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

source/Config.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,15 @@ public static function addDirectory($directory = '.')
6868
return true;
6969
}
7070

71+
/**
72+
* Clear Cache
73+
*/
74+
public static function clearCache()
75+
{
76+
self::$cache = array();
77+
return true;
78+
}
79+
7180
/**
7281
* Get
7382
* @param $key

test/ConfigTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,20 @@ public function testConstruct()
4545
* Test Add Directory
4646
* @return void
4747
*/
48-
public function testSetDirectory()
48+
public function testAddDirectory()
4949
{
5050
$this->assertEquals(Config::addDirectory($this->testDirectory), true);
5151
}
5252

53+
/**
54+
* Test Clear Cache
55+
* @return void
56+
*/
57+
public function testClearCache()
58+
{
59+
$this->assertEquals(Config::clearCache(), true);
60+
}
61+
5362
/**
5463
* Test Get From Directory
5564
* @return void

0 commit comments

Comments
 (0)