Commit 1f37e575 authored by webchick's avatar webchick

Revert "Issue #1813832 by andypost: Fixed Allow use '0' as id for entity."

This reverts commit f8673ac4.

Needs more discussion.
parent f8673ac4
......@@ -51,8 +51,7 @@ public function getOriginalID() {
* since each configuration entity is unique.
*/
final public function isNew() {
$id = $this->id();
return !isset($id);
return !$this->id();
}
/**
......
......@@ -91,8 +91,7 @@ public function uuid() {
* Implements EntityInterface::isNew().
*/
public function isNew() {
$id = $this->id();
return !empty($this->enforceIsNew) || !isset($id);
return !empty($this->enforceIsNew) || !$this->id();
}
/**
......
......@@ -78,16 +78,13 @@ function testCRUD() {
// Rename the configuration entity's ID/machine name.
$this->assertLinkByHref('admin/structure/config_test/manage/' . $id);
$edit = array(
'id' => '0',
'id' => strtolower($this->randomName()),
'label' => $label3,
);
$this->drupalPost('admin/structure/config_test/manage/' . $id, $edit, 'Save');
$this->assertResponse(200);
$this->assertNoText($label1);
$this->assertText($label3);
$this->drupalPost('admin/structure/config_test/manage/0/delete', array(), 'Delete');
$this->assertResponse(200);
$this->assertNoText($label3);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment