evaluate() public method

First argument is the node property to sort by. Works with internal arguments (_xyz) as well. Second argument is the sort direction (ASC or DESC).
public evaluate ( FlowQuery $flowQuery, array $arguments ) : mixed
$flowQuery Neos\Eel\FlowQuery\FlowQuery the FlowQuery object
$arguments array the arguments for this operation.
return mixed
 /**
  * @test
  */
 public function sortByDateTimeDescending()
 {
     $nodesToSort = [$this->nodeDataRepository->findOneByIdentifier('c381f64d-4269-429a-9c21-6d846115addd', $this->context->getWorkspace(true), array()), $this->nodeDataRepository->findOneByIdentifier('c381f64d-4269-429a-9c21-6d846115adde', $this->context->getWorkspace(true), array()), $this->nodeDataRepository->findOneByIdentifier('c381f64d-4269-429a-9c21-6d846115addf', $this->context->getWorkspace(true), array())];
     $correctOrder = [$this->nodeDataRepository->findOneByIdentifier('c381f64d-4269-429a-9c21-6d846115addd', $this->context->getWorkspace(true), array()), $this->nodeDataRepository->findOneByIdentifier('c381f64d-4269-429a-9c21-6d846115addf', $this->context->getWorkspace(true), array()), $this->nodeDataRepository->findOneByIdentifier('c381f64d-4269-429a-9c21-6d846115adde', $this->context->getWorkspace(true), array())];
     $flowQuery = new \Neos\Eel\FlowQuery\FlowQuery($nodesToSort);
     $operation = new SortOperation();
     $operation->evaluate($flowQuery, ['_lastPublicationDateTime', 'DESC']);
     $this->assertEquals($correctOrder, $flowQuery->getContext());
 }