mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
chore: clean up types and PHP 8-ify the code
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace Ramsey\Uuid\Test\Generator;
|
||||
|
||||
use Mockery;
|
||||
use Mockery\MockInterface;
|
||||
use Ramsey\Uuid\Generator\RandomLibAdapter;
|
||||
use Ramsey\Uuid\Test\TestCase;
|
||||
use RandomLib\Factory as RandomLibFactory;
|
||||
@@ -34,8 +35,11 @@ class RandomLibAdapterTest extends TestCase
|
||||
*/
|
||||
public function testAdapterWithoutGeneratorGreatesGenerator(): void
|
||||
{
|
||||
$generator = Mockery::mock(Generator::class);
|
||||
|
||||
/** @var RandomLibFactory&MockInterface $factory */
|
||||
$factory = Mockery::mock('overload:' . RandomLibFactory::class);
|
||||
$factory->shouldReceive('getHighStrengthGenerator')->once();
|
||||
$factory->expects()->getHighStrengthGenerator()->andReturns($generator);
|
||||
|
||||
$this->assertInstanceOf(RandomLibAdapter::class, new RandomLibAdapter());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user