Skip to content

Conversation

jorisvaesen
Copy link
Collaborator

When nameCallback is used there is an inconsistence between the filename in the database and the actual file since the calculated filename only is assigned to the entity, never to the file itself.

@josegonzalez
Copy link
Member

Can you add a test for this?

@jorisvaesen
Copy link
Collaborator Author

I would, but I have to little knowledge on how I can test beforeSave on this.

@josegonzalez
Copy link
Member

@jorisvaesen
Copy link
Collaborator Author

I've seen them but didn't get to an actual working test.

@josegonzalez
Copy link
Member

What hold up are you having with writing tests? I'm headed into a meeting in a little, but am available as savant on the irc.freenode.net/#cakephp channel.

@jorisvaesen
Copy link
Collaborator Author

This gist can explain the issue:
https://gist.github.com/jorisvaesen/f5635e406ddaf9bd65c9

josegonzalez added a commit that referenced this pull request Feb 17, 2016
fix filename when renaming through nameCallback
@josegonzalez josegonzalez merged commit d3fed95 into FriendsOfCake:master Feb 17, 2016
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