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

REST and Symfony2 modules #174

Closed
vadviktor opened this issue Feb 20, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@vadviktor
Copy link

commented Feb 20, 2013

I have created a new Symfony 2.1 project, boostrapped Codeception, configured a TestGuy with these modules: [Db, Symfony2, REST, TestHelper].
Documentation and source code implies that Rest would pick up and modules that are instanceof \Codeception\Util\Framework.
Symfony2 should be picked up by Rest. When I "force" it to be picked up, then Rest::seeResponseCodeIs() function wants to call Symfony\Component\HttpFoundation\Response::getStatus() but that is not he name of the real function Response has (getStatusCode()).
This is as much I could figure out in one blow. Am I doing something really wrong? What other information do you need to help me out? Thank you! :)

@DavertMik

This comment has been minimized.

Copy link
Member

commented Feb 20, 2013

Yes, there was an API change in Symfony for this method.
And seems like Codeception uses the latest API version.
https://github.com/symfony/BrowserKit/blob/master/Response.php#L99

Do you really use 2.1?

As a workaround you can patch Codeception's code to match both api versions.

@vadviktor

This comment has been minimized.

Copy link
Author

commented Feb 21, 2013

I am using 2.1.7. Should REST be able to pick up this version when using the Symfony2 module?

@DavertMik

This comment has been minimized.

Copy link
Member

commented Feb 21, 2013

Looks like we have 2 different methods here:
getStatus in BrowserKit and getStatusCode in HttpFoundation.
Sure we need to support both of them. BrowserKit is used in PhpBrowser tests.

Please make a pull request and I will merge it.
Sorry, right now I don't have time to provide fast fixes.

@vadviktor

This comment has been minimized.

Copy link
Author

commented Feb 22, 2013

I see. I am working hard on a project right now, but I surely will look into this problem further. I myself am busy too so no worries, I try to lend a hand in this matter, soon. I will keep you updated here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.