Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
f4c3b094
Commit
f4c3b094
authored
Feb 17, 2012
by
gdd
Browse files
Added tests for clear()
parent
eb6ea697
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/config/config.test
View file @
f4c3b094
...
...
@@ -192,6 +192,20 @@ class ConfigFileContentTestCase extends DrupalWebTestCase {
// Read true value
$this
->
assertEqual
(
$config
->
get
(
$true_key
),
'1'
,
t
(
'Boolean TRUE value returned the string \'1\'.'
));
// Unset a top level value
$config
->
clear
(
$key
);
// Unset a nested value
$config
->
clear
(
$nested_key
);
$config
->
save
();
$config
=
config
(
$name
);
// Read unset top level value
$this
->
assertNull
(
$config
->
get
(
$key
),
t
(
'Top level value unset.'
));
// Read unset nested value
$this
->
assertNull
(
$config
->
get
(
$nested_key
),
t
(
'Nested value unset.'
));
// Delete the configuration.
$config
=
config
(
$name
);
$config
->
delete
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment