Closed andresilvagomez closed 4 years ago
@dillingham Right, the idea is don't check any more, only if that relation should be present !!!
PHPUnit::assertTrue($callable ? $callable($results) ?? true : true);
Im a little sleepy but at first glance, this looks like it just checks if callable is not null, if it is null assert true is true?
PHPUnit::assertTrue($callable ? $callable($results) ?? true : true);
$callable ? is present : default = true
if callable is present $callable($results) ?? true
the clousure return a value $callable($results)
else asign 'true' by default
PHPUnit::assertTrue($callable ? $callable($results) ?? true : true);
Im a little sleepy but at first glance, this looks like it just checks if callable is not null, if it is null assert true is true?
the shot answer is true
Sorry, still not clear why we would assert true == true. Doesnt seem like thats checking if the relation is present.
I would assume that the following would assert categories are present
Im not really clear on this, can you explain more?