PHP Class Elgg\Forms\StickyFormsTest

Inheritance: extends Elgg\TestCase
Datei anzeigen Open project: elgg/elgg

Public Methods

Method Description
testIsStickyReturnsFalseForClearedStickyForms ( )
testIsStickyReturnsTrueForFormsMarkedAsSticky ( )
testMakeStickyFormStoresInputsInTheSession ( ) It's important to test that this information is actually stored in the session because that is a meaningful implementation detail that guarantees the "sticky" aspect. If it just stored inputs it in an array cache, the information would be lost at the end of the request (i.e. not sticky).

Method Details

testIsStickyReturnsFalseForClearedStickyForms() public method

testIsStickyReturnsTrueForFormsMarkedAsSticky() public method

testMakeStickyFormStoresInputsInTheSession() public method

It's important to test that this information is actually stored in the session because that is a meaningful implementation detail that guarantees the "sticky" aspect. If it just stored inputs it in an array cache, the information would be lost at the end of the request (i.e. not sticky).