You are here

public static function PHPUnit_Framework_Assert::assertSame in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/Assert.php \PHPUnit_Framework_Assert::assertSame()

Asserts that two variables have the same type and value. Used on objects, it asserts that two variables reference the same object.

Parameters

mixed $expected:

mixed $actual:

string $message:

101 calls to PHPUnit_Framework_Assert::assertSame()
ConstraintViolationAssertion::assertRaised in vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php
FailureTest::testAssertFloatSameFloat in vendor/phpunit/phpunit/tests/_files/FailureTest.php
FailureTest::testAssertObjectSameNull in vendor/phpunit/phpunit/tests/_files/FailureTest.php
FailureTest::testAssertObjectSameObject in vendor/phpunit/phpunit/tests/_files/FailureTest.php
FailureTest::testAssertTextSameText in vendor/phpunit/phpunit/tests/_files/FailureTest.php

... See full list

File

vendor/phpunit/phpunit/src/Framework/Assert.php, line 1165

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function assertSame($expected, $actual, $message = '') {
  if (is_bool($expected) && is_bool($actual)) {
    self::assertEquals($expected, $actual, $message);
  }
  else {
    $constraint = new PHPUnit_Framework_Constraint_IsIdentical($expected);
    self::assertThat($actual, $constraint, $message);
  }
}