Permalink
Browse files

Merge branch '2.1'

* 2.1:
  [Yaml] fixed default value
  Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
  added a way to enable/disable object support when parsing/dumping
  added a way to enable/disable PHP support when parsing a YAML input via Yaml::parse()
  fixed CS
  [Process] Fix docblocks, remove `return` from `PhpProcess#start()` as parent returns nothing, cleaned up `ExecutableFinder`
  fixes a bug when output/error output contains a % character
  [Console] fixed input bug when the value of an option is empty (closes #6649, closes #6689)
  [Profiler] [Redis] Fix sort of profiler rows.
  Fix version_compare() calls for PHP 5.5.
  Removed underscores from test method names to be consistent with other components.
  [Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)
  Fix version_compare() calls for PHP 5.5.
  Handle the deprecation of IntlDateFormatter::setTimeZoneId() in PHP 5.5.
  removed the .gitattributes files (closes #6605, reverts #5674)
  [HttpKernel] Clarify misleading comment in ExceptionListener

Conflicts:
	src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_style.html.twig
	src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTimeTypeTest.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/TimeTypeTest.php
	src/Symfony/Component/Form/Tests/Util/PropertyPathTest.php
	src/Symfony/Component/HttpKernel/Profiler/RedisProfilerStorage.php
	src/Symfony/Component/Process/Process.php
  • Loading branch information...
2 parents d5dc2ac + 36f95a1 commit 2e5a527a8d5cf475ab318a6957cab7e2413d2623 @fabpot fabpot committed Jan 17, 2013
View
@@ -1,2 +0,0 @@
-/Tests export-ignore
-phpunit.xml.dist export-ignore
@@ -268,7 +268,11 @@ private function formatTimestamps(\IntlDateFormatter $formatter, $regex, array $
$pattern = $formatter->getPattern();
$timezone = $formatter->getTimezoneId();
- $formatter->setTimezoneId(\DateTimeZone::UTC);
+ if (version_compare(\PHP_VERSION, '5.5.0-dev', '>=')) {
+ $formatter->setTimeZone(\DateTimeZone::UTC);
+ } else {
+ $formatter->setTimeZoneId(\DateTimeZone::UTC);
+ }
if (preg_match($regex, $pattern, $matches)) {
$formatter->setPattern($matches[0]);
@@ -282,7 +286,11 @@ private function formatTimestamps(\IntlDateFormatter $formatter, $regex, array $
$formatter->setPattern($pattern);
}
- $formatter->setTimezoneId($timezone);
+ if (version_compare(\PHP_VERSION, '5.5.0-dev', '>=')) {
+ $formatter->setTimeZone($timezone);
+ } else {
+ $formatter->setTimeZoneId($timezone);
+ }
return $timestamps;
}
@@ -57,7 +57,7 @@ public function testTransform()
$this->assertSame($output, $this->transformer->transform($input));
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$output = array(
'first' => null,
@@ -102,7 +102,7 @@ public function testReverseTransform()
$this->assertSame($output, $this->transformer->reverseTransform($input));
}
- public function testReverseTransform_completelyEmpty()
+ public function testReverseTransformCompletelyEmpty()
{
$input = array(
'first' => '',
@@ -112,7 +112,7 @@ public function testReverseTransform_completelyEmpty()
$this->assertNull($this->transformer->reverseTransform($input));
}
- public function testReverseTransform_completelyNull()
+ public function testReverseTransformCompletelyNull()
{
$input = array(
'first' => null,
@@ -125,7 +125,7 @@ public function testReverseTransform_completelyNull()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testReverseTransform_partiallyNull()
+ public function testReverseTransformPartiallyNull()
{
$input = array(
'first' => array(
@@ -33,7 +33,7 @@ public function testTransform()
$this->assertSame($output, $transformer->transform($input));
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$transformer = new DateTimeToArrayTransformer();
@@ -49,7 +49,7 @@ public function testTransform_empty()
$this->assertSame($output, $transformer->transform(null));
}
- public function testTransform_empty_withFields()
+ public function testTransformEmptyWithFields()
{
$transformer = new DateTimeToArrayTransformer(null, null, array('year', 'minute', 'second'));
@@ -62,7 +62,7 @@ public function testTransform_empty_withFields()
$this->assertSame($output, $transformer->transform(null));
}
- public function testTransform_withFields()
+ public function testTransformWithFields()
{
$transformer = new DateTimeToArrayTransformer('UTC', 'UTC', array('year', 'month', 'minute', 'second'));
@@ -78,7 +78,7 @@ public function testTransform_withFields()
$this->assertSame($output, $transformer->transform($input));
}
- public function testTransform_withPadding()
+ public function testTransformWithPadding()
{
$transformer = new DateTimeToArrayTransformer('UTC', 'UTC', null, true);
@@ -96,7 +96,7 @@ public function testTransform_withPadding()
$this->assertSame($output, $transformer->transform($input));
}
- public function testTransform_differentTimezones()
+ public function testTransformDifferentTimezones()
{
$transformer = new DateTimeToArrayTransformer('America/New_York', 'Asia/Hong_Kong');
@@ -161,7 +161,7 @@ public function testReverseTransformWithSomeZero()
$this->assertDateTimeEquals($output, $transformer->reverseTransform($input));
}
- public function testReverseTransform_completelyEmpty()
+ public function testReverseTransformCompletelyEmpty()
{
$transformer = new DateTimeToArrayTransformer();
@@ -177,7 +177,7 @@ public function testReverseTransform_completelyEmpty()
$this->assertNull($transformer->reverseTransform($input));
}
- public function testReverseTransform_completelyEmpty_subsetOfFields()
+ public function testReverseTransformCompletelyEmptySubsetOfFields()
{
$transformer = new DateTimeToArrayTransformer(null, null, array('year', 'month', 'day'));
@@ -193,7 +193,7 @@ public function testReverseTransform_completelyEmpty_subsetOfFields()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testReverseTransform_partiallyEmpty_year()
+ public function testReverseTransformPartiallyEmptyYear()
{
$transformer = new DateTimeToArrayTransformer();
$transformer->reverseTransform(array(
@@ -208,7 +208,7 @@ public function testReverseTransform_partiallyEmpty_year()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testReverseTransform_partiallyEmpty_month()
+ public function testReverseTransformPartiallyEmptyMonth()
{
$transformer = new DateTimeToArrayTransformer();
$transformer->reverseTransform(array(
@@ -223,7 +223,7 @@ public function testReverseTransform_partiallyEmpty_month()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testReverseTransform_partiallyEmpty_day()
+ public function testReverseTransformPartiallyEmptyDay()
{
$transformer = new DateTimeToArrayTransformer();
$transformer->reverseTransform(array(
@@ -238,7 +238,7 @@ public function testReverseTransform_partiallyEmpty_day()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testReverseTransform_partiallyEmpty_hour()
+ public function testReverseTransformPartiallyEmptyHour()
{
$transformer = new DateTimeToArrayTransformer();
$transformer->reverseTransform(array(
@@ -253,7 +253,7 @@ public function testReverseTransform_partiallyEmpty_hour()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testReverseTransform_partiallyEmpty_minute()
+ public function testReverseTransformPartiallyEmptyMinute()
{
$transformer = new DateTimeToArrayTransformer();
$transformer->reverseTransform(array(
@@ -268,7 +268,7 @@ public function testReverseTransform_partiallyEmpty_minute()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testReverseTransform_partiallyEmpty_second()
+ public function testReverseTransformPartiallyEmptySecond()
{
$transformer = new DateTimeToArrayTransformer();
$transformer->reverseTransform(array(
@@ -280,14 +280,14 @@ public function testReverseTransform_partiallyEmpty_second()
));
}
- public function testReverseTransform_null()
+ public function testReverseTransformNull()
{
$transformer = new DateTimeToArrayTransformer();
$this->assertNull($transformer->reverseTransform(null));
}
- public function testReverseTransform_differentTimezones()
+ public function testReverseTransformDifferentTimezones()
{
$transformer = new DateTimeToArrayTransformer('America/New_York', 'Asia/Hong_Kong');
@@ -121,14 +121,14 @@ public function testTransformToDifferentLocale()
$this->assertEquals('Feb 3, 2010 4:05 AM', $transformer->transform($this->dateTime));
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$transformer = new DateTimeToLocalizedStringTransformer();
$this->assertSame('', $transformer->transform(null));
}
- public function testTransform_differentTimezones()
+ public function testTransformWithDifferentTimezones()
{
$transformer = new DateTimeToLocalizedStringTransformer('America/New_York', 'Asia/Hong_Kong');
@@ -140,7 +140,7 @@ public function testTransform_differentTimezones()
$this->assertEquals($dateTime->format('d.m.Y H:i'), $transformer->transform($input));
}
- public function testTransform_differentPatterns()
+ public function testTransformWithDifferentPatterns()
{
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, \IntlDateFormatter::GREGORIAN, 'MM*yyyy*dd HH|mm|ss');
@@ -206,7 +206,7 @@ public function testReverseTransformFromDifferentLocale()
$this->assertDateTimeEquals($this->dateTimeWithoutSeconds, $transformer->reverseTransform('Feb 3, 2010 04:05 AM'));
}
- public function testReverseTransform_differentTimezones()
+ public function testReverseTransformWithDifferentTimezones()
{
$transformer = new DateTimeToLocalizedStringTransformer('America/New_York', 'Asia/Hong_Kong');
@@ -216,14 +216,14 @@ public function testReverseTransform_differentTimezones()
$this->assertDateTimeEquals($dateTime, $transformer->reverseTransform('03.02.2010 04:05'));
}
- public function testReverseTransform_differentPatterns()
+ public function testReverseTransformWithDifferentPatterns()
{
$transformer = new DateTimeToLocalizedStringTransformer('UTC', 'UTC', \IntlDateFormatter::FULL, \IntlDateFormatter::FULL, \IntlDateFormatter::GREGORIAN, 'MM*yyyy*dd HH|mm|ss');
$this->assertDateTimeEquals($this->dateTime, $transformer->reverseTransform('02*2010*03 04|05|06'));
}
- public function testReverseTransform_empty()
+ public function testReverseTransformEmpty()
{
$transformer = new DateTimeToLocalizedStringTransformer();
@@ -79,14 +79,14 @@ public function testTransform($format, $output, $input)
$this->assertEquals($output, $transformer->transform($input));
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$transformer = new DateTimeToStringTransformer();
$this->assertSame('', $transformer->transform(null));
}
- public function testTransform_differentTimezones()
+ public function testTransformWithDifferentTimezones()
{
$transformer = new DateTimeToStringTransformer('Asia/Hong_Kong', 'America/New_York', 'Y-m-d H:i:s');
@@ -134,14 +134,14 @@ public function testReverseTransformWithoutUsingPipe($format, $input, $output)
$this->assertDateTimeEquals($output, $reverseTransformer->reverseTransform($input));
}
- public function testReverseTransform_empty()
+ public function testReverseTransformEmpty()
{
$reverseTransformer = new DateTimeToStringTransformer();
$this->assertNull($reverseTransformer->reverseTransform(''));
}
- public function testReverseTransform_differentTimezones()
+ public function testReverseTransformWithDifferentTimezones()
{
$reverseTransformer = new DateTimeToStringTransformer('America/New_York', 'Asia/Hong_Kong', 'Y-m-d H:i:s');
@@ -25,14 +25,14 @@ public function testTransform()
$this->assertEquals($output, $transformer->transform($input));
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$transformer = new DateTimeToTimestampTransformer();
$this->assertNull($transformer->transform(null));
}
- public function testTransform_differentTimezones()
+ public function testTransformWithDifferentTimezones()
{
$transformer = new DateTimeToTimestampTransformer('Asia/Hong_Kong', 'America/New_York');
@@ -75,14 +75,14 @@ public function testReverseTransform()
$this->assertDateTimeEquals($output, $reverseTransformer->reverseTransform($input));
}
- public function testReverseTransform_empty()
+ public function testReverseTransformEmpty()
{
$reverseTransformer = new DateTimeToTimestampTransformer();
$this->assertNull($reverseTransformer->reverseTransform(null));
}
- public function testReverseTransform_differentTimezones()
+ public function testReverseTransformWithDifferentTimezones()
{
$reverseTransformer = new DateTimeToTimestampTransformer('Asia/Hong_Kong', 'America/New_York');
@@ -32,7 +32,7 @@ public function testReverseTransform()
$this->assertEquals(12345, $transformer->reverseTransform('12345,912'));
}
- public function testReverseTransform_empty()
+ public function testReverseTransformEmpty()
{
$transformer = new IntegerToLocalizedStringTransformer();
@@ -38,7 +38,7 @@ public function testTransformExpectsNumeric()
$transformer->transform('abcd');
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$transformer = new MoneyToLocalizedStringTransformer();
@@ -61,7 +61,7 @@ public function testReverseTransformExpectsString()
$transformer->reverseTransform(12345);
}
- public function testReverseTransform_empty()
+ public function testReverseTransformEmpty()
{
$transformer = new MoneyToLocalizedStringTransformer();
@@ -32,7 +32,7 @@ public function testTransform()
$this->assertEquals('12345,912', $transformer->transform(12345.9123));
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$transformer = new NumberToLocalizedStringTransformer();
@@ -75,7 +75,7 @@ public function testReverseTransform()
$this->assertEquals(12345.912, $transformer->reverseTransform('12345,912'));
}
- public function testReverseTransform_empty()
+ public function testReverseTransformEmpty()
{
$transformer = new NumberToLocalizedStringTransformer();
@@ -129,7 +129,7 @@ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDot_noGroupSep()
+ public function testDecimalSeparatorMayNotBeDotIfGroupingSeparatorIsDotWithNoGroupSep()
{
if ($this->isLowerThanIcuVersion('4.7')) {
$this->markTestSkipped('Please upgrade ICU version to 4.7+');
@@ -185,7 +185,7 @@ public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma()
/**
* @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
*/
- public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsComma_noGroupSep()
+ public function testDecimalSeparatorMayNotBeCommaIfGroupingSeparatorIsCommaWithNoGroupSep()
{
if ($this->isLowerThanIcuVersion('4.7')) {
$this->markTestSkipped('Please upgrade ICU version to 4.7+');
@@ -32,7 +32,7 @@ public function testTransform()
$this->assertEquals('200', $transformer->transform(2));
}
- public function testTransform_empty()
+ public function testTransformEmpty()
{
$transformer = new PercentToLocalizedStringTransformer();
@@ -66,7 +66,7 @@ public function testReverseTransform()
$this->assertEquals(2, $transformer->reverseTransform('200'));
}
- public function testReverseTransform_empty()
+ public function testReverseTransformEmpty()
{
$transformer = new PercentToLocalizedStringTransformer();
Oops, something went wrong.

0 comments on commit 2e5a527

Please sign in to comment.