Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
driusan committed Apr 24, 2024
1 parent c287aa2 commit 15e018d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions php/libraries/NDB_Config.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,17 @@ class NDB_Config
}

protected $settingCache = [];

/**
* Clears the settings cache.
*
* @return void
*/
public function clearCache()
{
$this->settingCache = [];
}

/**
* Gets a setting by name
*
Expand Down
1 change: 1 addition & 0 deletions test/unittests/NDB_ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ protected function setUp(): void
{
parent::setUp();
$this->_config = FakeConfig::singleton();
$this->_config->clearCache();

$configMock = $this->getMockBuilder('NDB_Config')->getMock();
$dbMock = $this->getMockBuilder('Database')->getMock();
Expand Down

0 comments on commit 15e018d

Please sign in to comment.