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
Ejemplo n.º 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);
}
Ejemplo n.º 2
0
 /**
  * Test that the map keys & values are direct references to the
  * original array values passed in during map creation
  *
  * @covers \ERP\ComplexMap::__constructor
  */
 public function testConstructor()
 {
     \PHPUnit_Framework_Assert::assertAttributeSame($this->keys, 'keys', $this->complexMap);
     \PHPUnit_Framework_Assert::assertAttributeSame($this->values, 'values', $this->complexMap);
     \PHPUnit_Framework_Assert::assertAttributeNotSame($this->getTestKeys(), 'keys', $this->complexMap);
     \PHPUnit_Framework_Assert::assertAttributeNotSame($this->getTestValues(), 'values', $this->complexMap);
 }