Skip to content

Conversation

@JakeQZ
Copy link
Collaborator

@JakeQZ JakeQZ commented Dec 9, 2025

This fixes an issue noted in #1324.

@JakeQZ JakeQZ requested a review from oliverklee December 9, 2025 14:26
@JakeQZ JakeQZ self-assigned this Dec 9, 2025
@JakeQZ JakeQZ added the bug label Dec 9, 2025
@coveralls
Copy link

coveralls commented Dec 9, 2025

Coverage Status

coverage: 63.014% (+0.2%) from 62.804%
when pulling 268f57c on bugfix/setselectors
into a5d1172 on main.

*/
public function setSelectorsThrowsExceptionWithInvalidSelector(string $selector): void
{
$this->expectException(UnexpectedTokenException::class);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should also check for the exception message.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I looked at the messages and found they were unhelpful, so have fixed that.

I also found that the exceptions thrown by the code when { or end of string were not as expected were not being tested, so have added more test data for that.

Also make it more useful.

And add additional test data to fully exercise the code.
@JakeQZ JakeQZ requested a review from oliverklee December 9, 2025 18:32
@oliverklee oliverklee merged commit 8d123a2 into main Dec 9, 2025
23 checks passed
@oliverklee oliverklee deleted the bugfix/setselectors branch December 9, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants