Skip to content

Commit

Permalink
Rework test to skip it on PHP 7.*
Browse files Browse the repository at this point in the history
  • Loading branch information
aboks committed Mar 20, 2024
1 parent 35061ce commit 97caab1
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions tests/ProxyManagerTest/Generator/MethodGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,32 +136,24 @@ public function scalarTypeHintedMethods(): array
}

/**
* @dataProvider nullDefaultArgumentAlreadyIncludedInTypeMethods
* @requires PHP 8.0
*/
public function testGenerateMethodWithNullDefaultArgumentAlreadyIncludedInType(string $methodName, string $type): void
public function testGenerateMethodWithNullDefaultMixedArgument(): void
{
$method = MethodGenerator::fromReflectionWithoutBodyAndDocBlock(new MethodReflection(
ClassWithNullDefaultMethodArguments::class,
$methodName
'acceptMixed'
));

self::assertSame($methodName, $method->getName());
self::assertSame('acceptMixed', $method->getName());

$parameters = $method->getParameters();

self::assertCount(1, $parameters);

$param = $parameters['param'];

self::assertSame($type, $param->getType());
}

/** @return string[][] */
public function nullDefaultArgumentAlreadyIncludedInTypeMethods(): array
{
return [
['acceptMixed', 'mixed'],
];
self::assertSame('mixed', $param->getType());
}

public function testGenerateMethodWithVoidReturnTypeHinting(): void
Expand Down

0 comments on commit 97caab1

Please sign in to comment.