"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/symfony/symfony/src/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/DateTimeToTimestampTransformerTest.php" between
phplist-3.4.5.tgz and phplist-3.4.6.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

DateTimeToTimestampTransformerTest.php  (phplist-3.4.5.tgz):DateTimeToTimestampTransformerTest.php  (phplist-3.4.6.tgz)
skipping to change at line 75 skipping to change at line 75
$output = $input->format('U'); $output = $input->format('U');
$input = $input->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); $input = $input->setTimezone(new \DateTimeZone('Asia/Hong_Kong'));
$this->assertEquals($output, $transformer->transform($input)); $this->assertEquals($output, $transformer->transform($input));
} }
public function testTransformExpectsDateTime() public function testTransformExpectsDateTime()
{ {
$transformer = new DateTimeToTimestampTransformer(); $transformer = new DateTimeToTimestampTransformer();
$this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpected Exception'}('Symfony\Component\Form\Exception\TransformationFailedException'); $this->expectException('Symfony\Component\Form\Exception\TransformationF ailedException');
$transformer->transform('1234'); $transformer->transform('1234');
} }
public function testReverseTransform() public function testReverseTransform()
{ {
$reverseTransformer = new DateTimeToTimestampTransformer('UTC', 'UTC'); $reverseTransformer = new DateTimeToTimestampTransformer('UTC', 'UTC');
$output = new \DateTime('2010-02-03 04:05:06 UTC'); $output = new \DateTime('2010-02-03 04:05:06 UTC');
$input = $output->format('U'); $input = $output->format('U');
skipping to change at line 112 skipping to change at line 112
$input = $output->format('U'); $input = $output->format('U');
$output->setTimezone(new \DateTimeZone('Asia/Hong_Kong')); $output->setTimezone(new \DateTimeZone('Asia/Hong_Kong'));
$this->assertEquals($output, $reverseTransformer->reverseTransform($inpu t)); $this->assertEquals($output, $reverseTransformer->reverseTransform($inpu t));
} }
public function testReverseTransformExpectsValidTimestamp() public function testReverseTransformExpectsValidTimestamp()
{ {
$reverseTransformer = new DateTimeToTimestampTransformer(); $reverseTransformer = new DateTimeToTimestampTransformer();
$this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpected Exception'}('Symfony\Component\Form\Exception\TransformationFailedException'); $this->expectException('Symfony\Component\Form\Exception\TransformationF ailedException');
$reverseTransformer->reverseTransform('2010-2010-2010'); $reverseTransformer->reverseTransform('2010-2010-2010');
} }
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)