Loading core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php +37 −0 Original line number Diff line number Diff line Loading @@ -1027,6 +1027,43 @@ 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. * Loading core/modules/rdf/tests/src/Functional/Jsonapi/RdfMappingTest.php→core/modules/jsonapi/tests/src/Functional/RdfMappingTest.php +1 −3 Original line number Diff line number Diff line <?php namespace Drupal\Tests\rdf\Functional\Jsonapi; namespace Drupal\Tests\jsonapi\Functional; use Drupal\Core\Url; use Drupal\node\Entity\NodeType; use Drupal\rdf\Entity\RdfMapping; use Drupal\Tests\jsonapi\Functional\ConfigEntityResourceTestBase; /** * JSON:API integration test for the "RdfMapping" config entity type. * * @group jsonapi * @group rdf */ class RdfMappingTest extends ConfigEntityResourceTestBase { Loading core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php +3 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ 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']); } /** Loading core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,9 @@ 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']); } /** Loading core/modules/migrate_drupal_ui/tests/src/Functional/d7/NoMultilingualReviewPageTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,9 @@ 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']); } /** Loading Loading
core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php +37 −0 Original line number Diff line number Diff line Loading @@ -1027,6 +1027,43 @@ 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. * Loading
core/modules/rdf/tests/src/Functional/Jsonapi/RdfMappingTest.php→core/modules/jsonapi/tests/src/Functional/RdfMappingTest.php +1 −3 Original line number Diff line number Diff line <?php namespace Drupal\Tests\rdf\Functional\Jsonapi; namespace Drupal\Tests\jsonapi\Functional; use Drupal\Core\Url; use Drupal\node\Entity\NodeType; use Drupal\rdf\Entity\RdfMapping; use Drupal\Tests\jsonapi\Functional\ConfigEntityResourceTestBase; /** * JSON:API integration test for the "RdfMapping" config entity type. * * @group jsonapi * @group rdf */ class RdfMappingTest extends ConfigEntityResourceTestBase { Loading
core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php +3 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ 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']); } /** Loading
core/modules/migrate_drupal_ui/tests/src/Functional/d7/MultilingualReviewPageTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,9 @@ 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']); } /** Loading
core/modules/migrate_drupal_ui/tests/src/Functional/d7/NoMultilingualReviewPageTest.php +3 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,9 @@ 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']); } /** Loading