You are here

public function Framework_MockBuilderTest::testOriginalCloneCanBeDisabled in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php \Framework_MockBuilderTest::testOriginalCloneCanBeDisabled()

File

vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php, line 79

Class

Framework_MockBuilderTest
@since File available since Release 1.0.0

Code

public function testOriginalCloneCanBeDisabled() {
  $spec = $this
    ->getMockBuilder('Mockable');
  $spec
    ->disableOriginalClone();
  $mock = $spec
    ->getMock();
  $mock->cloned = false;
  $cloned = clone $mock;
  $this
    ->assertFalse($cloned->cloned);
}