ensure use of assertInstanceOf
arderyp opened this issue · 2 comments
arderyp commented
Example
$this->assertSame(MyClass::class, get_class($object));
should be changed to
$this->assertInstanceOf(MyClass::class, $object);
This is similar to the existing rule about using
$this->assertCount(5, $array);
instead of
$this->assertSame(5, count($array));
ondrejmirtes commented
They are not equivalent.
github-actions commented
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.