]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Util/BasePathTest.php
Merge branch 'stable' into develop
[friendica.git] / tests / src / Util / BasePathTest.php
index 3c619255cfe959c419760eedb9d7d4c9d778e437..7cdf612e64aa2ce31f40aeba0408ce8362c41335 100644 (file)
@@ -58,16 +58,19 @@ class BasePathTest extends MockedTest
         */
        public function testDetermineBasePath(array $server, $input, $output)
        {
-               $this->assertEquals($output, BasePath::create($input, $server));
+               $basepath = new BasePath($input, $server);
+               self::assertEquals($output, $basepath->getPath());
        }
 
        /**
         * Test the basepath determination with a complete wrong path
-        * @expectedException \Exception
-        * @expectedExceptionMessageRegExp /(.*) is not a valid basepath/
         */
        public function testFailedBasePath()
        {
-               BasePath::create('/now23452sgfgas', []);
+               $this->expectException(\Exception::class);
+               $this->expectExceptionMessageMatches("/(.*) is not a valid basepath/");
+               
+               $basepath = new BasePath('/now23452sgfgas', []);
+               $basepath->getPath();
        }
 }