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

Using assertSame to improve assertEquals #142

Merged
merged 1 commit into from
Apr 15, 2021

Conversation

peter279k
Copy link
Contributor

Changed log

  • Some assertEquals is not correct approach to assert values. It should use the assertSame to assert that expected is same as result because some result is InputDatatum object and it's not same as string type.
    Using the casting syntax to convert above object to string before doing some assertions.

@g105b
Copy link
Member

g105b commented Apr 15, 2021

Thank you @peter279k.

This is certainly an improvement to the way the unit tests work. What do you think about introducing the Stringable interface on the Input Datum classes, so it will become more obvious that the object can be cast to a string?

@g105b g105b merged commit 1393366 into PhpGt:master Apr 15, 2021
@peter279k peter279k deleted the improve_test_stuffs branch April 15, 2021 16:49
@peter279k
Copy link
Contributor Author

Hi @g105b, thanks for your reply. I think this work you mention is about enhancement.

I think it's okay to improve that. If you also want to do that, please submit the issue and describe current approach so that I can follow the step to implement that :).

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