mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:50:11 +00:00
Add Feedback :-)
This commit is contained in:
parent
409d909d0f
commit
f4ea74447e
14 changed files with 80 additions and 44 deletions
|
@ -26,7 +26,7 @@ use Dice\Dice;
|
|||
use Friendica\Core\Config\ValueObject\Cache;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPClient\Capability\ICanHandleHttpResponses;
|
||||
use Friendica\Network\HTTPClient\Capability\ICanRequestPerHttp;
|
||||
use Friendica\Network\HTTPClient\Capability\ICanSendHttpRequests;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
use Mockery;
|
||||
|
@ -331,7 +331,7 @@ class InstallerTest extends MockedTest
|
|||
->andReturn('test Error');
|
||||
|
||||
// Mocking the CURL Request
|
||||
$networkMock = Mockery::mock(ICanRequestPerHttp::class);
|
||||
$networkMock = Mockery::mock(ICanSendHttpRequests::class);
|
||||
$networkMock
|
||||
->shouldReceive('fetchFull')
|
||||
->with('https://test/install/testrewrite')
|
||||
|
@ -342,7 +342,7 @@ class InstallerTest extends MockedTest
|
|||
->andReturn($IHTTPResult);
|
||||
|
||||
$this->dice->shouldReceive('create')
|
||||
->with(ICanRequestPerHttp::class)
|
||||
->with(ICanSendHttpRequests::class)
|
||||
->andReturn($networkMock);
|
||||
|
||||
DI::init($this->dice);
|
||||
|
@ -378,7 +378,7 @@ class InstallerTest extends MockedTest
|
|||
->andReturn('204');
|
||||
|
||||
// Mocking the CURL Request
|
||||
$networkMock = Mockery::mock(ICanRequestPerHttp::class);
|
||||
$networkMock = Mockery::mock(ICanSendHttpRequests::class);
|
||||
$networkMock
|
||||
->shouldReceive('fetchFull')
|
||||
->with('https://test/install/testrewrite')
|
||||
|
@ -389,7 +389,7 @@ class InstallerTest extends MockedTest
|
|||
->andReturn($IHTTPResultW);
|
||||
|
||||
$this->dice->shouldReceive('create')
|
||||
->with(ICanRequestPerHttp::class)
|
||||
->with(ICanSendHttpRequests::class)
|
||||
->andReturn($networkMock);
|
||||
|
||||
DI::init($this->dice);
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace Friendica\Test\src\Core\Logger;
|
|||
|
||||
use Friendica\Core\Logger\Exception\LoggerArgumentException;
|
||||
use Friendica\Core\Logger\Exception\LoggerException;
|
||||
use Friendica\Core\Logger\Exception\LogLevelException;
|
||||
use Friendica\Util\FileSystem;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
use Friendica\Core\Logger\Type\StreamLogger;
|
||||
|
@ -160,7 +161,7 @@ class StreamLoggerTest extends AbstractLoggerTest
|
|||
*/
|
||||
public function testWrongMinimumLevel()
|
||||
{
|
||||
$this->expectException(LoggerArgumentException::class);
|
||||
$this->expectException(LogLevelException::class);
|
||||
$this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
|
||||
|
||||
$logger = new StreamLogger('test', 'file.text', $this->introspection, $this->fileSystem, 'NOPE');
|
||||
|
@ -171,7 +172,7 @@ class StreamLoggerTest extends AbstractLoggerTest
|
|||
*/
|
||||
public function testWrongLogLevel()
|
||||
{
|
||||
$this->expectException(LoggerArgumentException::class);
|
||||
$this->expectException(LogLevelException::class);
|
||||
$this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
|
||||
|
||||
$logfile = vfsStream::newFile('friendica.log')
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace Friendica\Test\src\Core\Logger;
|
|||
|
||||
use Friendica\Core\Logger\Exception\LoggerArgumentException;
|
||||
use Friendica\Core\Logger\Exception\LoggerException;
|
||||
use Friendica\Core\Logger\Exception\LogLevelException;
|
||||
use Friendica\Core\Logger\Type\SyslogLogger;
|
||||
use Psr\Log\LogLevel;
|
||||
|
||||
|
@ -64,7 +65,7 @@ class SyslogLoggerTest extends AbstractLoggerTest
|
|||
*/
|
||||
public function testWrongMinimumLevel()
|
||||
{
|
||||
$this->expectException(LoggerArgumentException::class);
|
||||
$this->expectException(LogLevelException::class);
|
||||
$this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
|
||||
|
||||
$logger = new SyslogLoggerWrapper('test', $this->introspection, 'NOPE');
|
||||
|
@ -75,7 +76,7 @@ class SyslogLoggerTest extends AbstractLoggerTest
|
|||
*/
|
||||
public function testWrongLogLevel()
|
||||
{
|
||||
$this->expectException(LoggerArgumentException::class);
|
||||
$this->expectException(LogLevelException::class);
|
||||
$this->expectExceptionMessageMatches("/The level \".*\" is not valid./");
|
||||
|
||||
$logger = new SyslogLoggerWrapper('test', $this->introspection);
|
||||
|
|
|
@ -40,7 +40,7 @@ use Friendica\DI;
|
|||
use Friendica\Core\Config\Factory\Config;
|
||||
use Friendica\Core\Config\Repository;
|
||||
use Friendica\Core\Storage\Type;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientCan;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClient;
|
||||
use Friendica\Test\DatabaseTest;
|
||||
use Friendica\Test\Util\Database\StaticDatabase;
|
||||
use Friendica\Test\Util\VFSTrait;
|
||||
|
@ -61,7 +61,7 @@ class StorageManagerTest extends DatabaseTest
|
|||
private $logger;
|
||||
/** @var L10n */
|
||||
private $l10n;
|
||||
/** @var HttpClientCan */
|
||||
/** @var HttpClient */
|
||||
private $httpRequest;
|
||||
|
||||
protected function setUp(): void
|
||||
|
@ -93,7 +93,7 @@ class StorageManagerTest extends DatabaseTest
|
|||
|
||||
$this->l10n = \Mockery::mock(L10n::class);
|
||||
|
||||
$this->httpRequest = \Mockery::mock(HttpClientCan::class);
|
||||
$this->httpRequest = \Mockery::mock(HttpClient::class);
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue