Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller in sub-sub folder #48

Closed
serazoli opened this issue Aug 31, 2015 · 4 comments
Closed

Controller in sub-sub folder #48

serazoli opened this issue Aug 31, 2015 · 4 comments
Labels

Comments

@serazoli
Copy link

Hi.
I have controller in 2 folder depth from controllers folder (ex. controllers/api/aa/Example.php). I make a request the following form

$this->request('GET', ['Example', 'users_get']);

i will get

 Example_test::test_users_get
Status code is not 200 but 404.
Failed asserting that 404 is identical to 200.

If i move the controller one folder up (ex. controller/api/Example.php) the above form work ok.
OR i make the request in the following form

$this->request('GET', '/api/bb/example/users_get');

work ok.
Sorry my bad English.

@kenjis
Copy link
Owner

kenjis commented Aug 31, 2015

Please use $this->request('GET', '/api/bb/example/users'); at the moment.

This is because controller autoload of ci-phpunit-test only seeks in sub folder.

@kenjis kenjis added the bug label Aug 31, 2015
@serazoli
Copy link
Author

Ok.
Thanks.

@kenjis
Copy link
Owner

kenjis commented Sep 1, 2015

I've fixed autoloader: 2ebac53

@serazoli
Copy link
Author

serazoli commented Sep 1, 2015

Thanks. I made a quick test and is look like OK

@serazoli serazoli closed this as completed Sep 2, 2015
@kenjis kenjis changed the title Controller in folder Controller in sub-sub folder Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants