Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style engine: add unit test coverage for WP_Style_Engine_CSS_Declarations #42306

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jul 11, 2022

What? How? Why?

This PR adds unit tests for the class WP_Style_Engine_CSS_Declarations.

It also checks the validity of values for styles that are arrays, e.g., margin: { top: blah }

Testing Instructions

npm run test-unit-php /var/www/html/wp-content/plugins/gutenberg/packages/style-engine/phpunit/class-wp-style-engine-css-declarations-test.php
npm run test-unit-php /var/www/html/wp-content/plugins/gutenberg/packages/style-engine/phpunit/class-wp-style-engine-test.php

Checking validity of values for array styles
@ramonjd ramonjd added [Type] Code Quality Issues or PRs that relate to code quality [Type] Experimental Experimental feature or API. [Package] Style Engine /packages/style-engine labels Jul 11, 2022
@ramonjd ramonjd requested review from aristath and andrewserong July 11, 2022 04:28
@ramonjd ramonjd self-assigned this Jul 11, 2022
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch with the valid 0 value. Test coverage looks good to me! ✨

@ramonjd ramonjd merged commit 9bea30e into trunk Jul 11, 2022
@ramonjd ramonjd deleted the add/style-engine-extra-unit-tests branch July 11, 2022 06:04
@github-actions github-actions bot added this to the Gutenberg 13.7 milestone Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Style Engine /packages/style-engine [Type] Code Quality Issues or PRs that relate to code quality [Type] Experimental Experimental feature or API.
Projects
Status: 🏆 Done
Development

Successfully merging this pull request may close these issues.

3 participants