- Issue created by @Anybody
- First commit to issue fork.
- First commit to issue fork.
- πΊπ¦Ukraine UsingSession
usingsession β changed the visibility of the branch 3494257-custom-tokens-tests to hidden.
- π©πͺGermany lrwebks Porta Westfalica
I am not really able to move forward with this, as I don't really get behind the logic of how the custom tokens are stored. In the DB, it is sitting as a regular content entity in a separate table βtoken_custom_field_dataβ and also as the only one of its kind (since the test only creates a single custom token). When I try to load it as I would load a content entity:
$custom_token = \Drupal::entityTypeManager()->getStorage('token_custom')->load(1);
it simply doesn't work. I have researched a bit and tried different ways of loading the custom tokens, but it always returns `NULL`.
Does anyone have an idea as to what I'm doing wrong here? - π©πͺGermany Anybody Porta Westfalica
@lrwebks you should be able to do all that in the UI, from adding the value to checking the result in the table overview.
No API calls needed - π©πͺGermany lrwebks Porta Westfalica
@anybody But isn't it a bit sloppy for the first test (the one that is testing the form functionality) to rely on the UI result instead of checking actually saved data?
- π©πͺGermany Anybody Porta Westfalica
No, we actually want to check the UI part here. And btw. this can't be combined technically, that's the reason for your issues :) I'll show you soon, personally.
- π©πͺGermany lrwebks Porta Westfalica
I will also add a test for creating a custom token type before this is reviewed.
-
anybody β
committed 5ef5eedb on 8.x-1.x authored by
lrwebks β
Issue #3494257 by lrwebks, anybody: Write tests
-
anybody β
committed 5ef5eedb on 8.x-1.x authored by
lrwebks β
- Status changed to Fixed
about 2 months ago 11:49am 17 February 2025 Automatically closed - issue fixed for 2 weeks with no activity.