Routes to a controller not in controller directory

I like to test a test implementation of my controller which is in Bundle/Controller directory. My test controller which extends this controller is in Bundle/Tests/Resources/Controller.

How can I access this controller on my routing_test.yml file?

I tried like this:

    path: /api/test/{id}
    defaults: { _controller: Bundle:Tests/Resources/Controller/TestController:delete }
    methods: [DELETE]

But symfony does not find the controller. Is there any possbility to link a route to a controller which is not in the default Bundle/Controller directory?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s