How do I do a ===/strict equals comparison in phpunit?
Asked
Active
Viewed 2,443 times
1 Answers
26
Use assertSame. It checks that the type and value are the same.
For objects, this will check that they "reference the same object" (object identity).

Matthew Flaschen
- 278,309
- 50
- 514
- 539
-
1What is the functions that can compare two different objects, but with exactly the same poperties? Like `assertSame()`, that checks everything excep for the reference. – Danon Apr 15 '20 at 23:26