Updated: Comment #0

Problem/Motivation

FieldableDatabaseEntityStorageTest.php contains the class ContentEntityDatabaseStorageTest. Per the PSR-0 standard it should be called ContentEntityDatabaseStorageTest.php

This is an artifact of #2188613: Rename EntityStorageController to EntityStorage (I think, didn't check.)

Proposed resolution

Rename the file to ContentEntityDatabaseStorageTest.php

For extra credit remove the unused use statement for EntityType (line 10) as well.

If you are familiar with PhpUnit tests or want to become it, you can see what other tests do with @coversDefaultClass and @covers and apply that here as well. That would really be extra, extra credit then.

Only the rename is required though, no stress! :-)

Remaining tasks

User interface changes

API changes

Comments

cs_shadow’s picture

Status: Active » Needs review
StatusFileSize
new568 bytes

Attaching a patch with the file rename and removing the unused use statement. Will try to work on the unit-tests next.

Status: Needs review » Needs work

The last submitted patch, 1: core-2231945-1.patch, failed testing.

visabhishek’s picture

Status: Needs work » Needs review
StatusFileSize
new568 bytes

i have renamed the file to ContentEntityDatabaseStorageTest.php
and removed the unused use statement for EntityType (line 10) as well.

Status: Needs review » Needs work
cs_shadow’s picture

StatusFileSize
new763 bytes

Patch in #1 missed the rename. This one should work.

cs_shadow’s picture

Status: Needs work » Needs review
fran seva’s picture

StatusFileSize
new591 bytes

Attach the patch with the rename file and the removed line (10)

This for rename the file
--- core/tests/Drupal/Tests/Core/Entity/FieldableDatabaseEntityStorageTest.php (revision ef2563979aca382174d7a301ca6eb81c70d16a42)
+++ core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php (revision )

And this to remove the line of code:

-use Drupal\Core\Entity\EntityType;

Status: Needs review » Needs work

The last submitted patch, 7: rename_file_remove_entityType-2231945-5.patch, failed testing.

fran seva’s picture

Ups, I have commented at the same time.
Sorry.

cs_shadow’s picture

Status: Needs work » Needs review
visabhishek’s picture

i have renamed the file to ContentEntityDatabaseStorageTest.php
and removed the unused use statement for EntityType (line 10) as well.

cs_shadow’s picture

StatusFileSize
new763 bytes

Re-submitting the patch in #5. It passed the tests, but apparently doesn't reflects so on this page.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Awesome, thanks!

Re @visabhishek: If you use the -C and -M options with git diff Git will detect the rename of the while so that the patch looks much smaller. Then your patch will be like the one in #12.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Good catch.

Committed and pushed to 8.x. Thanks!

  • Commit 1c4efd6 on 8.x by webchick:
    Issue #2231945 by visabhishek, cs_shadow, fran seva | tstoeckler:...
fran seva’s picture

@tstoeckler thanks for the tip!!!

visabhishek’s picture

@tstoeckler: Thanks.

Status: Fixed » Closed (fixed)

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