Clean-up tests and use PHPStan max level for tests

This commit is contained in:
Ben Ramsey
2019-12-15 00:44:18 -06:00
parent 650cb9f545
commit 81f0f9a9b4
32 changed files with 487 additions and 591 deletions
@@ -1,23 +1,22 @@
<?php
namespace Ramsey\Uuid\Test\Generator;
use Ramsey\Uuid\Generator\PeclUuidRandomGenerator;
use AspectMock\Test as AspectMock;
use Ramsey\Uuid\Generator\PeclUuidRandomGenerator;
/**
* Class PeclUuidRandomGeneratorTest
* @package Ramsey\Uuid\Test\Generator
* @covers Ramsey\Uuid\Generator\PeclUuidRandomGenerator
*/
class PeclUuidRandomGeneratorTest extends PeclUuidTestCase
{
/**
* @var int
*/
private $length = 10;
/**
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function testGenerateCreatesUuidUsingPeclUuidMethods()
public function testGenerateCreatesUuidUsingPeclUuidMethods(): void
{
$create = AspectMock::func('Ramsey\Uuid\Generator', 'uuid_create', $this->uuidString);
$parse = AspectMock::func('Ramsey\Uuid\Generator', 'uuid_parse', $this->uuidBinary);
@@ -34,7 +33,7 @@ class PeclUuidRandomGeneratorTest extends PeclUuidTestCase
* This test is for the return type of the generate method
* It ensures that the generate method returns whatever value uuid_parse returns.
*/
public function testGenerateReturnsUuidString()
public function testGenerateReturnsUuidString(): void
{
$create = AspectMock::func('Ramsey\Uuid\Generator', 'uuid_create', $this->uuidString);
$parse = AspectMock::func('Ramsey\Uuid\Generator', 'uuid_parse', $this->uuidBinary);