https://qa.drupal.org/pifr/test/1076308
The reason the test now fails is the parent ticket adds an assert statement to require a cache ID be passed to the delete method. To prevent this assert raise I added a test to the cacheClear method to see if the cacheID is empty - if it is then the cache delete method is never called.
This causes the test fail logged above.
The test has never been working. Instead of testing for a valid use case where a valid tag was passed it has been passing in NULL to the Database Backend.
The test needs to be revised to pass a cache id to truly test the scenario and work.
Comment | File | Size | Author |
---|---|---|---|
#3 | interdiff-2.txt | 1.49 KB | Aki Tendo |
#3 | 2509432-2.diff | 26.02 KB | Aki Tendo |
#1 | Correction-to-AliasManager--2509432-1--do-not-test.diff | 911 bytes | Aki Tendo |
#1 | Failing-Test--2509432-1--do-not-test.diff | 1.18 KB | Aki Tendo |
#1 | 2509432-1.diff | 21.75 KB | Aki Tendo |
Comments
Comment #1
Aki Tendo CreditAttribution: Aki Tendo as a volunteer commentedAttached are the assertions the Alias Manager and the correction I made to stop the problem which is very straight forward. But now the test "fails" (In my opinion it wasn't really working since it tested an invalid scenario). The testing patch has the assert tools patch included so the tests will run.
Comment #3
Aki Tendo CreditAttribution: Aki Tendo as a volunteer commentedTwo more assertions that won't be safe until this is resolved.
Comment #14
quietone CreditAttribution: quietone at PreviousNext commentedReading the issue I understand that this is about properly testing the cache delete in AliasManager. That line was removed in #3224592: \Drupal\path_alias\AliasManager::cacheClear() can cause deprecations on PHP 8.1 and when set to NULL it tries to flush the cache but that's not possible and the Issue Summary over there provides an explanation.
The patch also adds several files to the Drupal Assertion Component which I am not sure about. Before updating the IS and probably moving to the phpunit component I am going to ask in #bugsmash for direction.