<?php
+
/**
- *
* @group Hash
+ *
+ * @covers MWCryptHash
*/
-
-class MWCryptHashTest extends MediaWikiTestCase {
+class MWCryptHashTest extends PHPUnit_Framework_TestCase {
public function testHashLength() {
if ( MWCryptHash::hashAlgo() !== 'whirlpool' ) {
// @codingStandardsIgnoreEnd
$this->assertEquals(
- pack( 'H*', $hash ),
+ hex2bin( $hash ),
MWCryptHash::hash( $data ),
'Raw hash'
);
// @codingStandardsIgnoreEnd
$this->assertEquals(
- pack( 'H*', $hash ),
+ hex2bin( $hash ),
MWCryptHash::hmac( $data, $key ),
'Raw hmac'
);