Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Reader/Xls/Md5Test.php
oleibman 0a531cf1cd Replace 'self' with self::class in 2 Modules (#2773)
PHP 8.2 is supposed to deprecate the use of `['self', 'functionname']` for callables, suggesting the use of `[self::class, 'functionname']` instead. We made this change in a recent PR, and, while I'm thinking about it, I'll fix the remaining 2 modules with this construction. Vlookup is already adequately covered in unit tests. Reader/Xls/MD5 is not; a unit test is added.
2022-04-30 18:36:24 -07:00

18 lines
454 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Reader\Xls;
use PhpOffice\PhpSpreadsheet\Reader\Xls\MD5;
use PHPUnit\Framework\TestCase;
class Md5Test extends TestCase
{
public function testMd5(): void
{
$md5 = new MD5();
$md5->add('123456789a123456789b123456789c123456789d123456789e123456789f1234');
$context = $md5->getContext();
self::assertSame('0761293f016b925b0bca11b34f1ed613', bin2hex($context));
}
}