Closed szepeviktor closed 3 years ago
@jarednova Could you help me here with one small advice?
Dear Viktor! Read the public docs! https://developer.wordpress.org/reference/functions/add_theme_support/#post-thumbnails
Did not help :(
As far as my debugging goes StarterSite::theme_supports()
is not called.
Maybe after_setup_theme
is not fired?
did_action('after_setup_theme')
in the constructor returns 1
Just checked out WordBless, very cool! Let me see if I can get this up locally and figure out what's giving us the problem ...
Maybe because of https://github.com/Automattic/wordbless/issues/27
@szepeviktor I similarly narrowed things down to that place where it (seems) that the after_theme_setup
hook is not triggered. It's supposed to occur on each page load: https://developer.wordpress.org/reference/hooks/after_setup_theme/
So the question here: is each test a page load? Does it even matter? Shouldn't this still execute and have the theme support function loaded?
Everything would be okay if there would be no switch_theme()
in the test setup function.
I just disabled it, but still hit the error? If you're seeing that removing it works, please push so we can check it out!
do_action( 'after_setup_theme' );
My "solution" is to fire that action manually.
The other could be to activate Starter Theme in bootstrap.php
very very nice!
I'm no developer!! Please help me fix
$this->assertTrue(current_theme_supports('post-thumbnails'));