git subrepo commit (merge) mailcow/src/mailcow-dockerized

subrepo: subdir:   "mailcow/src/mailcow-dockerized"
  merged:   "02ae5285"
upstream: origin:   "https://github.com/mailcow/mailcow-dockerized.git"
  branch:   "master"
  commit:   "649a5c01"
git-subrepo: version:  "0.4.3"
  origin:   "???"
  commit:   "???"
Change-Id: I870ad468fba026cc5abf3c5699ed1e12ff28b32b
diff --git a/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/DirectoryFake.php b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/DirectoryFake.php
new file mode 100644
index 0000000..70640af
--- /dev/null
+++ b/mailcow/src/mailcow-dockerized/data/web/inc/lib/vendor/directorytree/ldaprecord/src/Testing/DirectoryFake.php
@@ -0,0 +1,53 @@
+<?php
+
+namespace LdapRecord\Testing;
+
+use LdapRecord\Container;
+
+class DirectoryFake
+{
+    /**
+     * Setup the fake connection.
+     *
+     * @param string|null $name
+     *
+     * @throws \LdapRecord\ContainerException
+     *
+     * @return ConnectionFake
+     */
+    public static function setup($name = null)
+    {
+        $connection = Container::getConnection($name);
+
+        $fake = static::makeConnectionFake(
+            $connection->getConfiguration()->all()
+        );
+
+        // Replace the connection with a fake.
+        Container::addConnection($fake, $name);
+
+        return $fake;
+    }
+
+    /**
+     * Reset the container.
+     *
+     * @return void
+     */
+    public static function tearDown()
+    {
+        Container::reset();
+    }
+
+    /**
+     * Make a connection fake.
+     *
+     * @param array $config
+     *
+     * @return ConnectionFake
+     */
+    public static function makeConnectionFake(array $config = [])
+    {
+        return ConnectionFake::make($config)->shouldBeConnected();
+    }
+}