mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:10:11 +00:00
Adding basepath, urlpath, hostname and ssl_policy to installation
This commit is contained in:
parent
19f474f50d
commit
90a38a00d8
20 changed files with 380 additions and 127 deletions
29
tests/src/Util/BasePathTest.php
Normal file
29
tests/src/Util/BasePathTest.php
Normal 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));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue