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

8.x - Fix afterDelete expecting an UploadedFileInterface object. #603

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

ndm2
Copy link
Collaborator

@ndm2 ndm2 commented Oct 22, 2023

Reverts some of #593. The entity read from the DB will not hold uploaded file instances.

ps. I don't have time for it right now, but seeing how this slipped in, the tests are IMHO in dire need of de-mocking. There's so much mocking going on that could possibly hide all sorts of problems, it's wild.

Previously there was for example $this->entity->field being set and passed to expectations, but it was always null, because it's all mocked, still the tests passed because there were no type hints on the arguments where the value would flow through.

@codecov
Copy link

codecov bot commented Oct 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (44cdcc1) 95.86% compared to head (b61880a) 95.84%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #603      +/-   ##
============================================
- Coverage     95.86%   95.84%   -0.02%     
  Complexity      109      109              
============================================
  Files            11       11              
  Lines           290      289       -1     
============================================
- Hits            278      277       -1     
  Misses           12       12              
Files Coverage Δ
src/Model/Behavior/UploadBehavior.php 95.00% <100.00%> (-0.05%) ⬇️

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

@ADmad ADmad merged commit 324dc73 into FriendsOfCake:master Oct 22, 2023
8 checks passed
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