Fix implementation of allowEmptyItems in QuietFactory #232
Conversation
Tests fail because of a bug in Symfony: symfony/symfony#15619 |
$this->innerFactory->createItem('Home', array('route' => 'not_existent')) | ||
->willThrow('Symfony\Component\Routing\Exception\RouteNotFoundException'); | ||
|
||
$this->innerFactory->createItem('Home', array())->shouldBeCalled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a willReturn and asserting the return value of $factory->createItem
would be better than a shouldBeCalled
assertion: the important part is not that the inner factory is called, but that the item is returned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, it may make sense to add another test for allowEmptyItems
being false
👍 |
it should be fixed now |
@wouterj now the twig deprecations hit us here as well. do you want to add the deprecation env variable to 2.3 and 2.6 as well? and i guess for the next version after this one, we should drop 2.3 support and actually fix all those deprecations. also requires the sonata upgrade. |
Updated the PR.
Yes, that's what we decided to do when Symfony 3.0 is released. |
needs a rebase |
Rebased |
Fix implementation of allowEmptyItems in QuietFactory
Fixes #230
While fixing that bug, I also discovered some flaws with the logging, which I also fix in this PR.