assertTrue( current_theme_supports( 'title-tag' ) ); $this->assertTrue( current_theme_supports( 'post-thumbnails' ) ); $this->assertTrue( current_theme_supports( 'responsive-embeds' ) ); $this->assertTrue( current_theme_supports( 'editor-styles' ) ); } /** * Ensure the card crop is available to future card components. */ public function test_card_image_size_is_registered() { $this->assertTrue( has_image_size( 'chrnx-card' ) ); } /** * Ensure the base stylesheet is available in the editor. */ public function test_base_editor_stylesheet_is_registered() { global $editor_styles; $this->assertContains( 'assets/css/base.css', $editor_styles ); } /** * Ensure the local base stylesheet is enqueued with the theme version. */ public function test_base_stylesheet_is_enqueued_locally_with_theme_version() { wp_dequeue_style( 'chrnx-base' ); wp_deregister_style( 'chrnx-base' ); try { do_action( 'wp_enqueue_scripts' ); $styles = wp_styles(); $this->assertTrue( wp_style_is( 'chrnx-base', 'enqueued' ) ); $this->assertArrayHasKey( 'chrnx-base', $styles->registered ); $base = $styles->registered['chrnx-base']; $this->assertSame( get_theme_file_uri( 'assets/css/base.css' ), $base->src ); $this->assertSame( CHRNX_VERSION, $base->ver ); } finally { wp_dequeue_style( 'chrnx-base' ); wp_deregister_style( 'chrnx-base' ); } } }