Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120837249
PrefsSave.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
PrefsSave.php
View Options
<?php
/**
* Test class to test rcmail_action_settings_prefs_save
*
* @package Tests
*/
class
Actions_Settings_PrefsSave
extends
ActionTestCase
{
/**
* Test run() method
*/
function
test_run
()
{
$action
=
new
rcmail_action_settings_prefs_save
;
$output
=
$this
->
initOutput
(
rcmail_action
::
MODE_HTTP
,
'settings'
,
'save-prefs'
);
$this
->
assertInstanceOf
(
'rcmail_action'
,
$action
);
$this
->
assertTrue
(
$action
->
checks
());
// TODO: Test all sections
$_POST
[
'_section'
]
=
'general'
;
$action
->
run
();
$this
->
assertSame
(
'edit-prefs'
,
rcmail
::
get_instance
()->
action
);
$this
->
assertSame
(
'successfullysaved'
,
$output
->
getProperty
(
'message'
));
}
/**
* Test prefs_input() method
*/
function
test_prefs_input
()
{
$action
=
new
rcmail_action_settings_prefs_save
;
$_POST
=
[
'_test'
=>
'test'
];
rcmail
::
get_instance
()->
config
->
set
(
'test'
,
null
);
$this
->
assertSame
(
null
,
$action
->
prefs_input
(
'unset'
,
'/test/'
));
$this
->
assertSame
(
'test'
,
$action
->
prefs_input
(
'test'
,
'/^test/'
));
$this
->
assertSame
(
null
,
$action
->
prefs_input
(
'test'
,
'/^a/'
));
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 1:42 PM (1 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18778047
Default Alt Text
PrefsSave.php (1 KB)
Attached To
Mode
R113 roundcubemail
Attached
Detach File
Event Timeline