Skip to content

Commit

Permalink
Don't run these tests without ext/sodium
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Dec 7, 2020
1 parent 6a7fbd7 commit 1fc4828
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/unit/HaliteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ final class HaliteTest extends TestCase
{
public function testLibsodiumDetection()
{
if (!\extension_loaded('sodium')) {
$this->markTestSkipped('Libsodium not installed');
}
$this->assertTrue(
Halite::isLibsodiumSetupCorrectly()
);
Expand Down
3 changes: 3 additions & 0 deletions test/unit/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ public function testBlake2bKDF()
*/
public function testSafeStrcpy()
{
if (!\extension_loaded('sodium')) {
$this->markTestSkipped('Libsodium not installed');
}
$unique = random_bytes(128);
$clone = Util::safeStrcpy($unique);
$this->assertSame($unique, $clone);
Expand Down

0 comments on commit 1fc4828

Please sign in to comment.