Postfach: Posteingang wird unter jedem Namen gefunden; kein doppeltes „SSL“
- MailboxReader::folder(): „Posteingang“, „Inbox“ oder leer → INBOX (so heißt der Posteingang auf dem IMAP-Server); andere Namen ohne Beachtung der Groß-/Kleinschreibung; unbekannter Ordner → Meldung mit den vorhandenen Ordnern statt „Call to a member function query() on null“. Gilt für Portal-Abruf, vollständigen Abruf und „Postfach prüfen“. - Verschlüsselung: Platzhalter „Standard (SSL)“ statt eines zweiten „SSL“; Hinweis am Ordnerfeld. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a039e5c50
commit
154b8a434c
3 files changed
+54
-5
No files matched your search
@@ -35,6 +35,9 @@
|
||||
use Livewire\Livewire;
|
||||
use Mockery;
|
||||
use Tests\TestCase;
|
||||
use Webklex\PHPIMAP\Client;
|
||||
use Webklex\PHPIMAP\Folder;
|
||||
use Webklex\PHPIMAP\Support\FolderCollection;
|
||||
|
||||
/**
|
||||
* v0.11 package U5: the inbox of the guest communication mailbox – stored once, portal notifications through the
|
||||
@@ -200,6 +203,27 @@ public function test_the_mailbox_can_be_checked_and_incoming_mails_show_on_the_c
|
||||
->assertSee('Frage zu '.$booking->reference);
|
||||
}
|
||||
|
||||
public function test_the_inbox_is_found_under_its_web_mail_name_and_an_unknown_folder_is_explained(): void
|
||||
{
|
||||
$folder = function (string $path): Folder {
|
||||
$folder = Mockery::mock(Folder::class);
|
||||
$folder->path = $path;
|
||||
$folder->name = $path;
|
||||
|
||||
return $folder;
|
||||
};
|
||||
$client = Mockery::mock(Client::class);
|
||||
$client->shouldReceive('getFolders')->andReturn(FolderCollection::make([$folder('Trash'), $folder('Sent Items'), $folder('INBOX')]));
|
||||
|
||||
foreach (['Posteingang', '', 'inbox', 'INBOX'] as $name) {
|
||||
$this->assertSame('INBOX', MailboxReader::folder($client, $name)->path);
|
||||
}
|
||||
$this->assertSame('Sent Items', MailboxReader::folder($client, 'sent items')->path);
|
||||
|
||||
$this->expectExceptionMessage('Vorhanden: Trash, Sent Items, INBOX');
|
||||
MailboxReader::folder($client, 'Archiv');
|
||||
}
|
||||
|
||||
private function request(string $arrival = '2026-11-07', string $departure = '2026-11-10'): Booking
|
||||
{
|
||||
return app(CreateReservation::class)->handle($this->property->fresh(), new StayRequest(CarbonImmutable::parse($arrival), CarbonImmutable::parse($departure), 2), ['first_name' => 'Gesa', 'last_name' => 'Gast', 'email' => 'gesa@example.org'])->fresh();
|
||||
|
||||
Reference in new issue
Block a user