mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-09 23:14:26 +02:00
Refactoring Core class structures ...
This commit is contained in:
parent
57b4c008cb
commit
b216317477
130 changed files with 1625 additions and 1397 deletions
|
@ -22,10 +22,10 @@
|
|||
namespace Friendica\Test\src\App;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Cache\ICache;
|
||||
use Friendica\Core\Config\IConfig;
|
||||
use Friendica\Core\Cache\Capability\ICanCache;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Lock\ILock;
|
||||
use Friendica\Core\Lock\Capability\ICanLock;
|
||||
use Friendica\LegacyModule;
|
||||
use Friendica\Module\HTTPException\PageNotFound;
|
||||
use Friendica\Module\WellKnown\HostMeta;
|
||||
|
@ -172,18 +172,18 @@ class ModuleTest extends DatabaseTest
|
|||
*/
|
||||
public function testModuleClass($assert, string $name, string $command, bool $privAdd)
|
||||
{
|
||||
$config = Mockery::mock(IConfig::class);
|
||||
$config = Mockery::mock(IManageConfigValues::class);
|
||||
$config->shouldReceive('get')->with('config', 'private_addons', false)->andReturn($privAdd)->atMost()->once();
|
||||
|
||||
$l10n = Mockery::mock(L10n::class);
|
||||
$l10n->shouldReceive('t')->andReturnUsing(function ($args) { return $args; });
|
||||
|
||||
$cache = Mockery::mock(ICache::class);
|
||||
$cache = Mockery::mock(ICanCache::class);
|
||||
$cache->shouldReceive('get')->with('routerDispatchData')->andReturn('')->atMost()->once();
|
||||
$cache->shouldReceive('get')->with('lastRoutesFileModifiedTime')->andReturn('')->atMost()->once();
|
||||
$cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->twice();
|
||||
|
||||
$lock = Mockery::mock(ILock::class);
|
||||
$lock = Mockery::mock(ICanLock::class);
|
||||
$lock->shouldReceive('acquire')->andReturn(true);
|
||||
$lock->shouldReceive('isLocked')->andReturn(false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue