mirror of
https://github.com/friendica/friendica
synced 2025-04-21 15:10:12 +00:00
Refactor L10n for testing
- Moving L10n to L10n\L10n - Adding constructor information - Adding to factory - simplify/speedup tests
This commit is contained in:
parent
966043712f
commit
eb024a3718
13 changed files with 596 additions and 450 deletions
|
@ -3,20 +3,15 @@
|
|||
namespace Friendica\Test\src\Content\Text;
|
||||
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\L10n\L10n;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Test\Util\AppMockTrait;
|
||||
use Friendica\Test\Util\L10nMockTrait;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
|
||||
/**
|
||||
* @runTestsInSeparateProcesses
|
||||
* @preserveGlobalState disabled
|
||||
*/
|
||||
class BBCodeTest extends MockedTest
|
||||
{
|
||||
use VFSTrait;
|
||||
use AppMockTrait;
|
||||
use L10nMockTrait;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
|
@ -43,7 +38,11 @@ class BBCodeTest extends MockedTest
|
|||
$this->configMock->shouldReceive('get')
|
||||
->with('system', 'no_smilies')
|
||||
->andReturn(false);
|
||||
$this->mockL10nT();
|
||||
|
||||
$l10nMock = \Mockery::mock(L10n::class);
|
||||
$l10nMock->shouldReceive('t')->withAnyArgs()->andReturnUsing(function ($args) { return $args; });
|
||||
\Friendica\Core\L10n::init($l10nMock);
|
||||
|
||||
}
|
||||
|
||||
public function dataLinks()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue