OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
back_aws-ses
/
vendor
/
wildbit
/
postmark-php
/
tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:22 AM
rwxr-xr-x
📄
PostmarkAdminClientDataRemovalTest.php
1.22 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkAdminClientDomainTest.php
3.9 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkAdminClientSenderSignatureTest.php
4.12 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkAdminClientServersTest.php
2.88 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClickClientStatisticsTest.php
1.52 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientBaseTest.php
597 bytes
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientBounceTest.php
4.03 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientEmailTest.php
8.78 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientInboundMessageTest.php
1.07 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientMessageStreamsTest.php
6.73 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientOutboundMessageTest.php
1.52 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientRuleTriggerTest.php
1.07 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientServerTest.php
1.02 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientStatisticsTest.php
4.54 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientSuppressionsTest.php
5.37 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientTemplatesTest.php
11.22 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
PostmarkClientWebhooksTest.php
9.72 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
TestingKeys.php
2.32 KB
05/19/2025 10:07:22 AM
rw-r--r--
📄
postmark-logo.png
4.18 KB
01/04/2025 01:09:28 PM
rw-r--r--
Editing: PostmarkClientBounceTest.php
Close
<?php namespace Postmark\Tests; require_once __DIR__ . '/PostmarkClientBaseTest.php'; use Postmark\Models; use Postmark\PostmarkClient; use Postmark\tests; /** * @internal * * @coversNothing */ class PostmarkClientBounceTest extends PostmarkClientBaseTest { public static function setUpBeforeClass(): void { PostmarkClientSuppressionsTest::tearDownAfterClass(); } public function testClientCanGetDeliveryStatistics() { $tk = parent::$testKeys; $client = new PostmarkClient($tk->READ_SELENIUM_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT); $stats = $client->getDeliveryStatistics(); $this->assertNotEmpty($stats, 'Stats from getDeliveryStatistics() should never be null or empty.'); $this->assertGreaterThan(0, $stats->getInactiveMails(), 'The inactive mail count should be greater than zero.'); } public function testClientCanGetBounces() { $tk = parent::$testKeys; $client = new PostmarkClient($tk->READ_SELENIUM_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT); $bounces = $client->getBounces(10, 0); $this->assertNotEmpty($bounces); } public function testClientCanGetBounce() { $tk = parent::$testKeys; $client = new PostmarkClient($tk->READ_SELENIUM_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT); $bounces = $client->getBounces(10, 0); $id = $bounces->getBounces()[0]->getID(); $bounce = $client->getBounce($id); $this->assertNotEmpty($bounce); $this->assertEquals($id, $bounce->getID()); } public function testClientCanGetBounceDump() { $tk = parent::$testKeys; $client = new PostmarkClient($tk->READ_SELENIUM_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT); $bounces = $client->getBounces(10, 0); $id = $bounces->Bounces[0]->getID(); $dump = $client->getBounceDump($id); $this->assertNotEmpty($dump); $this->assertNotEmpty($dump->getBody()); } public function testClientCanActivateBounce() { $tk = parent::$testKeys; $client = new PostmarkClient($tk->WRITE_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT); // make sure that this email is not suppressed // generate a bounces $fromEmail = $tk->WRITE_TEST_SENDER_EMAIL_ADDRESS; $toEmail = "hardbounce@bounce-testing.postmarkapp.com"; // special email to generate bounce $subject = "Hello from Postmark!"; $htmlBody = "<strong>Hello</strong> dear Postmark user."; $textBody = "Hello dear Postmark user."; $tag = "example-email-tag"; $trackOpens = true; $trackLinks = "None"; $sendResult = $client->sendEmail( $fromEmail, $toEmail, $subject, $htmlBody, $textBody, $tag, $trackOpens, NULL, // Reply To NULL, // CC NULL, // BCC NULL, // Header array NULL, // Attachment array $trackLinks, NULL // Metadata array ); // make sure there is enough time for the bounce to take place. sleep(180); $bounceList = $client->getBounces(20, 0); $id = 0; $sentId = $sendResult->getMessageID(); $bounces = $bounceList->getBounces(); $this->assertNotEmpty($bounces); $this->assertNotEmpty($sentId); foreach ($bounces as $bounce) { $bmid = $bounce->getMessageID(); echo "\n Bounce ID: $bmid Sent id: $sentId"; if ($sentId === $bmid) { $id = $bounce->getID(); echo "Made it!! $id"; break; } } $this->assertGreaterThan(0, $id); $bounceActivation = $client->activateBounce($id); $actBounce = $bounceActivation->getBounce(); $this->assertNotEmpty($actBounce); $this->assertEquals($id, $actBounce->getID()); } }