Changeset 55008 for trunk/tests/phpunit/tests/theme/wpThemeJson.php
- Timestamp:
- 12/19/2022 08:53:15 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/theme/wpThemeJson.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpThemeJson.php
r54889 r55008 4091 4091 ); 4092 4092 } 4093 4094 /** 4095 * @ticket 57354 4096 */ 4097 public function test_get_stylesheet_returns_outline_styles() { 4098 $theme_json = new WP_Theme_JSON( 4099 array( 4100 'version' => WP_Theme_JSON::LATEST_SCHEMA, 4101 'styles' => array( 4102 'elements' => array( 4103 'button' => array( 4104 'outline' => array( 4105 'offset' => '3px', 4106 'width' => '3px', 4107 'style' => 'dashed', 4108 'color' => 'red', 4109 ), 4110 ':hover' => array( 4111 'outline' => array( 4112 'offset' => '3px', 4113 'width' => '3px', 4114 'style' => 'solid', 4115 'color' => 'blue', 4116 ), 4117 ), 4118 ), 4119 ), 4120 ), 4121 ) 4122 ); 4123 4124 $base_styles = 'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }'; 4125 4126 $element_styles = '.wp-element-button, .wp-block-button__link{outline-color: red;outline-offset: 3px;outline-style: dashed;outline-width: 3px;}.wp-element-button:hover, .wp-block-button__link:hover{outline-color: blue;outline-offset: 3px;outline-style: solid;outline-width: 3px;}'; 4127 4128 $expected = $base_styles . $element_styles; 4129 $this->assertSame( $expected, $theme_json->get_stylesheet() ); 4130 } 4093 4131 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)