Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117751888
D4045.1775187172.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D4045.1775187172.diff
View Options
diff --git a/src/tests/Infrastructure/ActivesyncTest.php b/src/tests/Infrastructure/ActivesyncTest.php
--- a/src/tests/Infrastructure/ActivesyncTest.php
+++ b/src/tests/Infrastructure/ActivesyncTest.php
@@ -38,15 +38,38 @@
{
parent::setUp();
- if (!self::$user) {
- self::$user = $this->getTestUser('activesynctest@kolab.org', ['password' => 'simple123'], true);
- }
if (!self::$deviceId) {
// By always creating a new device we force syncroton to initialize.
// Otherwise we work against uninitialized metadata (subscription states),
// because the account has been removed, but syncroton doesn't reinitalize the metadata for known devices.
self::$deviceId = (string) Str::uuid();
}
+
+ $deviceId = self::$deviceId;
+ \config(['imap.default_folders' => [
+ 'Drafts' => [
+ 'metadata' => [
+ '/private/vendor/kolab/folder-type' => 'mail.drafts',
+ '/private/vendor/kolab/activesync' => "{\"FOLDER\":{\"{$deviceId}\":{\"S\":1}}}"
+ ],
+ ],
+ 'Calendar' => [
+ 'metadata' => [
+ '/private/vendor/kolab/folder-type' => 'event.default',
+ '/private/vendor/kolab/activesync' => "{\"FOLDER\":{\"{$deviceId}\":{\"S\":1}}}"
+ ],
+ ],
+ 'Contacts' => [
+ 'metadata' => [
+ '/private/vendor/kolab/folder-type' => 'contact.default',
+ '/private/vendor/kolab/activesync' => "{\"FOLDER\":{\"{$deviceId}\":{\"S\":1}}}"
+ ],
+ ],
+ ]]);
+
+ if (!self::$user) {
+ self::$user = $this->getTestUser('activesynctest@kolab.org', ['password' => 'simple123'], true);
+ }
if (!self::$client) {
self::$client = new \GuzzleHttp\Client([
'http_errors' => false, // No exceptions
@@ -103,12 +126,9 @@
// The hash is based on the name, so it's always the same
$inboxId = '38b950ebd62cd9a66929c89615d0fc04';
$this->assertStringContainsString($inboxId, $xml);
- //TODO for this to work we need to create the default folders in IMAP::createUser
- // $this->assertStringContainsString('Drafts', $result);
- // $this->assertStringContainsString('Sent', $result);
- // $this->assertStringContainsString('Trash', $result);
- // $this->assertStringContainsString('Calendar', $result);
- // $this->assertStringContainsString('Contacts', $result);
+ $this->assertStringContainsString('Drafts', $xml);
+ $this->assertStringContainsString('Calendar', $xml);
+ $this->assertStringContainsString('Contacts', $xml);
// Find the inbox for the next step
// $collectionIds = $dom->getElementsByTagName('ServerId');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 3:32 AM (22 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18757173
Default Alt Text
D4045.1775187172.diff (2 KB)
Attached To
Mode
D4045: Use the default folders code in the ActivesyncTest
Attached
Detach File
Event Timeline