Adapt tests for PhpUnit 7.5
This commit is contained in:
parent
5947698dc1
commit
4b38b6aa16
10 changed files with 36 additions and 35 deletions
|
@ -40,6 +40,7 @@ class ArrayCacheTest extends MemoryCacheTest
|
|||
public function testTTL()
|
||||
{
|
||||
// Array Cache doesn't support TTL
|
||||
self::markTestSkipped("Array Cache doesn't support TTL");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -463,10 +463,11 @@ class InstallerTest extends MockedTest
|
|||
|
||||
/**
|
||||
* Test the setup of the config cache for installation
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testSetUpCache()
|
||||
{
|
||||
$this->l10nMock->shouldReceive('t')->andReturnUsing(function ($args) { return $args; });
|
||||
$this->l10nMock->shouldReceive('t')->andReturnUsing(function ($args) { return $args; })->times(5);
|
||||
|
||||
$install = new Installer();
|
||||
$configCache = Mockery::mock(Cache::class);
|
||||
|
|
|
@ -33,7 +33,6 @@ class ArrayCacheLockTest extends LockTest
|
|||
|
||||
public function testLockTTL()
|
||||
{
|
||||
// ArrayCache doesn't support TTL
|
||||
return true;
|
||||
self::markTestSkipped("ArrayCache doesn't support TTL");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,8 +61,7 @@ class SemaphoreLockTest extends LockTest
|
|||
|
||||
public function testLockTTL()
|
||||
{
|
||||
// Semaphore doesn't work with TTL
|
||||
return true;
|
||||
self::markTestSkipped("Semaphore doesn't work with TTL");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
namespace Friendica\Test\src\Security\TwoFactor\Factory;
|
||||
|
||||
use Friendica\Security\TwoFactor\Factory\TrustedBrowser;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Logger\VoidLogger;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
class TrustedBrowserTest extends \PHPUnit_Framework_TestCase
|
||||
class TrustedBrowserTest extends MockedTest
|
||||
{
|
||||
public function testCreateFromTableRowSuccess()
|
||||
{
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
namespace Friendica\Test\src\Security\TwoFactor\Model;
|
||||
|
||||
use Friendica\Security\TwoFactor\Model\TrustedBrowser;
|
||||
use Friendica\Test\MockedTest;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
class TrustedBrowserTest extends \PHPUnit_Framework_TestCase
|
||||
class TrustedBrowserTest extends MockedTest
|
||||
{
|
||||
public function test__construct()
|
||||
{
|
||||
|
|
|
@ -52,6 +52,7 @@ class ProfilerLoggerTest extends MockedTest
|
|||
/**
|
||||
* Test if the profiler is profiling data
|
||||
* @dataProvider dataTests
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testProfiling($function, $message, array $context)
|
||||
{
|
||||
|
@ -64,6 +65,7 @@ class ProfilerLoggerTest extends MockedTest
|
|||
|
||||
/**
|
||||
* Test the log() function
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testProfilingLog()
|
||||
{
|
||||
|
|
|
@ -95,6 +95,7 @@ class SyslogLoggerTest extends AbstractLoggerTest
|
|||
|
||||
/**
|
||||
* Test the close() method
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testClose()
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@ class VoidLoggerTest extends MockedTest
|
|||
/**
|
||||
* Test if the profiler is profiling data
|
||||
* @dataProvider dataTests
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testNormal($function, $message, array $context)
|
||||
{
|
||||
|
@ -41,6 +42,7 @@ class VoidLoggerTest extends MockedTest
|
|||
|
||||
/**
|
||||
* Test the log() function
|
||||
* @doesNotPerformAssertions
|
||||
*/
|
||||
public function testProfilingLog()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue