]> git.mxchange.org Git - friendica.git/blobdiff - tests/Util/SampleStorageBackend.php
Merge pull request #8128 from nupplaphil/task/di_static_methods
[friendica.git] / tests / Util / SampleStorageBackend.php
index 3f4eb90ada0f91cbddc18426813ad9f4dd75b448..a788c6d3df8147ae79668bca7347c82257f4324c 100644 (file)
@@ -2,9 +2,12 @@
 
 namespace Friendica\Test\Util;
 
+use Friendica\App;
+use Friendica\Core\Hook;
 use Friendica\Model\Storage\IStorage;
 
 use Friendica\Core\L10n\L10n;
+use Mockery\MockInterface;
 
 /**
  * A backend storage example class
@@ -91,4 +94,13 @@ class SampleStorageBackend implements IStorage
        {
                return self::NAME;
        }
+
+       /**
+        * This one is a hack to register this class to the hook
+        */
+       public static function registerHook()
+       {
+               Hook::register('storage_instance', __DIR__ . '/SampleStorageBackendInstance.php', 'create_instance');
+       }
 }
+