Skip to content

Commit

Permalink
Fix inspections
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Jan 25, 2018
1 parent 035db8d commit 1823d4a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/unit/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
declare(strict_types=1);

use ParagonIE\Halite\Alerts\CannotPerformOperation;
use ParagonIE\Halite\Alerts\InvalidDigestLength;
use ParagonIE\Halite\Util;
use ParagonIE\Halite\Alerts\InvalidType;
use PHPUnit\Framework\TestCase;
Expand All @@ -19,11 +20,16 @@ final class UtilTest extends TestCase
{
/**
* @expectedException \Error
*
* @throws Error
* @throws InvalidType
*/
public function testConstructorFail()
{
// Please ignore IDE errors here.
/** @noinspection Annotator */
$x = new Util();
$this->assertSame('', $x::xorStrings('', ''));
}

public function testChrToInt()
Expand All @@ -49,6 +55,8 @@ public function testIntArrayToSring()

/**
* BLAKE2b hash
*
* @throws CannotPerformOperation
*/
public function testHash()
{
Expand All @@ -66,6 +74,8 @@ public function testHash()

/**
* BLAKE2b hash
*
* @throws CannotPerformOperation
*/
public function testKeyedHash()
{
Expand All @@ -84,6 +94,10 @@ public function testKeyedHash()

/**
* Test our HKDF-esque construct built atop BLAKE2b
*
* @throws CannotPerformOperation
* @throws TypeError
* @throws InvalidDigestLength
*/
public function testBlake2bKDF()
{
Expand Down Expand Up @@ -122,6 +136,8 @@ public function testBlake2bKDF()

/**
* Verify that safeStrcpy() doesn't fall prey to interned strings.
*
* @throws TypeError
*/
public function testSafeStrcpy()
{
Expand All @@ -134,6 +150,8 @@ public function testSafeStrcpy()

/**
* Verify that xorStrings() produces the expected result.
*
* @throws InvalidType
*/
public function testXorStrings()
{
Expand Down

0 comments on commit 1823d4a

Please sign in to comment.