Loading core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php +11 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,17 @@ abstract class CommentResourceTestBase extends EntityResourceTestBase { */ protected $entity; /** * Marks some tests as skipped because XML cannot be deserialized. * * @before */ public function commentResourceTestBaseSkipTests(): void { if (static::$format === 'xml' && in_array($this->name(), ['testPostDxWithoutCriticalBaseFields', 'testPostSkipCommentApproval'], TRUE)) { $this->markTestSkipped('Deserialization of the XML format is not supported.'); } } /** * {@inheritdoc} */ Loading core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php +0 −16 Original line number Diff line number Diff line Loading @@ -52,20 +52,4 @@ class CommentXmlAnonTest extends CommentResourceTestBase { 'field_name', ]; /** * {@inheritdoc} */ public function testPostDxWithoutCriticalBaseFields(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } /** * {@inheritdoc} */ public function testPostSkipCommentApproval(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } } core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php +0 −16 Original line number Diff line number Diff line Loading @@ -41,20 +41,4 @@ class CommentXmlBasicAuthTest extends CommentResourceTestBase { */ protected static $auth = 'basic_auth'; /** * {@inheritdoc} */ public function testPostDxWithoutCriticalBaseFields(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } /** * {@inheritdoc} */ public function testPostSkipCommentApproval(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } } core/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php +0 −16 Original line number Diff line number Diff line Loading @@ -36,20 +36,4 @@ class CommentXmlCookieTest extends CommentResourceTestBase { */ protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ public function testPostDxWithoutCriticalBaseFields(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } /** * {@inheritdoc} */ public function testPostSkipCommentApproval(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } } core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php +17 −13 Original line number Diff line number Diff line Loading @@ -41,6 +41,23 @@ abstract class FileResourceTestBase extends EntityResourceTestBase { */ protected $author; /** * Marks some tests as skipped because XML cannot be deserialized. * * @before */ public function fileResourceTestBaseSkipTests(): void { if ($this->name() === 'testPost') { // Drupal does not allow creating file entities independently. It allows // you to create file entities that are referenced from another entity // (e.g. an image for a node's image field). // For that purpose, there is the "file_upload" REST resource plugin. // @see \Drupal\file\FileAccessControlHandler::checkCreateAccess() // @see \Drupal\file\Plugin\rest\resource\FileUploadResource $this->markTestSkipped('Drupal does not allow creating file entities independently.'); } } /** * {@inheritdoc} */ Loading Loading @@ -197,19 +214,6 @@ protected function getExpectedCacheContexts() { ]; } /** * {@inheritdoc} */ public function testPost(): void { // Drupal does not allow creating file entities independently. It allows you // to create file entities that are referenced from another entity (e.g. an // image for a node's image field). // For that purpose, there is the "file_upload" REST resource plugin. // @see \Drupal\file\FileAccessControlHandler::checkCreateAccess() // @see \Drupal\file\Plugin\rest\resource\FileUploadResource $this->markTestSkipped(); } /** * {@inheritdoc} */ Loading Loading
core/modules/comment/tests/src/Functional/Rest/CommentResourceTestBase.php +11 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,17 @@ abstract class CommentResourceTestBase extends EntityResourceTestBase { */ protected $entity; /** * Marks some tests as skipped because XML cannot be deserialized. * * @before */ public function commentResourceTestBaseSkipTests(): void { if (static::$format === 'xml' && in_array($this->name(), ['testPostDxWithoutCriticalBaseFields', 'testPostSkipCommentApproval'], TRUE)) { $this->markTestSkipped('Deserialization of the XML format is not supported.'); } } /** * {@inheritdoc} */ Loading
core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php +0 −16 Original line number Diff line number Diff line Loading @@ -52,20 +52,4 @@ class CommentXmlAnonTest extends CommentResourceTestBase { 'field_name', ]; /** * {@inheritdoc} */ public function testPostDxWithoutCriticalBaseFields(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } /** * {@inheritdoc} */ public function testPostSkipCommentApproval(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } }
core/modules/comment/tests/src/Functional/Rest/CommentXmlBasicAuthTest.php +0 −16 Original line number Diff line number Diff line Loading @@ -41,20 +41,4 @@ class CommentXmlBasicAuthTest extends CommentResourceTestBase { */ protected static $auth = 'basic_auth'; /** * {@inheritdoc} */ public function testPostDxWithoutCriticalBaseFields(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } /** * {@inheritdoc} */ public function testPostSkipCommentApproval(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } }
core/modules/comment/tests/src/Functional/Rest/CommentXmlCookieTest.php +0 −16 Original line number Diff line number Diff line Loading @@ -36,20 +36,4 @@ class CommentXmlCookieTest extends CommentResourceTestBase { */ protected $defaultTheme = 'stark'; /** * {@inheritdoc} */ public function testPostDxWithoutCriticalBaseFields(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } /** * {@inheritdoc} */ public function testPostSkipCommentApproval(): void { // Deserialization of the XML format is not supported. $this->markTestSkipped(); } }
core/modules/file/tests/src/Functional/Rest/FileResourceTestBase.php +17 −13 Original line number Diff line number Diff line Loading @@ -41,6 +41,23 @@ abstract class FileResourceTestBase extends EntityResourceTestBase { */ protected $author; /** * Marks some tests as skipped because XML cannot be deserialized. * * @before */ public function fileResourceTestBaseSkipTests(): void { if ($this->name() === 'testPost') { // Drupal does not allow creating file entities independently. It allows // you to create file entities that are referenced from another entity // (e.g. an image for a node's image field). // For that purpose, there is the "file_upload" REST resource plugin. // @see \Drupal\file\FileAccessControlHandler::checkCreateAccess() // @see \Drupal\file\Plugin\rest\resource\FileUploadResource $this->markTestSkipped('Drupal does not allow creating file entities independently.'); } } /** * {@inheritdoc} */ Loading Loading @@ -197,19 +214,6 @@ protected function getExpectedCacheContexts() { ]; } /** * {@inheritdoc} */ public function testPost(): void { // Drupal does not allow creating file entities independently. It allows you // to create file entities that are referenced from another entity (e.g. an // image for a node's image field). // For that purpose, there is the "file_upload" REST resource plugin. // @see \Drupal\file\FileAccessControlHandler::checkCreateAccess() // @see \Drupal\file\Plugin\rest\resource\FileUploadResource $this->markTestSkipped(); } /** * {@inheritdoc} */ Loading