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.

CommentFileSizeAuthor
#2 2017657-2.patch1.53 KBfubhy
#1 2017657-1.patch2.38 KBfubhy

Comments

fubhy’s picture

Status: Active » Needs review
StatusFileSize
new2.38 KB
fubhy’s picture

StatusFileSize
new1.53 KB

Okay, @chx suggested that we keep the title sort test so we at least test the configuration of this view.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

I 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.

fubhy’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

Oh, we missed node_test_entity_info_alter()... @see Drupal\node_test\NodeTestStorageController

fubhy’s picture