First of all, sorry for my english!
I'm writing functional tests with codeception, i'm using the ZF2 module and so far all the stuff have worked great. The problem comes when i try to submit forms, the test seems to send parameters correctly, but the $_POST is always empty.
My ExempleCept.php
$I = new TestGuy($scenario);
$I->wantTo('perform actions and see result');
$I->amOnPage('/user/login');
$I->submitForm('#login', ['email' => 'teste123@teste.com.br', 'password' => '789456']);
$I->seeCurrentUrlEquals('/user/login');
vendor/bin/codeception run --debug
output
* I submit form "#login",{"email":"teste123@teste.com.br","password":"789456"}
array(0) {
}
=> [Response] 200
=> [Page] http://localhost/user/login
* I see current url equals "/user/login"
=> [Uri] /user/login
=> [Method] post
=> [Parameters] {"email":"teste123@teste.com.br","password":"789456"}
=> [Response] 200
=> [Page] http://localhost/user/login
UserController::loginAction()
public function loginAction() {
$form = new LoginForm ( 'login' );
$request = $this->getRequest ();
if ($request->isPost ()) {
var_dump($_POST);
...
Note that the var_dump line on my action, is called right after " * I submit form", so the POST is coming!
So, who can help me? Thanks!
Edited
I've tried the same test with WebGuy API (acceptance), and it worked. But, the tests must be executed by Jenkins, and WebGuy needs an http server to run, then i realy need the TestGuy tests working