/** * Tests session_selection_deletion() * Tests deleting saved information for a specific page. */ public function test_session_selection_deletion() { global $SESSION, $_GET; $_GET['s'] = 'test'; $_GET['id'] = 1; $target = 'test'; $SESSION->associationpage['test1test'] = 'somevalue'; session_selection_deletion($target); $this->assertInternalType('object', $SESSION); $this->assertObjectHasAttribute('associationpage', $SESSION); $this->assertInternalType('array', $SESSION->associationpage); $this->assertArrayNotHasKey('test1test', $SESSION->associationpage); }
/** * Resets all saved changes. * @param string $target The the section for the current page to reset. (ex. "bulkedit") */ public function bulk_checkbox_selection_reset($target) { session_selection_deletion($target); }