KnpLabs / KnpMenuBundle

Object Oriented menus for your Symfony project.
http://knplabs.com
MIT License
1.4k stars 204 forks source link

Refactor tests to not rely on external mock classes #447

Closed jordisala1991 closed 2 years ago

jordisala1991 commented 2 years ago

The behavior of tests is the same but now we don't mock what we don't own. Also it solves the problem with prophecy and php 8 static return type.

wdyt @stof @garak

stof commented 2 years ago

I'm all for avoiding to mock the Symfony classes. It also has another benefit: if our compiler passes trigger some deprecations when using the DI component, they will now be triggered when running tests, and so be reported. However, the assertions can be improved (see my review comments)

jordisala1991 commented 2 years ago

I'm all for avoiding to mock the Symfony classes. It also has another benefit: if our compiler passes trigger some deprecations when using the DI component, they will now be triggered when running tests, and so be reported. However, the assertions can be improved (see my review comments)

I think they should be better now

jordisala1991 commented 2 years ago

Friendly ping @stof, can you review again?