Promote getPath() to PMBusBase

Promote the getPath() method from the PMBus class to the PMBusBase
parent class.  This allows the method to be called from automated tests
using mock subclasses of PMBusBase.

Change-Id: I01dc6c314294e0de8919f78c79cbdc395020728f
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/phosphor-power-sequencer/test/mock_pmbus.hpp b/phosphor-power-sequencer/test/mock_pmbus.hpp
index 587e08b..6337dbf 100644
--- a/phosphor-power-sequencer/test/mock_pmbus.hpp
+++ b/phosphor-power-sequencer/test/mock_pmbus.hpp
@@ -17,11 +17,15 @@
 
 #include "pmbus.hpp"
 
+#include <filesystem>
+
 #include <gmock/gmock.h>
 
 namespace phosphor::pmbus
 {
 
+namespace fs = std::filesystem;
+
 /**
  * @class MockPMBus
  *
@@ -53,6 +57,7 @@
     MOCK_METHOD(const fs::path&, path, (), (const, override));
     MOCK_METHOD(std::string, insertPageNum,
                 (const std::string& templateName, size_t page), (override));
+    MOCK_METHOD(fs::path, getPath, (Type type), (override));
 };
 
 } // namespace phosphor::pmbus
diff --git a/phosphor-power-supply/test/mock.hpp b/phosphor-power-supply/test/mock.hpp
index 41db263..f3aee20 100644
--- a/phosphor-power-supply/test/mock.hpp
+++ b/phosphor-power-supply/test/mock.hpp
@@ -6,6 +6,7 @@
 #include <gpiod.hpp>
 
 #include <bitset>
+#include <filesystem>
 
 #include <gmock/gmock.h>
 
@@ -13,6 +14,9 @@
 {
 namespace pmbus
 {
+
+namespace fs = std::filesystem;
+
 class MockedPMBus : public PMBusBase
 {
   public:
@@ -33,6 +37,7 @@
     MOCK_METHOD(const fs::path&, path, (), (const, override));
     MOCK_METHOD(std::string, insertPageNum,
                 (const std::string& templateName, size_t page), (override));
+    MOCK_METHOD(fs::path, getPath, (Type type), (override));
 };
 } // namespace pmbus
 
diff --git a/pmbus.hpp b/pmbus.hpp
index be352b6..ecf7377 100644
--- a/pmbus.hpp
+++ b/pmbus.hpp
@@ -181,6 +181,7 @@
     virtual const fs::path& path() const = 0;
     virtual std::string insertPageNum(const std::string& templateName,
                                       size_t page) = 0;
+    virtual fs::path getPath(Type type) = 0;
 };
 
 /**
@@ -380,7 +381,7 @@
      *
      * @return fs::path - the full path
      */
-    fs::path getPath(Type type);
+    fs::path getPath(Type type) override;
 
   private:
     /**