installEntitySchema('comment'); $this->installEntitySchema('node'); $this->installSchema('system', ['sequences']); // Make sure uid 0 is created (default uid for comments is 0). $storage = \Drupal::entityManager()->getStorage('user'); // Insert a row for the anonymous user. $storage ->create([ 'uid' => 0, 'status' => 0, 'name' => '', ]) ->save(); // Need at least one node type and comment type present. NodeType::create([ 'type' => 'testnodetype', 'name' => 'Test node type', ])->save(); CommentType::create([ 'id' => 'testcommenttype', 'label' => 'Test comment type', 'target_entity_type_id' => 'node', ])->save(); } /** * Tests creation of comment stubs. */ public function testStub() { $this->performStubTest('comment'); } }