installSchema('node', 'node_access'); $this->installEntitySchema('node'); $this->installEntitySchema('user'); if ($import_test_views) { ViewTestData::createTestViews(get_class($this), ['node_test_views']); } } public function testRevisionCreateTimestampView() { $node_type = NodeType::create([ 'type' => 'article', 'label' => 'Article', ]); $node_type->save(); $node = Node::create([ 'title' => 'Test node', 'type' => 'article', 'revision_timestamp' => 1000, ]); $node->save(); $node->setRevisionCreationTime(1200); $node->setNewRevision(TRUE); $node->save(); $node->setRevisionCreationTime(1400); $node->setNewRevision(TRUE); $node->save(); $view = Views::getView('test_node_revision_timestamp'); $this->executeView($view); $this->assertIdenticalResultset($view, [ ['vid' => 3, 'revision_timestamp' => 1400], ['vid' => 2, 'revision_timestamp' => 1200], ['vid' => 1, 'revision_timestamp' => 1000], ], ['vid' => 'vid', 'revision_timestamp' => 'revision_timestamp']); } }