mirror of
https://github.com/friendica/friendica
synced 2025-04-23 12:30:10 +00:00
Fix tests
- Fix InstallerTest case - Fix native function mocking - Add returntype for Unit-Tests - Fixing ExtendedPDO test troubles - Fix wrong class inheritance path for DatabaseTestTrait.php - Fix SyslogLogger Server Exception for PHP8 - Add user/contact to database.fixture.php - Avoid invalid rollbacks for test setup in PHP8
This commit is contained in:
parent
8cab5edea9
commit
02e6dff6a0
53 changed files with 171 additions and 69 deletions
|
@ -19,11 +19,43 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Model\Contact;
|
||||
|
||||
return [
|
||||
'user' => [
|
||||
[
|
||||
'uid' => 42,
|
||||
'username' => 'Test user',
|
||||
'nickname' => 'selfcontact',
|
||||
'verified' => 1,
|
||||
'password' => '$2y$10$DLRNTRmJgKe1cSrFJ5Jb0edCqvXlA9sh/RHdSnfxjbR.04yZRm4Qm',
|
||||
'theme' => 'frio',
|
||||
],
|
||||
],
|
||||
'contact' => [
|
||||
[
|
||||
'id' => 42,
|
||||
'uid' => 42,
|
||||
'name' => 'Self contact',
|
||||
'nick' => 'selfcontact',
|
||||
'self' => 1,
|
||||
'nurl' => 'http://localhost/profile/selfcontact',
|
||||
'url' => 'http://localhost/profile/selfcontact',
|
||||
'about' => 'User used in tests',
|
||||
'pending' => 0,
|
||||
'blocked' => 0,
|
||||
'rel' => Contact::FOLLOWER,
|
||||
'network' => Protocol::DFRN,
|
||||
'location' => 'DFRN',
|
||||
],
|
||||
],
|
||||
'photo' => [
|
||||
// move from data-attribute to storage backend
|
||||
[
|
||||
'id' => 1,
|
||||
'uid' => 42,
|
||||
'contact-id' => 42,
|
||||
'backend-class' => null,
|
||||
'backend-ref' => 'f0c0d0i2',
|
||||
'data' => 'without class',
|
||||
|
@ -31,6 +63,8 @@ return [
|
|||
// move from storage-backend to maybe filesystem backend, skip at database backend
|
||||
[
|
||||
'id' => 2,
|
||||
'uid' => 42,
|
||||
'contact-id' => 42,
|
||||
'backend-class' => 'Database',
|
||||
'backend-ref' => 1,
|
||||
'data' => '',
|
||||
|
@ -38,6 +72,8 @@ return [
|
|||
// move data if invalid storage
|
||||
[
|
||||
'id' => 3,
|
||||
'uid' => 42,
|
||||
'contact-id' => 42,
|
||||
'backend-class' => 'invalid!',
|
||||
'backend-ref' => 'unimported',
|
||||
'data' => 'invalid data moved',
|
||||
|
@ -45,6 +81,8 @@ return [
|
|||
// @todo Check failing test because of this (never loaded) fixture
|
||||
// [
|
||||
// 'id' => 4,
|
||||
// 'uid' => 42,
|
||||
// 'contact-id' => 42,
|
||||
// 'backend-class' => 'invalid!',
|
||||
// 'backend-ref' => 'unimported',
|
||||
// 'data' => '',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue