mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
[issue/39] Abstract test case for Crypt_AES.
This commit is contained in:
parent
29c69808ae
commit
318ac0bd86
27
tests/Crypt/AES/TestCase.php
Normal file
27
tests/Crypt/AES/TestCase.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* @author Andreas Fischer <bantu@phpbb.com>
|
||||
* @copyright MMXIII Andreas Fischer
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
abstract class Crypt_AES_TestCase extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
static public function setUpBeforeClass()
|
||||
{
|
||||
require_once('Crypt/AES.php');
|
||||
|
||||
if (!defined('CRYPT_AES_MODE'))
|
||||
{
|
||||
define('CRYPT_AES_MODE', CRYPT_AES_MODE_INTERNAL);
|
||||
}
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
if (defined('CRYPT_AES_MODE') && CRYPT_AES_MODE !== CRYPT_AES_MODE_INTERNAL)
|
||||
{
|
||||
$this->markTestSkipped('Skipping test because CRYPT_AES_MODE is not defined as CRYPT_AES_MODE_INTERNAL.');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user