Skip to content

Commit 88f8dbf

Browse files
committed
remove useless test of encrypt
1 parent 4537e1d commit 88f8dbf

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

tests/WebPushTest.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,4 @@ public function testSendGCMNotificationWithWrongGCMApiKey()
129129

130130
$this->assertArrayHasKey('headers', $res);
131131
}
132-
133-
public function testEncrypt()
134-
{
135-
// encrypt is a private method
136-
$class = new ReflectionClass(get_class($this->webPush));
137-
$encrypt = $class->getMethod('encrypt');
138-
$encrypt->setAccessible(true);
139-
140-
$res = $encrypt->invokeArgs($this->webPush, array($this->keys['standard'], 'test'));
141-
142-
// I can't really test encryption since I don't have the user private key.
143-
// I can only test if the function executes.
144-
$this->assertArrayHasKey('cipherText', $res);
145-
$this->assertArrayHasKey('salt', $res);
146-
$this->assertArrayHasKey('localPublicKey', $res);
147-
$this->assertEquals(16, strlen(base64_decode($res['salt']))); // should be 16 bytes
148-
}
149132
}

0 commit comments

Comments
 (0)