stable
Clone or download
Read-only
Testing controllers can be a pita because of injections and dependencies on hard to build objects. This introduce a bunch of builders to use real objects instead of mocks. By doing so, we avoid introducing logic in tests, tests are more simple to read and focuses on the intend rather than duplicating target code logic. Part of story #14552 User preferences goes Burning Parrot Change-Id: I0f02d1f8370410e9bc866e3fb76aac731903a1c6
Modified Files
Name | ||||
---|---|---|---|---|
M | src/common/templating/TemplateCache.php | +4 | −6 | Go to diff View file |
A | src/common/templating/TemplateCacheInterface.php | +31 | −0 | Go to diff View file |
M | src/common/templating/TemplateRendererFactory.class.php | +5 | −7 | Go to diff View file |
M | src/common/templating/mustache/MustacheEngine.php | +2 | −2 | Go to diff View file |
M | src/common/templating/mustache/MustacheRenderer.class.php | +3 | −3 | Go to diff View file |
A | tests/lib/Builders/HTTPRequestBuilder.php | +54 | −0 | Go to diff View file |
A | tests/lib/Builders/IncludeAssetsBuilder.php | +43 | −0 | Go to diff View file |
A | tests/lib/Builders/LayoutBuilder.php | +62 | −0 | Go to diff View file |
A | tests/lib/Builders/TemplateRendererFactoryBuilder.php | +74 | −0 | Go to diff View file |
M | tests/lib/Builders/UserTestBuilder.php | +7 | −2 | Go to diff View file |
M | tests/phpunit/common/User/Account/DisplayKeysTokensControllerTest.php | +24 | −30 | Go to diff View file |