You are here

public function ValueExporterTest::testDateTimeImmutable in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/DataCollector/Util/ValueExporterTest.php \Symfony\Component\HttpKernel\Tests\DataCollector\Util\ValueExporterTest::testDateTimeImmutable()

File

vendor/symfony/http-kernel/Tests/DataCollector/Util/ValueExporterTest.php, line 34

Class

ValueExporterTest

Namespace

Symfony\Component\HttpKernel\Tests\DataCollector\Util

Code

public function testDateTimeImmutable() {
  if (!class_exists('DateTimeImmutable', false)) {
    $this
      ->markTestSkipped('Test skipped, class DateTimeImmutable does not exist.');
  }
  $dateTime = new \DateTimeImmutable('2014-06-10 07:35:40', new \DateTimeZone('UTC'));
  $this
    ->assertSame('Object(DateTimeImmutable) - 2014-06-10T07:35:40+0000', $this->valueExporter
    ->exportValue($dateTime));
}