trait RefreshVariablesTrait (View source)

Provides a method to refresh in-memory configuration and state information.

Methods

refreshVariables()

Refreshes in-memory configuration and state information.

Details

protected refreshVariables()

Refreshes in-memory configuration and state information.

Useful after a page request is made that changes configuration or state in a different thread.

In other words calling a settings page with $this->drupalPostForm() with a changed value would update configuration to reflect that change, but in the thread that made the call (thread running the test) the changed values would not be picked up.

This method clears the cache and loads a fresh copy.