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

Layout: unit tests for gutenberg_get_layout_style #44006

Merged
merged 3 commits into from
Sep 9, 2022

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Sep 9, 2022

What?

Adding tests for gutenberg_get_layout_style()

Why?

To increase coverage and the chance of catching breaking changes.

Testing Instructions

npm run test:unit:php /var/www/html/wp-content/plugins/gutenberg/phpunit/block-supports/layout-test.php

@ramonjd ramonjd added the [Type] Code Quality Issues or PRs that relate to code quality label Sep 9, 2022
@ramonjd ramonjd self-assigned this Sep 9, 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.

Nice one thanks for adding these in @ramonjd! Each of the tests' passed in and expected values look good to me. Just left a few suggestions to update the names of some of the tests, but otherwise LGTM! ✨

phpunit/block-supports/layout-test.php Outdated Show resolved Hide resolved
phpunit/block-supports/layout-test.php Outdated Show resolved Hide resolved
phpunit/block-supports/layout-test.php Outdated Show resolved Hide resolved
phpunit/block-supports/layout-test.php Outdated Show resolved Hide resolved
phpunit/block-supports/layout-test.php Outdated Show resolved Hide resolved
phpunit/block-supports/layout-test.php Outdated Show resolved Hide resolved
@ramonjd
Copy link
Member Author

ramonjd commented Sep 9, 2022

Thanks for testing @andrewserong !!!

Just left a few suggestions to update the names of some of the tests

Yeah, I might have rushed things a bit in the end 😄 Appreciate you picking those up.

ramonjd and others added 2 commits September 9, 2022 19:50
@ramonjd ramonjd merged commit 71b70df into trunk Sep 9, 2022
@ramonjd ramonjd deleted the add/layout-block-supports-unit-tests branch September 9, 2022 11:01
@github-actions github-actions bot added this to the Gutenberg 14.1 milestone Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants