|
|
@@ -28,6 +28,20 @@ use RuntimeException;
|
|
|
class SecurityTest extends TestCase
|
|
|
{
|
|
|
/**
|
|
|
+ * Test engine
|
|
|
+ */
|
|
|
+ public function testEngineEquivalence(): void
|
|
|
+ {
|
|
|
+ $restore = Security::engine();
|
|
|
+ $newEngine = new OpenSsl();
|
|
|
+
|
|
|
+ Security::engine($newEngine);
|
|
|
+
|
|
|
+ $this->assertSame($newEngine, Security::engine());
|
|
|
+ $this->assertNotSame($restore, Security::engine());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* testHash method
|
|
|
*/
|
|
|
public function testHash(): void
|
|
|
@@ -186,20 +200,6 @@ class SecurityTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Test engine
|
|
|
- */
|
|
|
- public function testEngineEquivalence(): void
|
|
|
- {
|
|
|
- $restore = Security::engine();
|
|
|
- $newEngine = new OpenSsl();
|
|
|
-
|
|
|
- Security::engine($newEngine);
|
|
|
-
|
|
|
- $this->assertSame($newEngine, Security::engine());
|
|
|
- $this->assertNotSame($restore, Security::engine());
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* Tests that the salt can be set and retrieved
|
|
|
*/
|
|
|
public function testSalt(): void
|