unknown method error in test but works in action

Discussion relating to version 1.2.x stable

unknown method error in test but works in action

Postby smugford » Mon Mar 21, 2011 7:38 pm

In the action class I have this ...
{
$this->id = $this->getUser()->getProfile()->getId();
echo $this->id;
}

it echo's out the expected result

I have written a very basic lime test and i get this....

not ok 2 - last request threw an uncaught exception Doctrine_Record_Exception: Unknown method sfGuardUser::getProfile
# Failed test (/usr/local/php/symfony-1.2.12/lib/test/sfTestFunctionalBase.class.php at line 526)

I have no idea why the code would work in the action and then fail in the test?

Does anyone have any idea how to even start troubleshooting this?

Thanks.
Scott
User avatar
smugford
Faithful Member
 
Posts: 205
Joined: Sun Nov 29, 2009 8:32 pm

Return to symfony 1.2

Who is online

Users browsing this forum: No registered users and 1 guest