Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Feb 2, 2014
1 parent 8aa0f8b commit b092106
Show file tree
Hide file tree
Showing 5 changed files with 526 additions and 526 deletions.
9 changes: 3 additions & 6 deletions php-tests/tests/Phalcon/Crypt/UnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@

namespace Phalcon\Test\Crypt;

/**
* @requires extension mcrypt
*/
class UnitTest extends \Phalcon\Test\UnitTestCase
{
protected function setUp()
{
$this->checkExtension('mcrypt');
parent::setUp();
}

public function testEncryption()
{
$tests = array(
Expand Down
22 changes: 5 additions & 17 deletions php-tests/tests/Phalcon/Security/UnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,18 @@

namespace Phalcon\Test\Security;

use \Phalcon\Test\UnitTestCase as PhTestUnitTestCase;

use \Phalcon\Security as PhSecurity;

class UnitTest extends PhTestUnitTestCase
class UnitTest extends \Phalcon\Test\UnitTestCase
{
/**
* Tests the hash for the security component
*
* @author Nikos Dimopoulos <nikos@phalconphp.com>
* @since 2013-03-02
* @requires extension openssl
*/
public function testHash()
{

if (!extension_loaded('openssl')) {
$this->markTestSkipped('Warning: openssl extension is not loaded');
return;
}

$security = new PhSecurity();
$security = new \Phalcon\Security();

for ($i = 8; $i < 12; $i++) {
$hash = $security->hash('a', $i);
Expand All @@ -60,14 +51,11 @@ public function testHash()
*
* @author Vladimir Kolesnikov <vladimir@extrememember.com>
* @since 2013-10-08
* @requires function hash_hmac
*/
public function testComputeHMAC()
{
if (!function_exists('hash_hmac')) {
$this->markTestSkipped('hash extension is required');
}

$s = new \Phalcon\Security;
$s = new \Phalcon\Security();
$k = md5('test', true);
$keys = array(
substr($k, 0, strlen($k)/2),
Expand Down
Loading

0 comments on commit b092106

Please sign in to comment.