Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
0617e701
Commit
0617e701
authored
Nov 13, 2012
by
Nathaniel Catchpole
Browse files
Issue
#1813832
by andypost: Fixed Entity wrongly checks existence of ID in isNew() method.
parent
60bf71e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php
View file @
0617e701
...
...
@@ -252,6 +252,21 @@ function testCRUDUI() {
$this
->
assertNoLinkByHref
(
"admin/structure/config_test/manage/
$id
/edit"
);
$id
=
$edit
[
'id'
];
$this
->
assertLinkByHref
(
"admin/structure/config_test/manage/
$id
/edit"
);
// Create a configuration entity with '0' machine name.
$edit
=
array
(
'id'
=>
'0'
,
'label'
=>
'0'
,
);
$this
->
drupalPost
(
'admin/structure/config_test/add'
,
$edit
,
'Save'
);
$this
->
assertResponse
(
200
);
$message_insert
=
format_string
(
'%label configuration has been created.'
,
array
(
'%label'
=>
$edit
[
'label'
]));
$this
->
assertRaw
(
$message_insert
);
$this
->
assertLinkByHref
(
'admin/structure/config_test/manage/0/edit'
);
$this
->
assertLinkByHref
(
'admin/structure/config_test/manage/0/delete'
);
$this
->
drupalPost
(
'admin/structure/config_test/manage/0/delete'
,
array
(),
'Delete'
);
$this
->
assertFalse
(
entity_load
(
'config_test'
,
'0'
),
'Test entity deleted'
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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