X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Ftests%2Fsrc%2FKernel%2FMigrate%2FMigrateCommentStubTest.php;h=3b0674222cd13efb6a3adc7941f76c868ec985a7;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=0b256ea51a2dfc039cf19840b98862cfd835f31b;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php b/web/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php index 0b256ea51..3b0674222 100644 --- a/web/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php +++ b/web/core/modules/comment/tests/src/Kernel/Migrate/MigrateCommentStubTest.php @@ -3,7 +3,6 @@ namespace Drupal\Tests\comment\Kernel\Migrate; use Drupal\comment\Entity\CommentType; -use Drupal\migrate\MigrateException; use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase; use Drupal\migrate_drupal\Tests\StubTestTrait; use Drupal\node\Entity\NodeType; @@ -29,6 +28,8 @@ class MigrateCommentStubTest extends MigrateDrupalTestBase { parent::setUp(); $this->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. @@ -55,18 +56,6 @@ class MigrateCommentStubTest extends MigrateDrupalTestBase { * Tests creation of comment stubs. */ public function testStub() { - try { - // We expect an exception, because there's no node to reference. - $this->performStubTest('comment'); - $this->fail('Expected exception has not been thrown.'); - } - catch (MigrateException $e) { - $this->assertIdentical($e->getMessage(), - 'Stubbing failed, unable to generate value for field entity_id'); - } - - // The stub should pass when there's a node to point to. - $this->createStub('node'); $this->performStubTest('comment'); }