AutomaticControllerInjectionsTest.php 685B

123456789101112131415161718192021222324
  1. <?php
  2. namespace JMS\DiExtraBundle\Tests\Functional;
  3. class AutomaticControllerInjectionsTest extends BaseTestCase
  4. {
  5. /**
  6. * @runInSeparateProcess
  7. */
  8. public function testInjections()
  9. {
  10. $client = $this->createClient(array('config' => 'automatic_controller_injections.yml'));
  11. $client->request('GET', '/automatic-controller-injection-test');
  12. $expected = '';
  13. $expected .= "\$context injection: OK\n";
  14. $expected .= "\$templating injection: OK\n";
  15. $expected .= "\$router injection: OK\n";
  16. $expected .= "\$foo injection: OK\n";
  17. $this->assertEquals($expected, $client->getResponse()->getContent());
  18. }
  19. }