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

Upgrade to PHPUnit 10 #393

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Upgrade to PHPUnit 10 #393

merged 1 commit into from
Feb 19, 2024

Conversation

greg0ire
Copy link
Member

No description provided.

@@ -20,7 +20,7 @@
use function next;
use function reset;

abstract class BaseArrayCollectionTest extends TestCase
abstract class BaseArrayCollectionTestCase extends TestCase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
abstract class BaseArrayCollectionTestCase extends TestCase
abstract class ArrayCollectionTestCase extends TestCase

The Base prefix feels redundant now.

Comment on lines 23 to 29
['type' => CompositeExpression::TYPE_NOT, 'expressions' => [$this->createMock(Expression::class), $this->createMock(Expression::class)]],
[
'type' => CompositeExpression::TYPE_NOT,
'expressions' => [
new class () implements Expression {
public function visit(ExpressionVisitor $visitor)
{
}
},
new class () implements Expression {
public function visit(ExpressionVisitor $visitor)
{
}
},
],
],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use self::createStub() to replace $this->createMock() in a static method.

Copy link
Member Author

@greg0ire greg0ire Feb 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL createMock is not statick, but createStub is 💡

@derrabus derrabus merged commit 3439e45 into doctrine:2.1.x Feb 19, 2024
9 checks passed
@greg0ire greg0ire deleted the phpunit-10 branch February 19, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants