2019-04-04 11:30:48 +00:00
|
|
|
<?php
|
2020-02-09 14:45:36 +00:00
|
|
|
/**
|
2023-01-01 14:36:24 +00:00
|
|
|
* @copyright Copyright (C) 2010-2023, the Friendica project
|
2020-02-09 14:45:36 +00:00
|
|
|
*
|
|
|
|
* @license GNU AGPL version 3 or any later version
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
2019-04-04 11:30:48 +00:00
|
|
|
|
|
|
|
namespace Friendica\Test\src\App;
|
|
|
|
|
2021-11-19 21:47:49 +00:00
|
|
|
use Dice\Dice;
|
|
|
|
use Friendica\App\Arguments;
|
2021-10-26 19:44:29 +00:00
|
|
|
use Friendica\Core\Cache\Capability\ICanCache;
|
2021-11-19 21:47:49 +00:00
|
|
|
use Friendica\Core\Config\Capability\IManageConfigValues;
|
2020-01-19 21:38:33 +00:00
|
|
|
use Friendica\Core\L10n;
|
2021-10-26 19:44:29 +00:00
|
|
|
use Friendica\Core\Lock\Capability\ICanLock;
|
2020-10-18 18:31:57 +00:00
|
|
|
use Mockery;
|
2020-01-19 21:38:33 +00:00
|
|
|
use Mockery\MockInterface;
|
2019-04-04 11:30:48 +00:00
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class RouterTest extends TestCase
|
|
|
|
{
|
2020-01-19 21:38:33 +00:00
|
|
|
/** @var L10n|MockInterface */
|
|
|
|
private $l10n;
|
2020-07-27 05:58:12 +00:00
|
|
|
/**
|
2021-10-26 19:44:29 +00:00
|
|
|
* @var ICanCache
|
2020-07-27 05:58:12 +00:00
|
|
|
*/
|
|
|
|
private $cache;
|
2021-07-25 04:31:48 +00:00
|
|
|
/**
|
2021-10-26 20:09:11 +00:00
|
|
|
* @var ICanLock
|
2021-07-25 04:31:48 +00:00
|
|
|
*/
|
|
|
|
private $lock;
|
2021-11-19 21:47:49 +00:00
|
|
|
/**
|
|
|
|
* @var IManageConfigValues
|
|
|
|
*/
|
|
|
|
private $config;
|
|
|
|
/**
|
|
|
|
* @var Dice
|
|
|
|
*/
|
|
|
|
private $dice;
|
|
|
|
/**
|
|
|
|
* @var Arguments
|
|
|
|
*/
|
|
|
|
private $arguments;
|
2020-01-19 21:38:33 +00:00
|
|
|
|
2021-11-19 21:47:49 +00:00
|
|
|
protected function setUp(): void
|
2020-01-19 21:38:33 +00:00
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
2021-11-19 21:47:49 +00:00
|
|
|
self::markTestIncomplete('Router tests need refactoring!');
|
|
|
|
|
|
|
|
/*
|
2020-10-18 18:31:57 +00:00
|
|
|
$this->l10n = Mockery::mock(L10n::class);
|
2020-01-19 21:38:33 +00:00
|
|
|
$this->l10n->shouldReceive('t')->andReturnUsing(function ($args) { return $args; });
|
2020-07-27 05:58:12 +00:00
|
|
|
|
2021-10-26 19:44:29 +00:00
|
|
|
$this->cache = Mockery::mock(ICanCache::class);
|
2020-07-27 05:58:12 +00:00
|
|
|
$this->cache->shouldReceive('get')->andReturn(null);
|
|
|
|
$this->cache->shouldReceive('set')->andReturn(false);
|
2021-07-25 04:44:23 +00:00
|
|
|
|
2021-10-26 19:44:29 +00:00
|
|
|
$this->lock = Mockery::mock(ICanLock::class);
|
2021-07-25 04:56:40 +00:00
|
|
|
$this->lock->shouldReceive('acquire')->andReturn(true);
|
|
|
|
$this->lock->shouldReceive('isLocked')->andReturn(false);
|
2019-10-11 15:55:02 +00:00
|
|
|
|
2021-11-19 21:47:49 +00:00
|
|
|
$this->config = Mockery::mock(IManageConfigValues::class);
|
2019-10-11 15:55:02 +00:00
|
|
|
|
2021-11-19 21:47:49 +00:00
|
|
|
$this->dice = new Dice();
|
2019-10-11 15:55:02 +00:00
|
|
|
|
2021-11-19 21:47:49 +00:00
|
|
|
$this->arguments = Mockery::mock(Arguments::class);
|
|
|
|
*/
|
2019-10-11 15:55:02 +00:00
|
|
|
}
|
|
|
|
|
2021-11-19 21:47:49 +00:00
|
|
|
public function test()
|
2019-09-26 19:18:01 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2019-04-04 11:30:48 +00:00
|
|
|
}
|