Use MediaWikiCoversValidator for tests that don't use MediaWikiTestCase
[lhc/web/wiklou.git] / tests / phpunit / includes / utils / MWCryptHashTest.php
index ad54e2f..13151ab 100644 (file)
@@ -4,7 +4,9 @@
  * @group Hash
  */
 
-class MWCryptHashTest extends MediaWikiTestCase {
+class MWCryptHashTest extends PHPUnit_Framework_TestCase {
+
+       use MediaWikiCoversValidator;
 
        public function testHashLength() {
                if ( MWCryptHash::hashAlgo() !== 'whirlpool' ) {
@@ -26,7 +28,7 @@ class MWCryptHashTest extends MediaWikiTestCase {
                // @codingStandardsIgnoreEnd
 
                $this->assertEquals(
-                       pack( 'H*', $hash ),
+                       hex2bin( $hash ),
                        MWCryptHash::hash( $data ),
                        'Raw hash'
                );
@@ -49,7 +51,7 @@ class MWCryptHashTest extends MediaWikiTestCase {
                // @codingStandardsIgnoreEnd
 
                $this->assertEquals(
-                       pack( 'H*', $hash ),
+                       hex2bin( $hash ),
                        MWCryptHash::hmac( $data, $key ),
                        'Raw hmac'
                );