I have added "setUid" and "getUid" methods in my "myUser.class.php"
but when I'm running my functional tests I'm not able to use these
methods. I get:

  sfException: Call to undefined method myUser::setUid.

My "myUser.php.class" looks like this:

<?php

class myUser extends sfBasicSecurityUser {

        public function getUid() {
                return $this->getAttribute('username');
        }

        public function setUid($uid) {
                $this->setAttribute('username', $uid);
                $this->setAuthenticated(!empty($uid));
        }
}

My test class (which fails) looks like:

<?php

include(dirname(__FILE__).'/../../bootstrap/functional.php');

$browser = new sfTestFunctional(new sfBrowser());
$browser->
        get('/handins')->
        setField('sessions[username]', 'john.doe')->
        setField('sessions[password]', '123456')->
        click('Connect')->
        isRedirected()->

It fails in the controller where I call:

  $this->getUser()->setUid($form['username']->getValue());


I would like to use my "myUser" in my test environment as well but it
seems like it's using "sfTesterUser" which doesn't have these
methods.

How would I solve this properly?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=.


Reply via email to