Hi everybody,
Forbid me again for my cluelessness. I am currently writing a functional
test for one of my controllers and I stumbled upon two problems: I can
work around the first one but I don't know how to navigate around the
second.
1) The sf2 documentation says that you can either run your test suite
from your application directory. Unfortunately, when I do so, the
following exception is thrown:
RuntimeException: Unable to guess the Kernel directory.
My test only contains:
$client = $this->createClient();
On the other hand, when I use phpunit -c app, the test suite runs
perfectly well. This is the workaround I found.
2) Once I manage to run the test suite, the following exception is thrown:
InvalidArgumentException: The service "test.client" does not exist.
/symfony2/src/vendor/symfony/src/Symfony/Component/DependencyInjection/Container.php:197
/symfony2/src/vendor/symfony/src/Symfony/Component/DependencyInjection/Container.php:282
/symfony2/src/vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Test/WebTestCase.php:42
/symfony2/src/Application/MyBundle/Tests/Controller/MyControllerTest.php:16
I gather the service is not, for some reason, registered into the DI
container.
I'd gladly fix these issues myself and submit a patch, however I am only
starting to get acquainted with the architecture so I obviously don't
feel comfortable to do that just yet. Hopefuly a wizard on this list can
fix this more easily than me !
NABN.
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en