alois's avatar
Level 3

Chaining fresh() in Model Methods for Test to Pass

Is it acceptable to chain fresh() in a method of a model so that PHPUnit will return successful? Is there a downside to it?

0 likes
1 reply
tomopongrac's avatar
Level 51

That is ok because sometimes you need to get new model from the database in order to pass the test

Please or to participate in this conversation.