Answer the question
In order to leave comments, you need to log in
Voter and unit test. Mistake?
I have a voter that works great, but the problem is that I still have unit tests (php unittest) and this is where I got the error.
The scheme is as follows: the controller selector checks whether the $user object belongs to the User entity, if yes - the program goes further, if not - false.
if (!$user instanceof User) {
return false;
}
Answer the question
In order to leave comments, you need to log in
Use mocks and stubs for test doubles. Submit the desired object and check the condition.
Make the link block, set the desired size, background, etc.
For an icon in a button, you need to put the i tag in the link, make it block, put the background.
And the text can simply be left as text.
Isn't it easier to install a firebug and stupidly look at how it's done on the site?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question