PhpSpreadsheet/unitTests/Classes/src/Shared/PasswordHasherTest.php

25 lines
653 B
PHP
Raw Normal View History

<?php
2016-03-22 14:35:50 +00:00
namespace PHPExcel\Shared;
require_once 'testDataFileIterator.php';
2016-03-22 14:35:50 +00:00
class PasswordHasherTest extends \PHPUnit_Framework_TestCase
{
/**
* @dataProvider providerHashPassword
*/
2015-05-17 13:00:02 +00:00
public function testHashPassword()
{
$args = func_get_args();
$expectedResult = array_pop($args);
2016-03-22 21:40:11 +00:00
$result = call_user_func_array(array('\PHPExcel\Shared\PasswordHasher','hashPassword'), $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
public function providerHashPassword()
{
2016-05-18 07:02:39 +00:00
return new \PhpSpreadhsheet\unitTests\testDataFileIterator('rawTestData/Shared/PasswordHashes.data');
2015-05-17 13:00:02 +00:00
}
}