control of backwards/forwards compat regression test

This commit is contained in:
tom--
2015-02-11 11:15:02 -05:00
parent e049e9b117
commit 10be9116a4

View File

@@ -14,6 +14,8 @@ use yiiunit\TestCase;
*/ */
class SecurityTest extends TestCase class SecurityTest extends TestCase
{ {
const CRYPT_VECTORS = 'old';
/** /**
* @var ExposedSecurity * @var ExposedSecurity
*/ */
@@ -122,7 +124,7 @@ class SecurityTest extends TestCase
* The output can then be used for testing compatibility of data encrypted in one * The output can then be used for testing compatibility of data encrypted in one
* version of Yii and decrypted in another * version of Yii and decrypted in another
*/ */
public function testGenerateVectors() public function notestGenerateVectors()
{ {
$bin1024 = $bin1024 =
'badec0c7d9ca734e161a1df6ca4daa8cdbf6b3bbb60ec404b47a23226ec266b1 'badec0c7d9ca734e161a1df6ca4daa8cdbf6b3bbb60ec404b47a23226ec266b1
@@ -495,7 +497,7 @@ TEXT;
], ],
]; ];
return $openssl; return static::CRYPT_VECTORS === 'new' ? $openssl : $mcrypt;
} }
/** /**
@@ -806,7 +808,7 @@ TEXT;
], ],
]; ];
return $openssl; return static::CRYPT_VECTORS === 'new' ? $openssl : $mcrypt;
} }
/** /**