[Seaside] I can't access the WASession in a SeasideTesting session.

Seb sra at e8dev.com
Fri Dec 1 15:56:22 UTC 2006


It works: I was calling 'self component session'.

Very useful tool, thanks!
Seb.

David Shaffer a écrit :
> Seb,
> 
> How are you accessing the session?  In your test case you should be able 
> to send "self session" to get it.  If you are trying to use the dynamic 
> variable WACurrentSession or sending #session to your component then it 
> won't work b/c the dynamic binding is not on the call stack for the test 
> case.  So, for example,
> 
> testNothing
>    self newApplicationWithRootClass: MyComponent.
>    self establishSession.
>    self assert: self session notNil
> 
> should pass but:
> 
> testNothing
>    self newApplicationWithRootClass: MyComponent.
>    self establishSession.
>    self assert: self component session notNil
> 
> will not.
> 
> Hope that helps.
> 
> David
> 
> 



More information about the Seaside mailing list