Conversation
Contributor
|
Maybe testing that it doesn't throw an exception? Strange indeed... As you suggested once, it would be best to rewrite the whole test while re-working the methods on |
Benestar
added a commit
that referenced
this pull request
Feb 18, 2016
Remove dead code from ReferenceListTest
thiemowmde
pushed a commit
that referenced
this pull request
Feb 18, 2016
Remove dead code from ReferenceListTest
Contributor
Author
|
Rewrite step by step, along with the code we touch. |
| $array->removeReference( $element ); | ||
| $array->removeReference( $element ); | ||
|
|
||
| $this->assertTrue( true ); |
Contributor
There was a problem hiding this comment.
Now the test will not make any assertions for empty lists. This test design is not nice, though now you will get warnings in strict mode if I'm not mistaken
Contributor
Author
There was a problem hiding this comment.
I tried again to be sure. No bad things happen in strict mode. CI does not complain, too.
Contributor
There was a problem hiding this comment.
Maybe PHPUnit changed this... I remember running into this several times near the start of the project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Can you imagine what the
$this->assertTrue( true )and the lines above was meant to do? I tracked it down to commit c721869f41fa0637a7171a61526b34acfaee4101 (on Gerrit). To me it appears to be a mistake.