~ubuntu-branches/ubuntu/wily/symfony/wily

« back to all changes in this revision

Viewing changes to src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToRfc3339TransformerTest.php

  • Committer: Package Import Robot
  • Author(s): David Prévot, Fabien Potencier
  • Date: 2015-06-14 17:15:34 UTC
  • mfrom: (1.3.3)
  • Revision ID: package-import@ubuntu.com-20150614171534-h74z7c7x7hdhz3ra
Tags: 2.7.1+dfsg-1
[ Fabien Potencier ]
updated VERSION for 2.7.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    }
81
81
 
82
82
    /**
 
83
     * @dataProvider transformProvider
 
84
     */
 
85
    public function testTransformDateTimeImmutable($fromTz, $toTz, $from, $to)
 
86
    {
 
87
        if (PHP_VERSION_ID < 50500) {
 
88
            $this->markTestSkipped('DateTimeImmutable was introduced in PHP 5.5.0');
 
89
        }
 
90
 
 
91
        $transformer = new DateTimeToRfc3339Transformer($fromTz, $toTz);
 
92
 
 
93
        $this->assertSame($to, $transformer->transform(null !== $from ? new \DateTimeImmutable($from) : null));
 
94
    }
 
95
 
 
96
    /**
83
97
     * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
84
98
     */
85
99
    public function testTransformRequiresValidDateTime()