Review main Merged

44819[TASK] Replace assertion method to use dedicated method

Wouter Wolters CR +2 V +2 Easy +3 −3 updated 11/20/15, 15:56

Commit message

PHPUnit assertion method calls like "->assertSame(true, $foo)"
should be written with dedicated method like "->assertTrue($foo)".

Review

  • Code review CR +2
    • Andreas Kienast +2
    • Stefan Neufeind +1
    • Christian Kuhn +1
  • Verified V +2
    • Andreas Kienast +2
    • Christian Kuhn +1

Issues 1

Files 2

Review log 18

  1. Wouter Wolters uploaded patch set 1 11/20/15, 12:02

  2. Markus Klein voted on patch set 1 CR +1 V +1 11/20/15, 12:12

  3. Mathias Brodala commented on patch set 1 CR -1 11/20/15, 12:19

    There are more locations, will push an update.
  4. Mathias Brodala uploaded patch set 2 11/20/15, 12:31

  5. Christian Kuhn commented on patch set 2 V -1 11/20/15, 12:43

    TYPO3\CMS\Extbase\Tests\Unit\Mvc\Web\Routing\UriBuilderTest::resetSetsAllOptionsToTheirDefaultValue Failed asserting that '' is null.
  6. Wouter Wolters commented on patch set 2 11/20/15, 12:44

    please revert to patchset one. This is an automatically script that gives the changes.
  7. Stefan Neufeind uploaded patch set 3 11/20/15, 12:56

  8. Stefan Neufeind commented on patch set 3 CR +1 11/20/15, 12:56

    reverted to patchset #1
  9. Christian Kuhn voted on patch set 3 CR +1 V +1 11/20/15, 13:06

  10. Mathias Brodala voted on patch set 3 CR -1 11/20/15, 13:07

  11. Mathias Brodala commented on patch set 3 11/20/15, 13:07

    Well, then that script needs some tweaks. Patch set #2 is based on a manual search for things like assertTrue(isset( and similar and thus covers more than currently proposed.
  12. Christian Kuhn commented on patch set 3 11/20/15, 13:13

    Not helpful Mathias: The patch from wouter is correct in itself, isnt' it? if you want more for other use cases, please split to a different patch.
  13. Wouter Wolters commented on patch set 3 11/20/15, 13:17

  14. Andreas Kienast voted on patch set 3 V +1 11/20/15, 13:28

  15. Mathias Brodala commented on patch set 3 CR 0 11/20/15, 13:38

    Well, I didn't know what script was used here (would be a nice addition to the commit message) And while the current version is correct it doesn't actually do what it promotes. Anyways, I don't have much time right now but I'll stand with what I said.
  16. Andreas Kienast voted on patch set 3 CR +2 V +2 11/20/15, 13:54

  17. Gerrit merged patch set 3 11/20/15, 13:54

  18. Mathias Brodala commented on patch set 4 11/20/15, 15:56

    It was just pointed out to me that the PHP-CS-Fixer actually already takes care of fixing to assert(Not)Null. What script version was used here?