mirror of
https://github.com/friendica/friendica
synced 2025-04-27 11:50:11 +00:00
Merge remote-tracking branch 'friendica/stable' into develop
# Conflicts: # composer.lock
This commit is contained in:
commit
a852455d0e
154 changed files with 26577 additions and 25630 deletions
|
@ -45,8 +45,8 @@ class ArgumentsTest extends TestCase
|
|||
$this->assertArguments([
|
||||
'queryString' => '',
|
||||
'command' => '',
|
||||
'argv' => ['home'],
|
||||
'argc' => 1,
|
||||
'argv' => [],
|
||||
'argc' => 0,
|
||||
],
|
||||
$arguments);
|
||||
}
|
||||
|
@ -55,34 +55,6 @@ class ArgumentsTest extends TestCase
|
|||
{
|
||||
return [
|
||||
'withPagename' => [
|
||||
'assert' => [
|
||||
'queryString' => 'profile/test/it?arg1=value1&arg2=value2',
|
||||
'command' => 'profile/test/it',
|
||||
'argv' => ['profile', 'test', 'it'],
|
||||
'argc' => 3,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'pagename=profile/test/it?arg1=value1&arg2=value2',
|
||||
],
|
||||
'get' => [
|
||||
'pagename' => 'profile/test/it',
|
||||
],
|
||||
],
|
||||
'withQ' => [
|
||||
'assert' => [
|
||||
'queryString' => 'profile/test/it?arg1=value1&arg2=value2',
|
||||
'command' => 'profile/test/it',
|
||||
'argv' => ['profile', 'test', 'it'],
|
||||
'argc' => 3,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'q=profile/test/it?arg1=value1&arg2=value2',
|
||||
],
|
||||
'get' => [
|
||||
'q' => 'profile/test/it',
|
||||
],
|
||||
],
|
||||
'withWrongDelimiter' => [
|
||||
'assert' => [
|
||||
'queryString' => 'profile/test/it?arg1=value1&arg2=value2',
|
||||
'command' => 'profile/test/it',
|
||||
|
@ -99,12 +71,12 @@ class ArgumentsTest extends TestCase
|
|||
'withUnixHomeDir' => [
|
||||
'assert' => [
|
||||
'queryString' => '~test/it?arg1=value1&arg2=value2',
|
||||
'command' => 'profile/test/it',
|
||||
'argv' => ['profile', 'test', 'it'],
|
||||
'argc' => 3,
|
||||
'command' => '~test/it',
|
||||
'argv' => ['~test', 'it'],
|
||||
'argc' => 2,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'pagename=~test/it?arg1=value1&arg2=value2',
|
||||
'QUERY_STRING' => 'pagename=~test/it&arg1=value1&arg2=value2',
|
||||
],
|
||||
'get' => [
|
||||
'pagename' => '~test/it',
|
||||
|
@ -113,12 +85,12 @@ class ArgumentsTest extends TestCase
|
|||
'withDiasporaHomeDir' => [
|
||||
'assert' => [
|
||||
'queryString' => 'u/test/it?arg1=value1&arg2=value2',
|
||||
'command' => 'profile/test/it',
|
||||
'argv' => ['profile', 'test', 'it'],
|
||||
'command' => 'u/test/it',
|
||||
'argv' => ['u', 'test', 'it'],
|
||||
'argc' => 3,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'pagename=u/test/it?arg1=value1&arg2=value2',
|
||||
'QUERY_STRING' => 'pagename=u/test/it&arg1=value1&arg2=value2',
|
||||
],
|
||||
'get' => [
|
||||
'pagename' => 'u/test/it',
|
||||
|
@ -126,13 +98,13 @@ class ArgumentsTest extends TestCase
|
|||
],
|
||||
'withTrailingSlash' => [
|
||||
'assert' => [
|
||||
'queryString' => 'profile/test/it?arg1=value1&arg2=value2/',
|
||||
'queryString' => 'profile/test/it?arg1=value1&arg2=value2%2F',
|
||||
'command' => 'profile/test/it',
|
||||
'argv' => ['profile', 'test', 'it'],
|
||||
'argc' => 3,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'pagename=profile/test/it?arg1=value1&arg2=value2/',
|
||||
'QUERY_STRING' => 'pagename=profile/test/it&arg1=value1&arg2=value2/',
|
||||
],
|
||||
'get' => [
|
||||
'pagename' => 'profile/test/it',
|
||||
|
@ -140,14 +112,13 @@ class ArgumentsTest extends TestCase
|
|||
],
|
||||
'withWrongQueryString' => [
|
||||
'assert' => [
|
||||
// empty query string?!
|
||||
'queryString' => '',
|
||||
'queryString' => 'profile/test/it?wrong=profile%2Ftest%2Fit&arg1=value1&arg2=value2%2F',
|
||||
'command' => 'profile/test/it',
|
||||
'argv' => ['profile', 'test', 'it'],
|
||||
'argc' => 3,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'wrong=profile/test/it?arg1=value1&arg2=value2/',
|
||||
'QUERY_STRING' => 'wrong=profile/test/it&arg1=value1&arg2=value2/',
|
||||
],
|
||||
'get' => [
|
||||
'pagename' => 'profile/test/it',
|
||||
|
@ -155,17 +126,44 @@ class ArgumentsTest extends TestCase
|
|||
],
|
||||
'withMissingPageName' => [
|
||||
'assert' => [
|
||||
'queryString' => 'notvalid/it?arg1=value1&arg2=value2/',
|
||||
'command' => App\Module::DEFAULT,
|
||||
'argv' => [App\Module::DEFAULT],
|
||||
'argc' => 1,
|
||||
'queryString' => 'notvalid/it?arg1=value1&arg2=value2%2F',
|
||||
'command' => 'notvalid/it',
|
||||
'argv' => ['notvalid', 'it'],
|
||||
'argc' => 2,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'pagename=notvalid/it?arg1=value1&arg2=value2/',
|
||||
'QUERY_STRING' => 'pagename=notvalid/it&arg1=value1&arg2=value2/',
|
||||
],
|
||||
'get' => [
|
||||
],
|
||||
],
|
||||
'withNothing' => [
|
||||
'assert' => [
|
||||
'queryString' => '?arg1=value1&arg2=value2%2F',
|
||||
'command' => '',
|
||||
'argv' => [],
|
||||
'argc' => 0,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'arg1=value1&arg2=value2/',
|
||||
],
|
||||
'get' => [
|
||||
],
|
||||
],
|
||||
'withFileExtension' => [
|
||||
'assert' => [
|
||||
'queryString' => 'api/call.json',
|
||||
'command' => 'api/call.json',
|
||||
'argv' => ['api', 'call.json'],
|
||||
'argc' => 2,
|
||||
],
|
||||
'server' => [
|
||||
'QUERY_STRING' => 'pagename=api/call.json',
|
||||
],
|
||||
'get' => [
|
||||
'pagename' => 'api/call.json'
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -207,27 +205,27 @@ class ArgumentsTest extends TestCase
|
|||
return [
|
||||
'strippedZRLFirst' => [
|
||||
'assert' => '?arg1=value1',
|
||||
'input' => '?zrl=nope&arg1=value1',
|
||||
'input' => '&zrl=nope&arg1=value1',
|
||||
],
|
||||
'strippedZRLLast' => [
|
||||
'assert' => '?arg1=value1',
|
||||
'input' => '?arg1=value1&zrl=nope',
|
||||
'input' => '&arg1=value1&zrl=nope',
|
||||
],
|
||||
'strippedZTLMiddle' => [
|
||||
'assert' => '?arg1=value1&arg2=value2',
|
||||
'input' => '?arg1=value1&zrl=nope&arg2=value2',
|
||||
'input' => '&arg1=value1&zrl=nope&arg2=value2',
|
||||
],
|
||||
'strippedOWTFirst' => [
|
||||
'assert' => '?arg1=value1',
|
||||
'input' => '?owt=test&arg1=value1',
|
||||
'input' => '&owt=test&arg1=value1',
|
||||
],
|
||||
'strippedOWTLast' => [
|
||||
'assert' => '?arg1=value1',
|
||||
'input' => '?arg1=value1&owt=test',
|
||||
'input' => '&arg1=value1&owt=test',
|
||||
],
|
||||
'strippedOWTMiddle' => [
|
||||
'assert' => '?arg1=value1&arg2=value2',
|
||||
'input' => '?arg1=value1&owt=test&arg2=value2',
|
||||
'input' => '&arg1=value1&owt=test&arg2=value2',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -242,7 +240,7 @@ class ArgumentsTest extends TestCase
|
|||
$command = 'test/it';
|
||||
|
||||
$arguments = (new App\Arguments())
|
||||
->determine(['QUERY_STRING' => 'q=' . $command . $input,], ['pagename' => $command]);
|
||||
->determine(['QUERY_STRING' => 'pagename=' . $command . $input,], ['pagename' => $command]);
|
||||
|
||||
$this->assertEquals($command . $assert, $arguments->getQueryString());
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Test\Content\Text\BBCode;
|
||||
namespace Friendica\Test\src\Content\Text\BBCode;
|
||||
|
||||
use Friendica\Content\Text\BBCode\Video;
|
||||
use Friendica\Test\MockedTest;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Test\src\Core\L10n;
|
||||
namespace Friendica\Test\src\Core;
|
||||
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Test\MockedTest;
|
||||
|
|
|
@ -234,7 +234,7 @@ class ContactEndpointTest extends FixtureTest
|
|||
'uid' => 42,
|
||||
'cid' => 44,
|
||||
'pid' => 45,
|
||||
'self' => 0,
|
||||
'self' => false,
|
||||
'network' => 'dfrn',
|
||||
'statusnet_profile_url' => 'http://localhost/profile/friendcontact',
|
||||
];
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
namespace Friendica\Test\Protocol;
|
||||
namespace Friendica\Test\src\Protocol;
|
||||
|
||||
use Friendica\Protocol\Activity;
|
||||
use Friendica\Protocol\ActivityNamespace;
|
||||
|
|
|
@ -61,7 +61,7 @@ class MailBuilderTest extends MockedTest
|
|||
$this->baseUrl->shouldReceive('getHostname')->andReturn('friendica.local');
|
||||
$this->baseUrl->shouldReceive('get')->andReturn('http://friendica.local');
|
||||
|
||||
$this->defaultHeaders = "";
|
||||
$this->defaultHeaders = [];
|
||||
}
|
||||
|
||||
public function assertEmail(IEmail $email, array $asserts)
|
||||
|
|
|
@ -41,7 +41,7 @@ class SystemMailBuilderTest extends MockedTest
|
|||
/** @var BaseURL */
|
||||
private $baseUrl;
|
||||
|
||||
/** @var string */
|
||||
/** @var string[] */
|
||||
private $defaultHeaders;
|
||||
|
||||
public function setUp()
|
||||
|
@ -60,7 +60,7 @@ class SystemMailBuilderTest extends MockedTest
|
|||
$this->baseUrl->shouldReceive('getHostname')->andReturn('friendica.local');
|
||||
$this->baseUrl->shouldReceive('get')->andReturn('http://friendica.local');
|
||||
|
||||
$this->defaultHeaders = "";
|
||||
$this->defaultHeaders = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue