From e092733808873a214a9d028ec2343e6f4410c67a Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 9 Sep 2014 00:34:41 -0500 Subject: [PATCH] RSA: make unit tests perform string comparisons sans white space chars --- tests/Unit/Crypt/RSA/LoadKeyTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Crypt/RSA/LoadKeyTest.php b/tests/Unit/Crypt/RSA/LoadKeyTest.php index b1b078ad..cbbfaff8 100644 --- a/tests/Unit/Crypt/RSA/LoadKeyTest.php +++ b/tests/Unit/Crypt/RSA/LoadKeyTest.php @@ -278,7 +278,7 @@ Ao8eayMp6FcvNucIpUndo1X8dKMv3Y26ZQIDAQAB $rsa->setPublicKey(); $newkey = $rsa->getPublicKey(CRYPT_RSA_PUBLIC_FORMAT_XML); - $this->assertSame($key, $newkey); + $this->assertSame(preg_replace('#\s\', '', $key), preg_replace('#\s\', '', $newkey)); } /** @@ -299,6 +299,6 @@ JWrQdxx/WNN+ABG426rgYYbeGcIlWLZCw6Bx/1HtN5ef6nVEoiGNChYKIRB4QFOi $rsa->setPublicKey(); $newkey = $rsa->getPublicKey(); - $this->assertSame($key, $newkey); + $this->assertSame(preg_replace('#\s\', '', $key), preg_replace('#\s\', '', $newkey)); } }