Fix PHPUnit 10 deprecations
This commit is contained in:
parent
037dac988e
commit
5fbdcd4a26
4 changed files with 8 additions and 5 deletions
|
@ -60,7 +60,6 @@ class StaticDatabase extends Database
|
||||||
$this->driver = 'pdo';
|
$this->driver = 'pdo';
|
||||||
$this->connection = self::$staticConnection;
|
$this->connection = self::$staticConnection;
|
||||||
$this->connected = true;
|
$this->connected = true;
|
||||||
$this->emulate_prepares = false;
|
|
||||||
|
|
||||||
return $this->connected;
|
return $this->connected;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ class BaseURLTest extends MockedTest
|
||||||
public function testRedirectException()
|
public function testRedirectException()
|
||||||
{
|
{
|
||||||
self::expectException(InternalServerErrorException::class);
|
self::expectException(InternalServerErrorException::class);
|
||||||
self::expectErrorMessage('https://friendica.other is not a relative path, please use System::externalRedirect');
|
self::expectExceptionMessage('https://friendica.other is not a relative path, please use System::externalRedirect');
|
||||||
|
|
||||||
$config = new ReadOnlyFileConfig(new Cache([
|
$config = new ReadOnlyFileConfig(new Cache([
|
||||||
'system' => [
|
'system' => [
|
||||||
|
|
|
@ -28,6 +28,9 @@ use Friendica\Test\FixtureTest;
|
||||||
|
|
||||||
class BBCodeTest extends FixtureTest
|
class BBCodeTest extends FixtureTest
|
||||||
{
|
{
|
||||||
|
/** @var \HTMLPurifier */
|
||||||
|
public $HTMLPurifier;
|
||||||
|
|
||||||
protected function setUp(): void
|
protected function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
|
@ -231,11 +231,12 @@ class CookieTest extends MockedTest
|
||||||
|
|
||||||
$data = json_decode(StaticCookie::$_COOKIE[Cookie::NAME]);
|
$data = json_decode(StaticCookie::$_COOKIE[Cookie::NAME]);
|
||||||
|
|
||||||
self::assertObjectHasAttribute('uid', $data);
|
self::assertIsObject($data);
|
||||||
|
self::assertTrue(property_exists($data, 'uid'));
|
||||||
self::assertEquals($uid, $data->uid);
|
self::assertEquals($uid, $data->uid);
|
||||||
self::assertObjectHasAttribute('hash', $data);
|
self::assertTrue(property_exists($data, 'hash'));
|
||||||
self::assertEquals($hash, $data->hash);
|
self::assertEquals($hash, $data->hash);
|
||||||
self::assertObjectHasAttribute('ip', $data);
|
self::assertTrue(property_exists($data, 'ip'));
|
||||||
self::assertEquals($remoteIp, $data->ip);
|
self::assertEquals($remoteIp, $data->ip);
|
||||||
|
|
||||||
self::assertLessThanOrEqual(time() + Cookie::DEFAULT_EXPIRE * 24 * 60 * 60, StaticCookie::$_EXPIRE);
|
self::assertLessThanOrEqual(time() + Cookie::DEFAULT_EXPIRE * 24 * 60 * 60, StaticCookie::$_EXPIRE);
|
||||||
|
|
Loading…
Reference in a new issue