Use hex2bin() instead of pack()
[lhc/web/wiklou.git] / tests / phpunit / includes / utils / MWCryptHashTest.php
index ad54e2f..4c85c3d 100644 (file)
@@ -26,7 +26,7 @@ class MWCryptHashTest extends MediaWikiTestCase {
                // @codingStandardsIgnoreEnd
 
                $this->assertEquals(
-                       pack( 'H*', $hash ),
+                       hex2bin( $hash ),
                        MWCryptHash::hash( $data ),
                        'Raw hash'
                );
@@ -49,7 +49,7 @@ class MWCryptHashTest extends MediaWikiTestCase {
                // @codingStandardsIgnoreEnd
 
                $this->assertEquals(
-                       pack( 'H*', $hash ),
+                       hex2bin( $hash ),
                        MWCryptHash::hmac( $data, $key ),
                        'Raw hmac'
                );