| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
namespace Tests\issues; |
| 14 |
|
| 15 |
use Tests\live\LiveMailboxTestCase; |
| 16 |
use Webklex\PHPIMAP\Exceptions\AuthFailedException; |
| 17 |
use Webklex\PHPIMAP\Exceptions\ConnectionFailedException; |
| 18 |
use Webklex\PHPIMAP\Exceptions\EventNotFoundException; |
| 19 |
use Webklex\PHPIMAP\Exceptions\FolderFetchingException; |
| 20 |
use Webklex\PHPIMAP\Exceptions\ImapBadRequestException; |
| 21 |
use Webklex\PHPIMAP\Exceptions\ImapServerErrorException; |
| 22 |
use Webklex\PHPIMAP\Exceptions\MaskNotFoundException; |
| 23 |
use Webklex\PHPIMAP\Exceptions\ResponseException; |
| 24 |
use Webklex\PHPIMAP\Exceptions\RuntimeException; |
| 25 |
use Webklex\PHPIMAP\Folder; |
| 26 |
|
| 27 |
class Issue383Test extends LiveMailboxTestCase { |
| 28 |
|
| 29 |
|
| 30 |
e |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
public function testIssue(): void { |
| 43 |
$client = $this->getClient(); |
| 44 |
$client->connect(); |
| 45 |
|
| 46 |
$delimiter = $this->getManager()->getConfig()->get("options.delimiter"); |
| 47 |
$folder_path = implode($delimiter, ['INBOX', 'Entwürfe+']); |
| 48 |
|
| 49 |
$folder = $client->getFolder($folder_path); |
| 50 |
$this->deleteFolder($folder); |
| 51 |
|
| 52 |
$folder = $client->createFolder($folder_path, false); |
| 53 |
self::assertInstanceOf(Folder::class, $folder); |
| 54 |
|
| 55 |
$folder = $this->getFolder($folder_path); |
| 56 |
self::assertInstanceOf(Folder::class, $folder); |
| 57 |
|
| 58 |
$this->assertEquals('Entwürfe+', $folder->name); |
| 59 |
$this->assertEquals($folder_path, $folder->full_name); |
| 60 |
|
| 61 |
$folder_path = implode($delimiter, ['INBOX', 'Entw&APw-rfe+']); |
| 62 |
$this->assertEquals($folder_path, $folder->path); |
| 63 |
|
| 64 |
|
| 65 |
if ($this->deleteFolder($folder) === false) { |
| 66 |
$this->fail("Could not delete folder: " . $folder->path); |
| 67 |
} |
| 68 |
} |
| 69 |
} |