PHPUnit_Framework_Assert::assertAttributeSame PHP Method

assertAttributeSame() public static method

Asserts that a variable and an attribute of an object have the same type and value.
public static assertAttributeSame ( mixed $expected, string $actualAttributeName, string | object $actualClassOrObject, string $message = '' )
$expected mixed
$actualAttributeName string
$actualClassOrObject string | object
$message string
    public static function assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
    {
        static::assertSame($expected, static::readAttribute($actualClassOrObject, $actualAttributeName), $message);
    }

Usage Example

Example #1
0
/**
 * Asserts that a variable and an attribute of an object have the same type
 * and value.
 *
 * @param  mixed  $expected
 * @param  string $actualAttributeName
 * @param  object $actualClassOrObject
 * @param  string $message
 */
function assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
{
    return PHPUnit_Framework_Assert::assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message);
}
All Usage Examples Of PHPUnit_Framework_Assert::assertAttributeSame
PHPUnit_Framework_Assert