Handful of bug fixes

Created on 19 September 2023, about 1 year ago
Updated 20 September 2023, about 1 year ago

Problem/Motivation

While writing some complicated tests and using this library as a framework, I discovered and fixed a few bugs.

  • Set the root property in src/Stub/ModuleHandlerStub.php. This allows for methods like ::addModule() to function as expected. The module I wrote adds third party settings to a non-core widget so I needed to be able to instantiate the widget within my test. The widget plugin manager will remove any widgets defined by modules that aren't "enabled" in the module_handler service.
  • The ::createFieldItemDefinitionStub method in src/StubFactory/FieldItemListStubFactory.php does not use the $isBaseField argument.
  • The ::initServiceFromYaml method in src/TestHelpers.php does not pass the correct arguments to the service constructor for services that define a parent. For example: most plugin managers.
  • When calling TestHelpers::service() with $initService = TRUE the $mockableMethods are not passed when calling TestHelpers::initService()
πŸ› Bug report
Status

Fixed

Version

1.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States j.cowher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024