- Issue created by @AstonVictor
- Issue was unassigned.
- Status changed to Needs review
10 months ago 1:09pm 11 January 2024 - 🇺🇦Ukraine AstonVictor
Created a new MR.
Implemented a simple test to check the output for nodes.
- 🇮🇹Italy aronne
Hi @AstonVictor,
thank you for your work. I'm just unsure about this piece of code:// Enable prevnext links for node entity type. $config = \Drupal::configFactory()->getEditable('prevnext.settings'); $config->set('prevnext_enabled_entity_types', ['node' => 'node']); $config->set('prevnext_enabled_entity_bundles', ['node' => ['prevnext' => 'prevnext']]); $config->save();
I'm not sure if changing config values during tests is a best practice, but maybe I'm wrong.
- 🇺🇦Ukraine AstonVictor
Hi @aronne,
we change configs only for test env. Configs on the
/admin/config/user-interface/prevnext
won't be affected.
you can even run the test with the disabled module because it will be enabled for tests -protected static $modules = ['node', 'prevnext'];
FYI you can find editing configs in the same way for tests in some core modules as well e.g.
UserPasswordResetTest
\Drupal::configFactory()->getEditable('user.flood') ->set('user_limit', 3) ->save();
thanks
-
AstonVictor →
authored ebd6d018 on 3.0.x
Issue #3412073 by AstonVictor: Cover the module with tests
-
AstonVictor →
authored ebd6d018 on 3.0.x
- Assigned to nikolas.costa
- Status changed to Fixed
10 months ago 10:52am 16 January 2024 Automatically closed - issue fixed for 2 weeks with no activity.