chore: clean up types and PHP 8-ify the code

This commit is contained in:
Ben Ramsey
2022-09-15 22:14:04 -05:00
parent ef842484ba
commit ae247f1dcd
39 changed files with 225 additions and 608 deletions
+5 -1
View File
@@ -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());
}