public function KernelTest::testClone

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/KernelTest.php, line 45

Class

KernelTest

Namespace

Symfony\Component\HttpKernel\Tests

Code

public function testClone() {
  $env = 'test_env';
  $debug = true;
  $kernel = new KernelForTest($env, $debug);
  $clone = clone $kernel;
  $this
    ->assertEquals($env, $clone
    ->getEnvironment());
  $this
    ->assertEquals($debug, $clone
    ->isDebug());
  $this
    ->assertFalse($clone
    ->isBooted());
  $this
    ->assertLessThanOrEqual(microtime(true), $clone
    ->getStartTime());
  $this
    ->assertNull($clone
    ->getContainer());
}