Skip to content

Commit 1822f15

Browse files
committed
Add test for contentEncoding with new subscription structure
1 parent 913af04 commit 1822f15

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/SubscriptionTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,20 @@ public function testCreatePartialWithNewStructure()
8686
$this->assertEquals("publicKey", $subscription->getPublicKey());
8787
$this->assertEquals("authToken", $subscription->getAuthToken());
8888
}
89+
90+
public function testCreatePartialWithNewStructureAndContentEncoding()
91+
{
92+
$subscription = Subscription::create([
93+
"endpoint" => "http://toto.com",
94+
"contentEncoding" => 'aes128gcm',
95+
"keys" => [
96+
'p256dh' => 'publicKey',
97+
'auth' => 'authToken'
98+
]
99+
]);
100+
$this->assertEquals("http://toto.com", $subscription->getEndpoint());
101+
$this->assertEquals("publicKey", $subscription->getPublicKey());
102+
$this->assertEquals("authToken", $subscription->getAuthToken());
103+
$this->assertEquals("aes128gcm", $subscription->getContentEncoding());
104+
}
89105
}

0 commit comments

Comments
 (0)