PhpSpreadsheet/tests/PhpSpreadsheetTests/Shared/PasswordHasherTest.php
Adrien Crivelli e868e58d20
Allow to run an entire folder of tests
We now can do something like:

```sh
./vendor/bin/phpunit tests/PhpSpreadsheetTests/Reader/
```
2020-05-17 18:35:55 +09:00

26 lines
595 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Shared;
use PhpOffice\PhpSpreadsheet\Shared\PasswordHasher;
use PHPUnit\Framework\TestCase;
class PasswordHasherTest extends TestCase
{
/**
* @dataProvider providerHashPassword
*
* @param mixed $expectedResult
*/
public function testHashPassword($expectedResult, ...$args)
{
$result = PasswordHasher::hashPassword(...$args);
self::assertEquals($expectedResult, $result);
}
public function providerHashPassword()
{
return require 'tests/data/Shared/PasswordHashes.php';
}
}