]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Util/BasePathTest.php
Move expand_acl to ACLFormatter::expand()
[friendica.git] / tests / src / Util / BasePathTest.php
index c31adb079e0d888c94e86c42e354241a02be37f3..c9c7b079f9aa78cd933817c94c5efde7aa603835 100644 (file)
@@ -40,6 +40,14 @@ class BasePathTest extends MockedTest
                                ],
                                'input' => 'config',
                                'output' => dirname(__DIR__, 3) . DIRECTORY_SEPARATOR . 'config',
+                       ],
+                       'no_overwrite_if_invalid' => [
+                               'server' => [
+                                       'DOCUMENT_ROOT' => '/nopopop',
+                                       'PWD' => dirname(__DIR__, 3) . DIRECTORY_SEPARATOR . 'config',
+                               ],
+                               'input' => '/noatgawe22fafa',
+                               'output' => dirname(__DIR__, 3) . DIRECTORY_SEPARATOR . 'config',
                        ]
                ];
        }
@@ -50,7 +58,8 @@ class BasePathTest extends MockedTest
         */
        public function testDetermineBasePath(array $server, $input, $output)
        {
-               $this->assertEquals($output, BasePath::create($input, $server));
+               $basepath = new BasePath($input, $server);
+               $this->assertEquals($output, $basepath->getPath());
        }
 
        /**
@@ -60,6 +69,7 @@ class BasePathTest extends MockedTest
         */
        public function testFailedBasePath()
        {
-               BasePath::create('/now23452sgfgas', []);
+               $basepath = new BasePath('/now23452sgfgas', []);
+               $basepath->getPath();
        }
 }