You are here

public function Framework_MockObjectTest::testClonedMockObjectIsNotIdenticalToOriginalOne in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php \Framework_MockObjectTest::testClonedMockObjectIsNotIdenticalToOriginalOne()

File

vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php, line 455

Class

Framework_MockObjectTest
@since Class available since Release 3.0.0

Code

public function testClonedMockObjectIsNotIdenticalToOriginalOne() {
  $x = $this
    ->getMock('stdClass');
  $y = clone $x;
  $mock = $this
    ->getMock('stdClass', array(
    'foo',
  ));
  $mock
    ->expects($this
    ->once())
    ->method('foo')
    ->with($this
    ->logicalNot($this
    ->identicalTo($x)));
  $mock
    ->foo($y);
}