Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: Adapt tests to properly use valid email addresses
Signed-off-by: Julius Knorr <[email protected]>
  • Loading branch information
juliusknorr authored and AndyScherzinger committed Mar 28, 2025
commit deafe47b98a2e049737f9f80892e99a38a1e411e
50 changes: 25 additions & 25 deletions tests/lib/Collaboration/Collaborators/MailPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ public function dataGetEmail() {
'UID' => 'uid1',
'FN' => 'User @ Localhost',
'EMAIL' => [
'username@localhost',
'username@example.com',
],
],
],
true,
['emails' => [['uuid' => 'uid1', 'name' => 'User @ Localhost', 'type' => '', 'label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@localhost']]], 'exact' => ['emails' => []]],
['emails' => [['uuid' => 'uid1', 'name' => 'User @ Localhost', 'type' => '', 'label' => 'User @ Localhost (username@example.com)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@example.com']]], 'exact' => ['emails' => []]],
false,
false,
false,
Expand Down Expand Up @@ -233,24 +233,24 @@ public function dataGetEmail() {
[
[
'UID' => 'uid3',
'FN' => 'User3 @ Localhost',
'FN' => 'User3 @ example.com',
],
[
'UID' => 'uid2',
'FN' => 'User2 @ Localhost',
'FN' => 'User2 @ example.com',
'EMAIL' => [
],
],
[
'UID' => 'uid1',
'FN' => 'User @ Localhost',
'FN' => 'User @ example.com',
'EMAIL' => [
'username@localhost',
'username@example.com',
],
],
],
true,
['emails' => [['uuid' => 'uid1', 'name' => 'User @ Localhost', 'type' => '', 'label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@localhost']]], 'exact' => ['emails' => [['label' => '[email protected]', 'uuid' => '[email protected]', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => '[email protected]']]]]],
['emails' => [['uuid' => 'uid1', 'name' => 'User @ example.com', 'type' => '', 'label' => 'User @ example.com (username@example.com)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@example.com']]], 'exact' => ['emails' => [['label' => '[email protected]', 'uuid' => '[email protected]', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => '[email protected]']]]]],
false,
false,
true,
Expand Down Expand Up @@ -286,56 +286,56 @@ public function dataGetEmail() {
],
// data set 9
[
'username@localhost',
'username@example.com',
[
[
'UID' => 'uid3',
'FN' => 'User3 @ Localhost',
'FN' => 'User3 @ example.com',
],
[
'UID' => 'uid2',
'FN' => 'User2 @ Localhost',
'FN' => 'User2 @ example.com',
'EMAIL' => [
],
],
[
'UID' => 'uid1',
'FN' => 'User @ Localhost',
'FN' => 'User @ example.com',
'EMAIL' => [
'username@localhost',
'username@example.com',
],
],
],
true,
['emails' => [], 'exact' => ['emails' => [['name' => 'User @ Localhost', 'uuid' => 'uid1', 'type' => '', 'label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@localhost']]]]],
['emails' => [], 'exact' => ['emails' => [['name' => 'User @ example.com', 'uuid' => 'uid1', 'type' => '', 'label' => 'User @ example.com (username@example.com)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@example.com']]]]],
true,
false,
false,
],
// data set 10
[
'username@localhost',
'username@example.com',
[
[
'UID' => 'uid1',
'FN' => 'User3 @ Localhost',
'FN' => 'User3 @ example.com',
],
[
'UID' => 'uid2',
'FN' => 'User2 @ Localhost',
'FN' => 'User2 @ example.com',
'EMAIL' => [
],
],
[
'UID' => 'uid1',
'FN' => 'User @ Localhost',
'FN' => 'User @ example.com',
'EMAIL' => [
'username@localhost',
'username@example.com',
],
],
],
false,
['emails' => [], 'exact' => ['emails' => [['name' => 'User @ Localhost', 'uuid' => 'uid1', 'type' => '', 'label' => 'User @ Localhost (username@localhost)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@localhost']]]]],
['emails' => [], 'exact' => ['emails' => [['name' => 'User @ example.com', 'uuid' => 'uid1', 'type' => '', 'label' => 'User @ example.com (username@example.com)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@example.com']]]]],
true,
false,
false,
Expand Down Expand Up @@ -364,8 +364,8 @@ public function dataGetEmail() {
],
],
false,
['emails' => [], 'exact' => ['emails' => [['name' => 'User Name @ Localhost', 'uuid' => 'uid1', 'type' => '', 'label' => 'User Name @ Localhost (user name@localhost)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'user name@localhost']]]]],
true,
['emails' => [], 'exact' => ['emails' => []]],
false,
false,
false,
],
Expand Down Expand Up @@ -538,16 +538,16 @@ public function dataGetEmail() {
'UID' => 'uid1',
'FN' => 'User Name',
'EMAIL' => [
['type' => 'HOME', 'value' => 'username@localhost'],
['type' => 'WORK', 'value' => 'username@other'],
['type' => 'HOME', 'value' => 'username@example.com'],
['type' => 'WORK', 'value' => 'other@example.com'],
],
],
],
false,
['emails' => [
], 'exact' => ['emails' => [
['name' => 'User Name', 'uuid' => 'uid1', 'type' => 'HOME', 'label' => 'User Name (username@localhost)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@localhost']],
['name' => 'User Name', 'uuid' => 'uid1', 'type' => 'WORK', 'label' => 'User Name (username@other)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@other']]
['name' => 'User Name', 'uuid' => 'uid1', 'type' => 'HOME', 'label' => 'User Name (username@example.com)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'username@example.com']],
['name' => 'User Name', 'uuid' => 'uid1', 'type' => 'WORK', 'label' => 'User Name (other@example.com)', 'value' => ['shareType' => IShare::TYPE_EMAIL, 'shareWith' => 'other@example.com']]
]]],
false,
false,
Expand Down
Loading