-
Notifications
You must be signed in to change notification settings - Fork 144
[TASK] Deprecate __toString()
#1006
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
ae638c5
to
293df81
Compare
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.
The deprecation notices are all fine, but the moving of a test would seem to belong in a separate PR (if required at all).
/** | ||
* @test | ||
*/ | ||
public function toStringRendersCommentEnclosedInCommentDelimiters(): void |
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.
Why is this method being moved here to test something that's deprecated? Shouldn't the introduction of the test class be a separate PR?
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.
I'm moving this one test from Tests/Functional/
to Tests/FunctionalDeprecated/
, where tests for deprecated functionality should be placed. (This will allow us to have different PHPUnit configuration files later on, allowing calls to deprecated functionality in Tests/FunctionalDeprecated/
, but not in Tests/Functional/
.)
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.
Apologies. I overlooked the location of where this was being moved to, and instead assumed (without looking) it was a new test class being created in the tests/Unit
directory.
That said, I'm now wondering why the CommentTest
class is in Functional
rather than Unit
, given that it appears to be a unit test for the Comment
class - but that's beyond the scope of this PR.
Part of #998
293df81
to
595da81
Compare
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.
My mistake in previous review. Though I do have a further question in the comments.
/** | ||
* @test | ||
*/ | ||
public function toStringRendersCommentEnclosedInCommentDelimiters(): void |
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.
Apologies. I overlooked the location of where this was being moved to, and instead assumed (without looking) it was a new test class being created in the tests/Unit
directory.
That said, I'm now wondering why the CommentTest
class is in Functional
rather than Unit
, given that it appears to be a unit test for the Comment
class - but that's beyond the scope of this PR.
I see the tests for |
I (originally) saw the functional tests department as mainly a place for testing the various CSS conent that is in |
Part of #998