Open millnut opened 1 week ago
Started to look at drupal/group_sites
as the errors seem to come from there, looks like it has a recent dev
version but haven't tested with this yet
Just tested the dev version of group_sites, no change, still generates the error.
1) Drupal\Tests\localgov_microsites_group\Kernel\GroupDefaultContentTest::testGenerate
TypeError: Symfony\Component\DependencyInjection\ServiceLocator::get(): Argument #1 ($id) must be of type string, null given, called in /var/www/html/web/modules/contrib/group_sites/src/Access/GroupSitesAccessPolicy.php on line 102
I'm just testing with one test for now :
$ ddev phpunit web/modules/contrib/localgov_microsites_group/tests/src/Kernel/GroupDefaultContentTest.php
So why is this line not getting an access_policy_id?
Debugging the phpunit test, (kernal test)
$this->configFactory->get('group_sites.settings');
returns an empty config object.
In fact, changing this to
$settings = $this->configFactory->get('system.site');
Still an empty data[] array in the object.
Still debugging, and setting up a microsite through the browser, the same bit of code loads the config objects properly.
@millnut is there something missing when we're running these kernel tests? Some dependency?
All the failing tests are kernel tests.
Not sure I don't have time this week to look into in much detail (on holiday 😄 ) but downgrading to group 3.2.2 does make the tests pass.
Downgrading drupal/flexible_permissions (2.0.1 => 1.1.0)
Downgrading drupal/group (3.3.0 => 3.2.2)
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.
Testing Drupal\Tests\localgov_microsites_group\Kernel\GroupDefaultContentTest
Group Default Content (Drupal\Tests\localgov_microsites_group\Kernel\GroupDefaultContent)
✔ Generate
Time: 00:31.793, Memory: 10.00 MB
OK (1 test, 24 assertions)
See: https://github.com/localgovdrupal/localgov_microsites_group/actions/runs/11459008595/job/31882691694
Comparing the last working tests and when this started failing on run (19th Oct) https://github.com/localgovdrupal/localgov_microsites_project/actions/runs/11415200204 the only composer differences are;