Follow up for #1634442: DatabaseStorageController can't catch exceptions
Problem/Motivation
Non-blocking standards fixes from 1634442:
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiTest.phpundefined
@@ -90,4 +91,52 @@ protected function assertCRUD($entity_type, User $user1) {
+ * Tests that exceptions are properly thrown when saving or deleting an
+ * entity.
function docs blocks should be one line < 80 chars.
+++ b/core/modules/system/tests/modules/entity_test/entity_test.moduleundefined
@@ -379,3 +379,21 @@ function entity_test_entity_form_display_alter(EntityFormDisplay $form_display,
+ * Implements hook_entity_presave()
...
+ * Implements hook_entity_predelete()
these should be sentences (end with a period)
https://drupal.org/node/1354#functions
All summaries (first lines of docblocks) must be under 80 characters, start with a capital letter, and end with a period (.). They must provide a brief description of what a function does, what a class does, what a file contains, etc.
Proposed resolution
fix those, and any thing else from entity_test.module,
like
- (done) removed in #2134857: PHPUnit test the entity base classes "type casting in function entity_test_label_callback($entity_type, $entity, $langcode = NULL) {
and in the doc block for that function" - ?
Remaining tasks
Initial patch.
User interface changes
No.
API changes
No.
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff-2039449-8-9.txt | 1.94 KB | mrjmd |
#9 | comment-updates-for-coding-standards-2039449-9.patch | 2.54 KB | mrjmd |
#8 | comment-updates-for-coding-standards-2039449-8.patch | 1.63 KB | mrjmd |
#4 | comment-updates-for-coding-standards-2039449-4.patch | 1.63 KB | yaworsk |
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedOh, I thought those were all from one file, but one is also in EntityApiTest.php
Comment #2
yaworsk CreditAttribution: yaworsk commentedpatch attached...
Comment #4
yaworsk CreditAttribution: yaworsk commentedopps... had a random text string in there. updated patch attached.
Comment #5
Berdir4: comment-updates-for-coding-standards-2039449-4.patch queued for re-testing.
Comment #7
YesCT CreditAttribution: YesCT commentedComment #8
mrjmd CreditAttribution: mrjmd commentedAttempted a reroll.
Comment #9
mrjmd CreditAttribution: mrjmd commentedI reviewed the original patch, it looks a bit incomplete:
- The function doc block for testEntityStorageExceptionHandling() was moved from two lines to one: "Tests that exceptions are properly thrown when saving or deleting an entity." This makes it more than 80 chars. I've removed the word 'properly', which is implied, to get it back under 80 chars.
- One comment missing a period at the end.
- One comment with a comma instead of a period.
- Also the original issue mentions "type casting in function entity_test_label_callback", but I don't see that function in either file so I'm thinking that's been rendered obsolete?
New patch rolled based on the same coding standards info linked above, https://drupal.org/node/1354#functions.
Comment #10
mrjmd CreditAttribution: mrjmd commentedAdding interdiff.
Comment #11
YesCT CreditAttribution: YesCT commentedgit log -S "entity_test_label_callback" core/modules
reveals
#2134857: PHPUnit test the entity base classes removed function entity_test_label_callback().
Updated issue summary.
interdiff looks good.
I think to limit the scope and get this Novice in, retitling.
I checked for other missing period-on-sentences kind of thing and this has them all from the .module file. This looks good! rtbc.
Comment #12
YesCT CreditAttribution: YesCT commentedmore accurate title
Comment #13
YesCT CreditAttribution: YesCT commentedsorry. :/ punctuation.
Comment #14
jhodgdonCommitted to 8.x, thanks all!
Comment #17
YesCT CreditAttribution: YesCT commented#2212283-12: Auto-format JS files just failed with that same fail.
let's see what 8.x head test says https://qa.drupal.org/8.x-status
Comment #18
jhodgdonThis patch was already committed and there is no way the failure was related to this patch, which only touched comments.