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

Add baseline tests for Post::get_type() #991

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

obenland
Copy link
Member

Allows us to make changes with more confidence in the future.

Fixes #

Proposed changes:

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Go to '..'

Allows us to make changes with more confidence in the future.
@obenland
Copy link
Member Author

@pfefferle I asked Claude.ai to create some unit tests for the get_type() method as it's written in trunk, so we can compare future changes with those outcomes.

It currently fails for posts without a post format (test_get_type_handles_missing_post_format), probably because of a wrong assumption? Posts with a title, more than 400 char content and no post format should be considered Articles, yes?

@pfefferle
Copy link
Member

@obenland I would say so, yes.

@obenland obenland marked this pull request as ready for review November 14, 2024 02:49
Copy link
Member

@pfefferle pfefferle left a comment

Choose a reason for hiding this comment

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

You are using a different naming convention for the new test. I have no strong feelings about how we should name them, but I would vote for keeping them consistent, so we should work on a follow up PR that renames the other tests.

@obenland
Copy link
Member Author

Yeah I got a phpcs error for the filename without the pre-pended class-. I'll do a follow up.

@obenland obenland merged commit 16f0bf4 into trunk Nov 14, 2024
21 checks passed
@obenland obenland deleted the add/transformer-post-unit-test branch November 14, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants