Verified Commit 50737e4e authored by Jess's avatar Jess
Browse files

Issue #3293813 by Spokje, longwave, quietone, catch, nod_, bbrala, xjm: Move...

Issue #3293813 by Spokje, longwave, quietone, catch, nod_, bbrala, xjm: Move RDF-related tests to RDF module

(cherry picked from commit 555f4457)
parent 6a261489
Loading
Loading
Loading
Loading
+0 −37
Original line number Diff line number Diff line
@@ -1027,43 +1027,6 @@ public function testRecursionDetectedWhenResponseContainsViolationsFrom3042124()
    $this->assertSame(sprintf('title: This value should not be null.'), $data['errors'][0]['detail']);
  }

  /**
   * Ensure that child comments can be retrieved via JSON:API.
   */
  public function testLeakedCacheMetadataViaRdfFromIssue3053827() {
    $this->assertTrue($this->container->get('module_installer')->install(['comment', 'rdf'], TRUE), 'Installed modules.');
    $this->addDefaultCommentField('node', 'article', 'comment', CommentItemInterface::OPEN, 'comment');
    $this->rebuildAll();

    // Create data.
    Node::create([
      'title' => 'Commented Node',
      'type' => 'article',
    ])->save();
    $default_values = [
      'entity_id' => 1,
      'entity_type' => 'node',
      'field_name' => 'comment',
      'status' => 1,
    ];
    $parent = Comment::create(['subject' => 'Marlin'] + $default_values);
    $parent->save();
    $child = Comment::create(['subject' => 'Nemo', 'pid' => $parent->id()] + $default_values);
    $child->save();

    // Test.
    $user = $this->drupalCreateUser(['access comments']);
    $request_options = [
      RequestOptions::AUTH => [
        $user->getAccountName(),
        $user->pass_raw,
      ],
    ];
    // Requesting the comment collection should succeed.
    $response = $this->request('GET', Url::fromUri('internal:/jsonapi/comment/comment'), $request_options);
    $this->assertSame(200, $response->getStatusCode());
  }

  /**
   * Ensure non-translatable entities can be PATCHed with an alternate language.
   *
+0 −4
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ class Upgrade6Test extends MigrateUpgradeExecuteTestBase {
    'forum',
    'language',
    'migrate_drupal_ui',
    'rdf',
    'statistics',
    'telephone',
    'update',
@@ -54,9 +53,6 @@ protected function setUp(): void {
    $this->nodeStorage->delete($this->nodeStorage->loadMultiple());

    $this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal6.php');

    // @todo Remove this in https://www.drupal.org/node/3267515
    \Drupal::service('module_installer')->uninstall(['rdf']);
  }

  /**
+0 −4
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@ class MultilingualReviewPageTest extends MultilingualReviewPageTestBase {
    'telephone',
    'book',
    'forum',
    'rdf',
    'statistics',
    'syslog',
    'update',
@@ -41,9 +40,6 @@ class MultilingualReviewPageTest extends MultilingualReviewPageTestBase {
  protected function setUp(): void {
    parent::setUp();
    $this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal7.php');

    // @todo Remove this in https://www.drupal.org/node/3267515
    \Drupal::service('module_installer')->uninstall(['rdf']);
  }

  /**
+0 −4
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ class NoMultilingualReviewPageTest extends NoMultilingualReviewPageTestBase {
    'forum',
    'language',
    'migrate_drupal_ui',
    'rdf',
    'statistics',
    'telephone',
  ];
@@ -38,9 +37,6 @@ class NoMultilingualReviewPageTest extends NoMultilingualReviewPageTestBase {
  protected function setUp(): void {
    parent::setUp();
    $this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal7.php');

    // @todo Remove this in https://www.drupal.org/node/3267515
    \Drupal::service('module_installer')->uninstall(['rdf']);
  }

  /**
+0 −4
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
    'forum',
    'language',
    'migrate_drupal_ui',
    'rdf',
    'statistics',
    'telephone',
  ];
@@ -57,9 +56,6 @@ protected function setUp(): void {
    $this->nodeStorage->delete($this->nodeStorage->loadMultiple());

    $this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal7.php');

    // @todo Remove this in https://www.drupal.org/node/3267515
    \Drupal::service('module_installer')->uninstall(['rdf']);
  }

  /**
Loading