Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/phpunit/tests/dependencies/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ public function test_wp_edit_blocks_depends_on_wp_theme_first() {
}

/**
* @group assets
*
* @ticket 58394
* @ticket 63887
*
Expand Down Expand Up @@ -745,6 +747,8 @@ public function test_wp_maybe_inline_styles_dequeue_styles() {
* wp_filesize should be only be called once, as on the second run of wp_maybe_inline_styles,
* src will be set to false and filesize will not be requested.
*
* @group assets
*
* @ticket 58394
*
* @covers ::wp_maybe_inline_styles
Expand Down Expand Up @@ -853,6 +857,8 @@ static function ( $size, $path ) use ( $style_path ) {
}

/**
* @group assets
*
* @ticket 64447
*
* @covers ::wp_maybe_inline_styles
Expand Down
27 changes: 27 additions & 0 deletions tests/phpunit/tests/oembed/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public function tear_down() {
$wp_scripts = null;
}

/**
* @group assets
*/
public function test_oembed_output_post() {
$user = self::factory()->user->create_and_get(
array(
Expand Down Expand Up @@ -51,6 +54,9 @@ public function test_oembed_output_post() {
$this->assertStringContainsString( 'Hello World', $actual );
}

/**
* @group assets
*/
public function test_oembed_output_post_with_thumbnail() {
$post_id = self::factory()->post->create(
array(
Expand Down Expand Up @@ -84,6 +90,9 @@ public function test_oembed_output_post_with_thumbnail() {
$this->assertStringContainsString( 'canola.jpg', $actual );
}

/**
* @group assets
*/
public function test_oembed_output_404() {
$this->go_to( home_url( '/?p=123&embed=true' ) );
$GLOBALS['wp_query']->query_vars['embed'] = true;
Expand All @@ -99,6 +108,9 @@ public function test_oembed_output_404() {
$this->assertStringContainsString( 'That embed cannot be found.', $actual );
}

/**
* @group assets
*/
public function test_oembed_output_attachment() {
$post = self::factory()->post->create_and_get();
$file = DIR_TESTDATA . '/images/canola.jpg';
Expand Down Expand Up @@ -128,6 +140,9 @@ public function test_oembed_output_attachment() {
$this->assertStringContainsString( 'canola.jpg', $actual );
}

/**
* @group assets
*/
public function test_oembed_output_draft_post() {
$post_id = self::factory()->post->create(
array(
Expand All @@ -151,6 +166,9 @@ public function test_oembed_output_draft_post() {
$this->assertStringContainsString( 'That embed cannot be found.', $actual );
}

/**
* @group assets
*/
public function test_oembed_output_scheduled_post() {
$post_id = self::factory()->post->create(
array(
Expand All @@ -175,6 +193,9 @@ public function test_oembed_output_scheduled_post() {
$this->assertStringContainsString( 'That embed cannot be found.', $actual );
}

/**
* @group assets
*/
public function test_oembed_output_private_post() {
$post_id = self::factory()->post->create(
array(
Expand All @@ -198,6 +219,9 @@ public function test_oembed_output_private_post() {
$this->assertStringContainsString( 'That embed cannot be found.', $actual );
}

/**
* @group assets
*/
public function test_oembed_output_private_post_with_permissions() {
$user_id = self::factory()->user->create( array( 'role' => 'editor' ) );
wp_set_current_user( $user_id );
Expand Down Expand Up @@ -286,6 +310,9 @@ public function test_get_post_embed_html_non_existent_post() {
$this->assertFalse( get_post_embed_html( 200, 200 ) );
}

/**
* @group assets
*/
public function test_get_post_embed_html() {
$post_id = self::factory()->post->create();
$title = esc_attr(
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/tests/script-modules/wpScriptModules.php
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,8 @@ public function test_default_script_modules() {
* otherwise the import map points to a non-existent file under
* SCRIPT_DEBUG. The exceptions below must mirror that special case.
*
* @group assets
*
* @ticket 65664
*
* @covers ::wp_default_script_modules
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/tests/shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ public function data_whole_posts() {
/**
* Ensure the shortcode attribute regex is the same in both the PHP and JS implementations.
*
* @group assets
*
* @ticket 34191
* @ticket 51734
*/
Expand Down
2 changes: 2 additions & 0 deletions tests/phpunit/tests/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,8 @@ static function ( $path, $file ) {
/**
* Tests that wp_hoist_late_printed_styles() adds a placeholder for delayed CSS, then removes it and adds all CSS to the head including late enqueued styles.
*
* @group assets
*
* @ticket 64099
* @ticket 64354
* @covers ::wp_load_classic_theme_block_styles_on_demand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public function test_hook() {
/**
* Tests that the admin view transitions style handle includes the inline CSS.
*
* @group assets
*
* @ticket 64470
*
* @covers ::wp_get_view_transitions_admin_css
Expand All @@ -55,6 +57,8 @@ public function test_inline_css_included() {
/**
* Tests enqueuing admin view transitions CSS.
*
* @group assets
*
* @ticket 64470
*/
public function test_wp_enqueue_view_transitions_admin_css() {
Expand Down
Loading