-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix tests on Schema index helpers #3236
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
Conversation
388e5fe to
31e6efe
Compare
31e6efe to
58b94c1
Compare
tests/SchemaTest.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the assertion was always true, $index was false for missing index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having assertIndexExists() and assertIndexNotExists() would make the tests more readable if you wanted to go that route. I realize you can't get rid of getIndex() entirely, since some later tests expect to make assertions on the IndexInfo structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion, that's more explicit with the new assert methods.
Uh oh!
There was an error while loading. Please reload this page.
Find index by its actual name instead of the key fields.
Fix wrong assertions checking indexes doesn't exist with the wrong name.