View more context

 

Hels

you mean do the thing in the grey box above?

dorsetdigital

The code above is the best approach I think

👍 (1)
manueltomasir

One more thing if i may....

Does the same apply for controllers?

currently all other templates are in app/src

manueltomasir

speaking in terms of the Blog Module question from above

Nick

Just read over the docs and that didn't seem to help very much.

I am setting up a FunctionalTest test. Before I call $this->get('/some url') I am pulling in the session via Injector::inst()->create(Session::class, []); and setting an initial value.

When my test runs my controller doesn't seem to see this session value that was setup. Is there some magic in terms of setting session values in a test?

Nick

I wonder if it's because I am trying to populate something in the session before the first request / seems to seems to want to bind to a request, but that seems odd.

Nick

How to set some session data in a FunctionalTest before calling the url?