Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I do a strict equals/triple equals comparison in phpunit?

How do I do a ===/strict equals comparison in phpunit?

like image 363
Matthew Flaschen Avatar asked Jan 14 '13 02:01

Matthew Flaschen


Video Answer


1 Answers

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).

like image 151
Matthew Flaschen Avatar answered Oct 28 '22 05:10

Matthew Flaschen