public function LegacyExecutionContextTest::testClone in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/Tests/LegacyExecutionContextTest.php \Symfony\Component\Validator\Tests\LegacyExecutionContextTest::testClone()
File
- vendor/symfony/ validator/ Tests/ LegacyExecutionContextTest.php, line 81 
Class
- LegacyExecutionContextTest
- @group legacy
Namespace
Symfony\Component\Validator\TestsCode
public function testClone() {
  $clone = clone $this->context;
  // Cloning the context keeps the reference to the original violation
  // list. This way we can efficiently duplicate context instances during
  // the validation run and only modify the properties that need to be
  // changed.
  $this
    ->assertSame($this->context
    ->getViolations(), $clone
    ->getViolations());
}