8000 With plugins.php plugin loading testing becomes wonky · Issue #18728 · cakephp/cakephp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
With plugins.php plugin loading testing becomes wonky #18728
Open
@dereuromark

Description

@dereuromark

Description

Plugins are defined in plugins.php now.
It is expected for them to be loaded now throughout the app and as such also throughout the app testing harness.

So when we go into a app plugin and run tests there, we would expect the decimal type for columns of type decimal to be replaced with object as per plugins bootstrap():

public function bootstrap(PluginApplicationInterface $app): void {
	TypeFactory::map('decimal', DecimalObjectType::class);
}

But inside the tests suddenly, the CakeDecimal plugin is not loaded, leaving all patched currencies in string format breaking the whole app.

I would expect those to be loaded just as they would be inside the app.
Having to do any of that manually across the test cases creates a huge mess and likely false positives then for the actual app run instances.

How would we best proceed here to have matching plugins loaded for both app and tests?

CakePHP Version

5.2

PHP Version

8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0