summaryrefslogtreecommitdiff
path: root/src/settings/test/settings_mock.hpp
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-08-20 16:37:42 +0300
committeraqua <aqua@iserlohn-fortress.net>2022-08-28 09:48:45 +0300
commitf7ccea7bca79f1dc21e497872a419446f20d211e (patch)
tree87ad85a6e402908ce5c7f3439e0e25b889333c1c /src/settings/test/settings_mock.hpp
parentAdd rekonf script to generate SettingsWidgets (diff)
downloadrekonq-f7ccea7bca79f1dc21e497872a419446f20d211e.tar.xz
Add Setting and MockSettings
- rename Settings to RekonqSettings
Diffstat (limited to 'src/settings/test/settings_mock.hpp')
-rw-r--r--src/settings/test/settings_mock.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/settings/test/settings_mock.hpp b/src/settings/test/settings_mock.hpp
new file mode 100644
index 00000000..ec792ff5
--- /dev/null
+++ b/src/settings/test/settings_mock.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <gmock/gmock.h>
+#include <rsettings.hpp>
+
+class MockSettings : public RekonqSettings {
+ Q_OBJECT
+
+public:
+ explicit MockSettings() : RekonqSettings(nullptr) {}
+ ~MockSettings() = default;
+
+ MOCK_METHOD(void, beginGroup, (const QString &), (override));
+ MOCK_METHOD(void, endGroup, (), (override));
+
+ MOCK_METHOD(void, setValue, (const QString &, const QVariant &), (override));
+ MOCK_METHOD(QVariant, value, (const QString &, const QVariant &), (const, override));
+};