forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7cb2b0c
commit 6bd4b3f
Showing
4 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,14 +17,13 @@ | |
namespace core\tests; | ||
|
||
/** | ||
* A string manager which supports mocking individaul strings. | ||
* A string manager which supports mocking individual strings. | ||
* | ||
* @package core | ||
* @copyright Andrew Lyons <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
class mocking_string_manager extends \core_string_manager_standard { | ||
class mocking_string_manager extends \core_string_manager_standard { | ||
/** @var array<string, string> The list of strings */ | ||
private $strings = []; | ||
|
||
|
@@ -37,6 +36,14 @@ public function get_string($identifier, $component = '', $a = null, $lang = null | |
return parent::get_string($identifier, $component, $a, $lang); | ||
} | ||
|
||
/** | ||
* Mock a string. | ||
* | ||
* @param string $identifier | ||
* @param string $component | ||
* @param string $value | ||
* @return void | ||
*/ | ||
public function mock_string( | ||
string $identifier, | ||
string $component, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters