May 16, 2015
0
Level 21
[CodeCeption] Functional Test Error.
Here is my Complete Functional test:
<?php
$I = new FunctionalTester($scenario);
$I->am('valid CN Admin user');
$I->wantTo('Login at CN Admin login page');
$I->haveAnCNAdminAccount([
'username' => 'sachin',
'email' => 'sachin@example.com',
'password' => 'sachin'
]);
$I->amOnPage('/cn/admin/login');
$I->see('LogIn!');
$I->fillField('Email:', 'sachin@example.com');
$I->fillField('Password:', 'sachin');
$I->seeCheckboxIsChecked('#remember');
$I->click('LogIn');
$I->canSeeCurrentUrlEquals('/cn/admin');
$I->canSee('sachin', 'nav');
And when I run this, I get the following error:
[ErrorException] Codeception\Lib\InnerBrowser::getFormFromCrawler(): ID email already defined
Any Idea what does it mean. I searched Internet for this error. But Dint find proper solution for it.
P.S. Any suggestions on working with codeception and multiple route files? If I place my routes in a new file and require_once it in routes.php file then test fails because the page do not even load.
Please or to participate in this conversation.