The node admin overview sort test basically tests views sorting which is covered by Views anyways. Let's just remove that test.
Why it fails? Well, NodeStorageController::preSave() always overrides $node->changed with REQUEST_TIME so there is no point in creating 10 nodes in a single request (which end up with the same changed timestamp) and then test for the ordering based on it because, well, it's identical for all nodes.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2017657-2.patch | 1.53 KB | fubhy |
| #1 | 2017657-1.patch | 2.38 KB | fubhy |
Comments
Comment #1
fubhy commentedComment #2
fubhy commentedOkay, @chx suggested that we keep the title sort test so we at least test the configuration of this view.
Comment #3
dcam commentedI ran in to this same issue of created timestamps while writing a test for a recent nodes block in contrib a couple of days ago. It surprises me that there was something like it in core.
Anyway, the change looks ok to me. The alphabetical sort is still in there and I agree with @chx that it's a good idea not to remove it. I think #2 is RTBC.
Comment #4
fubhy commentedOh, we missed
node_test_entity_info_alter()... @seeDrupal\node_test\NodeTestStorageControllerComment #5
fubhy commentedFixing over at https://drupal.org/node/1893772#comment-7528619