Problem/Motivation
follow-up from #3318625: Remove active composer fixture files in UpdaterFormTest
Remove the staged composer metadata fixture files in\Drupal\Tests\automatic_updates_extensions\Functional\UpdaterFormTest
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | Screenshot 2022-12-14 at 7.16.58 PM.png | 771.79 KB | kunal.sachdev |
Issue fork automatic_updates-3321904
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kunal.sachdev commentedComment #3
tedbowComment #5
kunal.sachdev commentedComment #6
kunal.sachdev commentedComment #7
kunal.sachdev commentedIn \Drupal\Tests\automatic_updates_extensions\Functional\UpdaterFormTest
$this->container->get('event_dispatcher')->addListener(PreApplyEvent::class, $listener, PHP_INT_MAX);is not working.Comment #8
wim leersThat's because you're in a functional test and any container modifications you make only happen to the test runner, not the tested system: your test is making requests to the tested system, so if you want additional things to happen when an event is fired, that code must be installed in the tested site, so that it runs when you make a request.
Comment #9
wim leers#8 addressed one small piece, but not the underlying problem. Discussed that with @tedbow, this is now blocked on #3322913: Create an easy way for functional tests to simulate an update (and update kernel tests to use the same).
Comment #10
wim leers#3322913: Create an easy way for functional tests to simulate an update (and update kernel tests to use the same) landed!
Let's continue this one now 😊
Comment #11
kunal.sachdev commented\Drupal\Tests\automatic_updates_extensions\Functional\UpdaterFormTest::testDisplayUpdates is failing locally with error
and I tried to do page debug which outputs

Comment #12
kunal.sachdev commentedComment #13
tedbowComment #14
tedbowComment #15
kunal.sachdev commentedComment #16
wim leers🥳🥳🥳
19 files +5 -307automatic_updates_extensions/tests/fixtures/stage_composersimply does not exist anymore, so the goal of the issue summary has definitely been met 😄(Clarifying the issue title though — that was less clear than the issue summary.)
Comment #17
tedbowI just removed `\Drupal\Tests\automatic_updates\Functional\AutomaticUpdatesFunctionalTestBase::useFixtureDirectoryAsActive` which is no longer used. Leaving RTBC
Comment #18
tedbowI also noticed that `\Drupal\Tests\automatic_updates\Functional\AutomaticUpdatesFunctionalTestBase::useFixtureDirectoryAsActive` is only used 1 place so we could remove that in a follow-up
Comment #20
tedbowThanks!
Comment #21
tedbowTagging this as
core-mvpbecause removing the unused `useFixtureDirectoryAsActive` would have needed for core-mvpComment #22
wim leers#21++