Adding basepath, urlpath, hostname and ssl_policy to installation

This commit is contained in:
Philipp Holzer 2019-03-26 22:04:31 +01:00
parent 19f474f50d
commit 90a38a00d8
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
20 changed files with 380 additions and 127 deletions

View file

@ -0,0 +1,29 @@
<?php
namespace Friendica\Test\src\Util;
use Friendica\Test\MockedTest;
use Friendica\Util\BasePath;
class BasePathTest extends MockedTest
{
/**
* Test the basepath determination
*/
public function testDetermineBasePath()
{
$serverArr = ['DOCUMENT_ROOT' => '/invalid', 'PWD' => '/invalid2'];
$this->assertEquals('/valid', BasePath::create('/valid', $serverArr));
}
/**
* Test the basepath determination with DOCUMENT_ROOT and PWD
*/
public function testDetermineBasePathWithServer()
{
$serverArr = ['DOCUMENT_ROOT' => '/valid'];
$this->assertEquals('/valid', BasePath::create('', $serverArr));
$serverArr = ['PWD' => '/valid_too'];
$this->assertEquals('/valid_too', BasePath::create('', $serverArr));
}
}