Skip to content
Snippets Groups Projects
Commit 0617e701 authored by catch's avatar catch
Browse files

Issue #1813832 by andypost: Fixed Entity wrongly checks existence of ID in isNew() method.

parent 60bf71e2
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment