assertSame
AssertSame is a unit testing assertion used to verify the identity of two values or references. The precise meaning depends on the testing framework and language, but it generally tests for referential identity or exact sameness rather than mere value equality. An assertion with the same name in different ecosystems may thus have slightly different semantics.
In PHP's PHPUnit, assertSame($expected, $actual, $message = '') checks that $expected === $actual. For scalars, this means identical value
In Java's JUnit, assertSame(Object expected, Object actual) asserts that expected == actual, i.e., the two references refer
A companion assertion, assertNotSame, is used to verify that two references do not refer to the same
See also: assertNotSame, assertEquals, assertIs (in some languages).