~PHPUnit | assertTrue() vs. assertEquals()
assertTrue() with some condition, the error message is often not useful. In this case it is better to use
assertEquals() or similair that produces more meaningful output.
Consider the following example.
// if this test fails... $this->assertTrue($users->count() == 1); // You get the following mesage: "Failed asserting that false is true" // Which doesn't give much information on what happened and where // if this test fails... $this->assertEquals(1, $user->count()); // You get the following message: "Failed asserting that 4 matches expected 1"