I am using the unit test rig from develop to run against TWiki 4.1.2. (maybe this problem does not exist in the newer TWiki).
Anyway: Apparently, the test rig does not initialize the users field in the session object, so none of the functions that map user names etc. succeed. For example:
DB<5> p TWiki::Func::userToWikiName('guest')
Can't call method "findUser" on an undefined value at /usr/local/TWiki-4.1.2/lib/TWiki/Func.pm line 610.
As a matter of fact, the
$SESSION
object does not seem to be initialized either. I am taking this to be
$this->{twiki}
, but really
$SESSION
should exist also?
--
ThomasWeigert - 26 Nov 2007
$SESSION
should be initialized by TWikFniTestCase; but both the testcase code and the core user-handling code changed extensively in 4.2.0, so I'm dubious about the value of chasing this. i would advise you to expicitly set $SESSION in your set_up.
CC