# TODO: use more accurate (larger) string length for test confirmation
@ -114,6 +117,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @large
* @return String
*/
function testGenerateIv() {
@ -127,6 +131,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @large
* @depends testGenerateIv
*/
function testConcatIv($iv) {
@ -159,6 +164,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
* @depends testConcatIv
*/
function testSplitIv($testConcatIv) {
@ -175,6 +181,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
* @return string padded
*/
function testAddPadding() {
@ -190,6 +197,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
* @depends testAddPadding
*/
function testRemovePadding($padded) {
@ -200,6 +208,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
*/
function testEncrypt() {
$random = openssl_random_pseudo_bytes(13);
@ -212,6 +223,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
*/
function testDecrypt() {
$random = openssl_random_pseudo_bytes(13);
@ -226,6 +240,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
*/
function testSymmetricEncryptFileContent() {
# TODO: search in keyfile for actual content as IV will ensure this test always passes
@ -241,6 +258,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
*/
function testSymmetricStreamEncryptShortFileContent() {
$filename = 'tmp-' . time() . '.test';
@ -291,6 +311,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
* @brief Test that data that is written by the crypto stream wrapper
* @note Encrypted data is manually prepared and decrypted here to avoid dependency on success of stream_read
* @note If this test fails with truncate content, check that enough array slices are being rejoined to form $e, as the crypt.php file may have gotten longer and broken the manual
@ -377,6 +398,7 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {
}
/**
* @medium
* @brief Test that data that is read by the crypto stream wrapper
*/
function testSymmetricStreamDecryptShortFileContent() {
@ -406,6 +428,9 @@ class Test_Encryption_Crypt extends \PHPUnit_Framework_TestCase {