SilverStripe\Versioned\Dev\VersionedTestSessionExtension
Decorates TestSession object to update get / post requests with versioned querystring arguments.
Session vars assigned by FunctionalTest::useDraftSite are respected here.
Synopsis
class VersionedTestSessionExtension
extends VersionedStateExtension
{
- // methods
- public void updateLink()
- protected string getReadingmode()
- public void updateGetURL()
- public void updatePostURL()
- // Inherited methods from VersionedStateExtension
- public void updateLink()
- protected bool hasVersionedQuery()
- protected string getReadingmode()
Hierarchy
Methods
protected
- getReadingmode() — Get reading mode set by FunctionalTest::useDraftSite()
public
- updateGetURL() — Decorate link prior to http get request
- updateLink() — Update link
- updatePostURL() — Decorate link prior to http post request
Inherited from SilverStripe\Versioned\VersionedStateExtension
protected
- getReadingmode() — Get reading mode for the record / controller being decorated
- hasVersionedQuery() — Check if link contains versioned queryargs
public
- updateLink() — Auto-append current stage if we're in draft, to avoid relying on session state for this, and the related potential of showing draft content without varying the URL itself.