Loading core/modules/comment/tests/src/Functional/CommentActionsTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public function testCommentPublishUnpublishActions() { $action = Action::load('comment_unpublish_action'); $action->execute([$comment]); $this->assertTrue($comment->isPublished() === FALSE, 'Comment was unpublished'); $this->assertArraySubset(['module' => ['comment']], $action->getDependencies()); $this->assertSame(['module' => ['comment']], $action->getDependencies()); // Publish a comment. $action = Action::load('comment_publish_action'); $action->execute([$comment]); Loading core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php +3 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,9 @@ public function testMigration() { 'comment_preview' => 'Preview comment', 'comment_form_location' => 'Location of comment submission form', ]; $this->assertArraySubset($comment_fields, $this->migration->getSourcePlugin()->fields()); foreach ($comment_fields as $field => $description) { $this->assertEquals($description, $this->migration->getSourcePlugin()->fields()[$field]); } $this->assertEntity('comment_node_article', 'Article comment'); $this->assertEntity('comment_node_blog', 'Blog entry comment'); Loading core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ public function testDisplayErrorMessagesNotInline() { // Just test if the #error_no_message property is TRUE. FormErrorHandlerTest // tests if the property actually hides the error message. $this->assertArraySubset(['#error_no_message' => TRUE], $form['test']); $this->assertTrue($form['test']['#error_no_message']); } } core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php +6 −2 Original line number Diff line number Diff line Loading @@ -2005,7 +2005,9 @@ public function testPostIndividual() { // properties are present, the server could be computing additional // properties. if (is_array($field_normalization)) { $this->assertArraySubset($field_normalization, $created_entity_document['data']['attributes'][$field_name]); foreach ($field_normalization as $value) { $this->assertContains($value, $created_entity_document['data']['attributes'][$field_name]); } } else { $this->assertSame($field_normalization, $created_entity_document['data']['attributes'][$field_name]); Loading Loading @@ -2259,7 +2261,9 @@ public function testPatchIndividual() { // properties are present, the server could be computing additional // properties. if (is_array($field_normalization)) { $this->assertArraySubset($field_normalization, $updated_entity_document['data']['attributes'][$field_name]); foreach ($field_normalization as $value) { $this->assertContains($value, $updated_entity_document['data']['attributes'][$field_name]); } } else { $this->assertSame($field_normalization, $updated_entity_document['data']['attributes'][$field_name]); Loading core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +8 −4 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ public function testNormalize() { $this->assertTrue(!isset($normalized['included'][1]['attributes']['created'])); // Make sure that the cache tags for the includes and the requested entities // are bubbling as expected. $this->assertArraySubset( $this->assertSame( ['file:1', 'node:1', 'taxonomy_term:1', 'taxonomy_term:2', 'user:1'], $jsonapi_doc_object->getCacheTags() ); Loading Loading @@ -378,7 +378,7 @@ public function testNormalizeUuid() { $this->assertCount(12, $normalized['included'][1]['attributes']); // Make sure that the cache tags for the includes and the requested entities // are bubbling as expected. $this->assertArraySubset( $this->assertSame( ['node:1', 'taxonomy_term:1', 'taxonomy_term:2', 'user:1'], $jsonapi_doc_object->getCacheTags() ); Loading Loading @@ -693,8 +693,12 @@ public function testCacheableMetadata(CacheableMetadata $expected_metadata, $fie 'account' => NULL, ]; $jsonapi_doc_object = $this->getNormalizer()->normalize(new JsonApiDocumentTopLevel(new ResourceObjectData([$resource_object], 1), new NullIncludedData(), new LinkCollection([])), 'api_json', $context); $this->assertArraySubset($expected_metadata->getCacheTags(), $jsonapi_doc_object->getCacheTags()); $this->assertArraySubset($expected_metadata->getCacheContexts(), $jsonapi_doc_object->getCacheContexts()); foreach ($expected_metadata->getCacheTags() as $tag) { $this->assertContains($tag, $jsonapi_doc_object->getCacheTags()); } foreach ($expected_metadata->getCacheContexts() as $context) { $this->assertContains($context, $jsonapi_doc_object->getCacheContexts()); } $this->assertSame($expected_metadata->getCacheMaxAge(), $jsonapi_doc_object->getCacheMaxAge()); } Loading Loading
core/modules/comment/tests/src/Functional/CommentActionsTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public function testCommentPublishUnpublishActions() { $action = Action::load('comment_unpublish_action'); $action->execute([$comment]); $this->assertTrue($comment->isPublished() === FALSE, 'Comment was unpublished'); $this->assertArraySubset(['module' => ['comment']], $action->getDependencies()); $this->assertSame(['module' => ['comment']], $action->getDependencies()); // Publish a comment. $action = Action::load('comment_publish_action'); $action->execute([$comment]); Loading
core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php +3 −1 Original line number Diff line number Diff line Loading @@ -54,7 +54,9 @@ public function testMigration() { 'comment_preview' => 'Preview comment', 'comment_form_location' => 'Location of comment submission form', ]; $this->assertArraySubset($comment_fields, $this->migration->getSourcePlugin()->fields()); foreach ($comment_fields as $field => $description) { $this->assertEquals($description, $this->migration->getSourcePlugin()->fields()[$field]); } $this->assertEntity('comment_node_article', 'Article comment'); $this->assertEntity('comment_node_blog', 'Blog entry comment'); Loading
core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ public function testDisplayErrorMessagesNotInline() { // Just test if the #error_no_message property is TRUE. FormErrorHandlerTest // tests if the property actually hides the error message. $this->assertArraySubset(['#error_no_message' => TRUE], $form['test']); $this->assertTrue($form['test']['#error_no_message']); } }
core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php +6 −2 Original line number Diff line number Diff line Loading @@ -2005,7 +2005,9 @@ public function testPostIndividual() { // properties are present, the server could be computing additional // properties. if (is_array($field_normalization)) { $this->assertArraySubset($field_normalization, $created_entity_document['data']['attributes'][$field_name]); foreach ($field_normalization as $value) { $this->assertContains($value, $created_entity_document['data']['attributes'][$field_name]); } } else { $this->assertSame($field_normalization, $created_entity_document['data']['attributes'][$field_name]); Loading Loading @@ -2259,7 +2261,9 @@ public function testPatchIndividual() { // properties are present, the server could be computing additional // properties. if (is_array($field_normalization)) { $this->assertArraySubset($field_normalization, $updated_entity_document['data']['attributes'][$field_name]); foreach ($field_normalization as $value) { $this->assertContains($value, $updated_entity_document['data']['attributes'][$field_name]); } } else { $this->assertSame($field_normalization, $updated_entity_document['data']['attributes'][$field_name]); Loading
core/modules/jsonapi/tests/src/Kernel/Normalizer/JsonApiDocumentTopLevelNormalizerTest.php +8 −4 Original line number Diff line number Diff line Loading @@ -288,7 +288,7 @@ public function testNormalize() { $this->assertTrue(!isset($normalized['included'][1]['attributes']['created'])); // Make sure that the cache tags for the includes and the requested entities // are bubbling as expected. $this->assertArraySubset( $this->assertSame( ['file:1', 'node:1', 'taxonomy_term:1', 'taxonomy_term:2', 'user:1'], $jsonapi_doc_object->getCacheTags() ); Loading Loading @@ -378,7 +378,7 @@ public function testNormalizeUuid() { $this->assertCount(12, $normalized['included'][1]['attributes']); // Make sure that the cache tags for the includes and the requested entities // are bubbling as expected. $this->assertArraySubset( $this->assertSame( ['node:1', 'taxonomy_term:1', 'taxonomy_term:2', 'user:1'], $jsonapi_doc_object->getCacheTags() ); Loading Loading @@ -693,8 +693,12 @@ public function testCacheableMetadata(CacheableMetadata $expected_metadata, $fie 'account' => NULL, ]; $jsonapi_doc_object = $this->getNormalizer()->normalize(new JsonApiDocumentTopLevel(new ResourceObjectData([$resource_object], 1), new NullIncludedData(), new LinkCollection([])), 'api_json', $context); $this->assertArraySubset($expected_metadata->getCacheTags(), $jsonapi_doc_object->getCacheTags()); $this->assertArraySubset($expected_metadata->getCacheContexts(), $jsonapi_doc_object->getCacheContexts()); foreach ($expected_metadata->getCacheTags() as $tag) { $this->assertContains($tag, $jsonapi_doc_object->getCacheTags()); } foreach ($expected_metadata->getCacheContexts() as $context) { $this->assertContains($context, $jsonapi_doc_object->getCacheContexts()); } $this->assertSame($expected_metadata->getCacheMaxAge(), $jsonapi_doc_object->getCacheMaxAge()); } Loading