Fix PHPUnit 10 deprecations
This commit is contained in:
parent
037dac988e
commit
5fbdcd4a26
|
@ -60,7 +60,6 @@ class StaticDatabase extends Database
|
|||
$this->driver = 'pdo';
|
||||
$this->connection = self::$staticConnection;
|
||||
$this->connected = true;
|
||||
$this->emulate_prepares = false;
|
||||
|
||||
return $this->connected;
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ class BaseURLTest extends MockedTest
|
|||
public function testRedirectException()
|
||||
{
|
||||
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([
|
||||
'system' => [
|
||||
|
|
|
@ -28,6 +28,9 @@ use Friendica\Test\FixtureTest;
|
|||
|
||||
class BBCodeTest extends FixtureTest
|
||||
{
|
||||
/** @var \HTMLPurifier */
|
||||
public $HTMLPurifier;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
|
|
@ -231,11 +231,12 @@ class CookieTest extends MockedTest
|
|||
|
||||
$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::assertObjectHasAttribute('hash', $data);
|
||||
self::assertTrue(property_exists($data, 'hash'));
|
||||
self::assertEquals($hash, $data->hash);
|
||||
self::assertObjectHasAttribute('ip', $data);
|
||||
self::assertTrue(property_exists($data, 'ip'));
|
||||
self::assertEquals($remoteIp, $data->ip);
|
||||
|
||||
self::assertLessThanOrEqual(time() + Cookie::DEFAULT_EXPIRE * 24 * 60 * 60, StaticCookie::$_EXPIRE);
|
||||
|
|
Loading…
Reference in New Issue
Block a user