Part of meta-issue #2002650: [meta] improve maintainability by removing unused local variables

File /core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php

Line 54: Unused local variable $instance

#2 drupal-core-remove-unused-local-variable-2080333_2.patch1.09 KBlorique
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed to login to test site. View
#1 drupal-core-remove-unused-local-variable-2080333.patch752 bytesmrsinguyen
PASSED: [[SimpleTest]]: [MySQL] 58,776 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


mrsinguyen’s picture

Status: Active » Needs review
752 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,776 pass(es). View
lorique’s picture

1.09 KB
FAILED: [[SimpleTest]]: [MySQL] Failed to run tests: failed to login to test site. View

Ignore my patch.. i completely misunderstood what was going on in that file. Brain fart on my part..

lorique’s picture

Status: Needs review » Reviewed & tested by the community

This works as intended. I misunderstood that it was a test, so ofc you need to test the method you are testing..

Patch in #1 is the correct patch, please ignore/delete my patch in #2.

Patch #1 is reviewed and tested by the community. Thank you for your patch @mrsinguyen

Status: Reviewed & tested by the community » Needs work

The last submitted patch, drupal-core-remove-unused-local-variable-2080333_2.patch, failed testing.

lorique’s picture

Status: Needs work » Reviewed & tested by the community

See #3

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

tstoeckler’s picture

Status: Fixed » Needs review

I don't see how that line contributes anything to the test now. I think the patch in #2 is actually correct (excluding the .htaccess change).

lorique’s picture

Yeah i referred to patch in #2, which is the correct one. I assume Catch used the one in #2. My patch was woefully misguided, but i was unable to delete it.

SeyV’s picture

Status: Needs review » Closed (fixed)

This has been committed. Fixing status