oauth2-server/tests/util/SecureKeyTest.php

20 lines
381 B
PHP
Raw Normal View History

2013-02-05 01:16:29 +05:30
<?php
2014-01-16 22:20:30 +05:30
namespace LeagueTests\Util;
use League\OAuth2\Server\Util\SecureKey;
use \Mockery as M;
class SecureKeyTest extends \PHPUnit_Framework_TestCase
2013-02-05 01:16:29 +05:30
{
2014-01-16 22:20:30 +05:30
function testMake()
2013-02-05 01:16:29 +05:30
{
2014-01-16 22:20:30 +05:30
$v1 = SecureKey::make();
$v2 = SecureKey::make();
$v3 = SecureKey::make(50);
2013-02-05 01:16:29 +05:30
$this->assertEquals(40, strlen($v1));
$this->assertTrue($v1 !== $v2);
$this->assertEquals(50, strlen($v3));
}
}