- Issue created by @larowlan
- 🇮🇳India Akhil Babu Chengannur
I think this test is for the ApiComponentsController
https://git.drupalcode.org/project/experience_builder/-/blob/0.x/tests/s... - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
this will also give us OpenAPI validation of the response
The end-to-end tests should already run that.
That being said: I'm not opposed! 😄 We were just not writing kernel tests for every (API) controller and relying on end-to-end tests to catch blatant problems (like OpenAPI violations) instead.
I do hear from @longwave that having kernel tests made development significantly faster for him, which is why he added a kernel test for
ApiLayoutController
for example, in 📌 Add PHP test coverage of layout controller Active .(This route is IIRC literally the first XB route, hence we were trying to bootstrap XB at the time — too much was unknown/changing back then to write a kernel test. Now the time is right 👍)
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Maybe we add @covers to the existing test or make it follow the naming pattern of [ClassUnderTest]Test.php?
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Ah it already has @covers
I think this can be closed 'works as designed' unless you're keen on having a kernel test.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
ApiComponentsController
is gone as of 📌 Improve or remove ComponentSourceInterface::getClientSideInfo() Active .We should still refactor
PropSourceEndpointTest
intoXbConfigEntityHttpApiTest::testComponent()
, but there's so much cruft in there anyway that's going to have to change for 🌱 [later phase] [META] 7. Content type templates — aka "default layouts" — affects the tree+props data model Active fairly soon, that I think "just" this MR is progress enough.Repurposing this for that.