mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Fix failing unit test in HHVM
This commit is contained in:
parent
7e2894b7d3
commit
44a34229fb
1 changed files with 2 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ class SecurityTest extends \Codeception\TestCase\Test
|
||||||
public function testEncryption()
|
public function testEncryption()
|
||||||
{
|
{
|
||||||
$plaintext = Rhymix\Framework\Security::getRandom();
|
$plaintext = Rhymix\Framework\Security::getRandom();
|
||||||
|
config('crypto.encryption_key', Rhymix\Framework\Security::getRandom());
|
||||||
|
|
||||||
// Encryption with default key.
|
// Encryption with default key.
|
||||||
$encrypted = Rhymix\Framework\Security::encrypt($plaintext);
|
$encrypted = Rhymix\Framework\Security::encrypt($plaintext);
|
||||||
|
|
@ -58,6 +59,7 @@ class SecurityTest extends \Codeception\TestCase\Test
|
||||||
public function testSignature()
|
public function testSignature()
|
||||||
{
|
{
|
||||||
$plaintext = Rhymix\Framework\Security::getRandom();
|
$plaintext = Rhymix\Framework\Security::getRandom();
|
||||||
|
config('crypto.authentication_key', Rhymix\Framework\Security::getRandom());
|
||||||
|
|
||||||
$signature = Rhymix\Framework\Security::createSignature($plaintext);
|
$signature = Rhymix\Framework\Security::createSignature($plaintext);
|
||||||
$this->assertRegexp('/^[a-zA-Z0-9-_]{40}$/', $signature);
|
$this->assertRegexp('/^[a-zA-Z0-9-_]{40}$/', $signature);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue