From 54cc53fd06a52a434571321fe4448389de3f4ad3 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Thu, 10 Feb 2022 18:29:35 +0100 Subject: [PATCH] Basic test, version bump --- tests/helper_test.php | 37 +++++++++++++++++++++++++++++++++++++ version.php | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/helper_test.php diff --git a/tests/helper_test.php b/tests/helper_test.php new file mode 100644 index 0000000..8077fbe --- /dev/null +++ b/tests/helper_test.php @@ -0,0 +1,37 @@ +. + +namespace tool_mhacker; + +use advanced_testcase; +use tool_mhacker_helper; + +/** + * Tests for the tool_wp\db class methods. + * + * @package tool_mhacker + * @copyright 2022 Marina Glancy + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class helper_test extends advanced_testcase { + public function test_find_stringfile_path() { + global $CFG; + $this->assertEquals($CFG->dirroot . '/admin/tool/mhacker/lang/en/tool_mhacker.php', + tool_mhacker_helper::find_stringfile_path('tool_mhacker')); + $this->assertEquals($CFG->dirroot . '/mod/assign/lang/en/assign.php', + tool_mhacker_helper::find_stringfile_path('mod_assign')); + } +} \ No newline at end of file diff --git a/version.php b/version.php index 8742921..ae905fc 100644 --- a/version.php +++ b/version.php @@ -26,6 +26,6 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2018112100; // The current plugin version (Date: YYYYMMDDXX). +$plugin->version = 2022021000; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2015050500; // Requires this Moodle version. $plugin->component = 'tool_mhacker'; // Full name of the plugin (used for diagnostics).