Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter type for constructor of GreaterThan and LessThan constraints does not match parameter type for Assert::greaterThan() and Assert::lessThan() #5169

Closed
drexlma opened this issue Feb 5, 2023 · 0 comments
Assignees
Labels
feature/assertion Issues related to assertions and expectations type/bug Something is broken version/10 Something affects PHPUnit 10

Comments

@drexlma
Copy link

drexlma commented Feb 5, 2023

TypeError: PHPUnit\Framework\Constraint\GreaterThan::__construct(): Argument #1 ($value) must be of type int|float, string given, called in phar:///usr/local/bin/phpunit/phpunit/Framework/Assert.php on line 1620

PHPUnit 10.0.3 by Sebastian Bergmann and contributors.
Runtime: PHP 8.2.2

$this->assertGreaterThanOrEqual('1',(int) count($body['kategorien']));

@drexlma drexlma added the type/bug Something is broken label Feb 5, 2023
drexlma added a commit to drexlma/phpunit that referenced this issue Feb 5, 2023
@sebastianbergmann sebastianbergmann added feature/assertion Issues related to assertions and expectations version/10 Something affects PHPUnit 10 labels Feb 5, 2023
@sebastianbergmann sebastianbergmann changed the title GreaterThan: must be of type int|float, string given Parameter type for constructor of GreaterThan and LessThan constraints does not match parameter type for Assert::greaterThan() and Assert::lessThan() Feb 5, 2023
@sebastianbergmann sebastianbergmann self-assigned this Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/assertion Issues related to assertions and expectations type/bug Something is broken version/10 Something affects PHPUnit 10
Projects
None yet
Development

No branches or pull requests

2 participants