fix twig extension and fix test factory#36
fix twig extension and fix test factory#36flack merged 1 commit intoopenpsa:masterfrom dbu:fix-twig-extension
Conversation
|
I'm merging now since this fixes the immediate problem, but I have to say I still don't really understand why or how that code works in the first place. For example, the typehint in CreatephpExtension's constructor wants Midgard\CreatePHP\Metadata\RdfTypeFactory, but in the unittest, it seems to also accept Test\Midgard\CreatePHP\Extension\Twig\RdfTypeFactory (which almost looks like a bug in php). Also, the problem is fixed, but if rdftypefactory ever changes again, the same sort of problem might reappear, since the unittest has its own private implementation of the class, so it will never run under "real-life" conditions. At some point, we should probably create an interface for rdftypefactory and convert the rdftypefactory test class to a mock object, so that this kind of problem can be detected more easily |
fix twig extension and fix test factory
|
the test factory is just extending the normal factory. having a mock and interface would not have prevented the problem. but we should probably use the arrayloader and the normal factory in the test. |
|
Am 13.11.2012 10:28, schrieb David Buchmann:
Ah, ok, so that was the piece of the puzzle I was missing. Suddenly, it
Yes, that sounds like a good plan. I'll make a ticket for that, and then |
this fixes #35