Skip to content

Commit

Permalink
CI: Configure PHPUnit whitelist based on directories
Browse files Browse the repository at this point in the history
  • Loading branch information
pprkut committed May 22, 2024
1 parent 64a7616 commit 4f0f63e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
9 changes: 8 additions & 1 deletion ApnsPHP/Tests/PushConnectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

use ApnsPHP\Exception;
use stdClass;
use Throwable;

/**
* This class contains tests for the connect function
Expand Down Expand Up @@ -90,6 +91,12 @@ public function testConnectThrowsExceptionOnHttpInitFail(): void
$this->expectException('ApnsPHP\Exception');
$this->expectExceptionMessage('Unable to initialize HTTP/2 backend.');

$this->class->connect();
try {
$this->class->connect();
} catch (Throwable $e) {
$this->unmock_function('curl_setopt_array');

throw $e;
}
}
}
25 changes: 2 additions & 23 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,10 @@

<testsuites>
<testsuite name="Base">
<file>ApnsPHP/Tests/MessageSetTest.php</file>
<file>ApnsPHP/Tests/MessageGetTest.php</file>
<file>ApnsPHP/Tests/MessageAddRecipientTest.php</file>
<file>ApnsPHP/Tests/MessageSelfForRecipientTest.php</file>
<file>ApnsPHP/Tests/MessageGetPayloadDictionaryTest.php</file>
<file>ApnsPHP/Tests/MessageGetPayloadTest.php</file>
<file>ApnsPHP/Tests/PushGetTest.php</file>
<file>ApnsPHP/Tests/PushSetTest.php</file>
<file>ApnsPHP/Tests/PushDisconnectTest.php</file>
<file>ApnsPHP/Tests/PushHttpInitTest.php</file>
<file>ApnsPHP/Tests/PushConnectTest.php</file>
<file>ApnsPHP/Tests/PushAddTest.php</file>
<file>ApnsPHP/Tests/PushSendTest.php</file>
<file>ApnsPHP/Tests/PushHttpSendTest.php</file>
<file>ApnsPHP/Tests/PushUpdateQueueTest.php</file>
<file>ApnsPHP/Tests/PushRemoveMessageFromQueueTest.php</file>
<file>ApnsPHP/Tests/PushInvalidTest.php</file>
<directory>ApnsPHP/Tests/</directory>
</testsuite>
<testsuite name="Message">
<file>ApnsPHP/Message/Tests/CustomMessageTest.php</file>
<file>ApnsPHP/Message/Tests/CustomMessageGetTest.php</file>
<file>ApnsPHP/Message/Tests/CustomMessageGetPayloadDictionaryTest.php</file>
<file>ApnsPHP/Message/Tests/SafariMessageTest.php</file>
<file>ApnsPHP/Message/Tests/SafariMessageGetTest.php</file>
<file>ApnsPHP/Message/Tests/SafariMessageGetPayloadDictionaryTest.php</file>
<directory>ApnsPHP/Message/Tests/</directory>
</testsuite>
</testsuites>

Expand Down

0 comments on commit 4f0f63e

Please sign in to comment.