Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
configuration entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Feb 2015 at 00:00 UTC
Updated:
9 Nov 2015 at 04:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sweetchuckComment #3
tim.plunkettI think this is redundant, and should just use weightKey.
This needs tests to expose the bug.
Comment #4
sweetchuckClear the class name.
Without any test.
Comment #6
sweetchuckThe existing tests are suppose that the entities are sorted by weight-label, but the
config_testentity type has no defined "weight key".Remaining task:
Write more test with a new
config_weight_testentity type which has "weight" key.Comment #8
sweetchuckThe same problem with the "status" field.
These methods are directly use the
$this->statusfield.Comment #9
tim.plunkettClosed #2052083: EntityType::getKey() should be used instead of hardcoding id, status, weight, etc. as a dupe, even though it was much older.
Comment #10
sweetchuckSomething is wrong in
\Drupal\Tests\search\Unit\SearchPageRepositoryTest::testSortSearchPages()When I modify the
\Drupal\search\Entity\SearchPage::sort()to not call the parent then the test is green.The
parent::sort()is the modified\Drupal\Core\Config\Entity\ConfigEntityBase::sort()I think the problem is around\Drupal\Tests\search\Unit\TestSearchPageor the instantiation in testSortSearchPages().Maybe the missing entityManager or entityTypeDefinition.
The error message.
Comment #11
tim.plunkettIt's because we're calling this now, and the entityType/entityManager isn't mocked.
Comment #12
tim.plunkettBorrowing the uasort fix from BlockRepository.
Comment #13
tim.plunkettThe draggable list builder bit isn't a bug, the sort still is.
Still needs tests.
Comment #14
tim.plunkettLet's close this in favor of #2052083: EntityType::getKey() should be used instead of hardcoding id, status, weight, etc..
Comment #15
tim.plunkett