Problem/Motivation

VocabularyUnitTest extends TaxonomyTestBase, which in turn extends WebTestBase. I.e. it's not a unit test but a web test.

Proposed resolution

Rename VocabularyUnitTest.
Judging from the description I would propose VocabularyCrudTest.
There's also a VocabularyTest in the same namespace which is a little bit ambiguous, we should perhaps rename that to VocabularyUiTest

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

blueminds’s picture

Status: Active » Needs review
FileSize
1.81 KB

Renamed in the attached patch.

Status: Needs review » Needs work

The last submitted patch, 1: rename_vocab_tests-2256405-1.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review

Awesome, this looks almost ready. Thanks!

I assume the test failure is random. Seen that a lot lately.

+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyCrudTest.php
index de7338f..91c6dd4 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php

--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyTest.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUITest.php

+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUITest.php
@@ -10,7 +10,7 @@
-class VocabularyTest extends TaxonomyTestBase {
+class VocabularyUITest extends TaxonomyTestBase {

Per our standards this should ...UiTest, i.e with a lowercase "i" in "Ui".

+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/VocabularyUITest.php
@@ -2,7 +2,7 @@
- * Definition of Drupal\taxonomy\Tests\VocabularyTest.
+ * Definition of Drupal\taxonomy\Tests\VocabularyUITest.

While we're at it, can we change that into "Contains ..."?

blueminds’s picture

Thanks for the review, updated the patch.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Awesome, thanks a lot for the quick follow-up!

tstoeckler’s picture

Title: VocabularUnitTest is misnamed » VocabularyUnitTest and VocabularyTest are misnamed

Fixing title.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks.

  • Commit b293020 on 8.x by Dries:
    Issue #2256405 by blueminds: VocabularyUnitTest and VocabularyTest are...
sun’s picture

Title: VocabularyUnitTest and VocabularyTest are misnamed » [BOGUS COMMIT] VocabularyUnitTest and VocabularyTest are misnamed
Category: Task » Bug report
Priority: Normal » Critical
Status: Fixed » Reviewed & tested by the community

Hm. Something went wrong with that commit. The old files were deleted without adding the new files. Not sure how you managed to do that, but it happened ;)

That said, one of the renamed classes wasn't correct either (wrong letter-casing) — PSR-* is case-sensitive, so that causes the class to not be found.

Due to that, it doesn't really help to retroactively commit the lost classes. I recommend to cleanly revert the commit first:

git revert b293020054d2c7a0c9252bf59690a55b0a7ca847

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 4: rename_vocab_tests-2256405-2.patch, failed testing.

sun’s picture

Status: Needs work » Reviewed & tested by the community
alexpott’s picture

Title: [BOGUS COMMIT] VocabularyUnitTest and VocabularyTest are misnamed » VocabularyUnitTest and VocabularyTest are misnamed
Category: Bug report » Task
Priority: Critical » Normal
Status: Reviewed & tested by the community » Fixed

Fixed the borked commit

  • Commit 0d166fa on 8.x by alexpott:
    Revert "Issue #2256405 by blueminds: VocabularyUnitTest and...
  • Commit 6d61ca5 on 8.x by alexpott:
    Issue #2256405 by blueminds: VocabularyUnitTest and VocabularyTest are...

  • Commit e339152 on 8.x by alexpott:
    Issue #2256405: VocabularyUnitTest and VocabularyTest are misnamed.
    
alexpott’s picture

Just renamed

 1 file changed, 0 insertions(+), 0 deletions(-)
 rename core/modules/taxonomy/lib/Drupal/taxonomy/Tests/{VocabularyUITest.php => VocabularyUiTest.php} (100%)

too

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.