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

Use real event for test #2718

Merged
merged 1 commit into from
Nov 5, 2023
Merged

Conversation

franmomu
Copy link
Collaborator

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (058e95a) 79.36% compared to head (cc25f39) 79.39%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2718      +/-   ##
==========================================
+ Coverage   79.36%   79.39%   +0.02%     
==========================================
  Files         162      162              
  Lines        8457     8454       -3     
==========================================
  Hits         6712     6712              
+ Misses       1745     1742       -3     

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines -64 to +55
$eventAdapter->getObjectManager();
$eventAdapter->getObject();
$eventAdapter->setEventArgs($args);
static::assertSame($eventAdapter->getObjectManager(), $emMock);
static::assertInstanceOf(\stdClass::class, $eventAdapter->getObject());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since we are testing behavior, instead of expecting that the EventArgs::getObjectManager() and EventArgs::getObject() are called, we can check with the result of these calls.

@franmomu franmomu requested a review from phansys October 30, 2023 22:32
Copy link
Collaborator

@phansys phansys left a comment

Choose a reason for hiding this comment

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

Thank you @franmomu!

@phansys phansys merged commit 1d367c1 into doctrine-extensions:main Nov 5, 2023
19 checks passed
@franmomu franmomu deleted the change_event branch November 5, 2023 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants