diff --git a/core/modules/datetime/src/Tests/DateTimeFieldTest.php b/core/modules/datetime/src/Tests/DateTimeFieldTest.php index ccfa66a..0cb226b 100644 --- a/core/modules/datetime/src/Tests/DateTimeFieldTest.php +++ b/core/modules/datetime/src/Tests/DateTimeFieldTest.php @@ -210,7 +210,7 @@ function testDateField() { entity_get_display($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full') ->setComponent($field_name, $this->displayOptions) ->save(); - $expected = '2 years 9 months 2 weeks in the past'; + $expected = '2 years 9 months 1 week in the past'; $this->renderTestEntity($id); $this->assertText($expected, SafeMarkup::format('Formatted date field using datetime_time_ago format displayed as %expected.', array('%expected' => $expected))); @@ -228,7 +228,7 @@ function testDateField() { entity_get_display($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full') ->setComponent($field_name, $this->displayOptions) ->save(); - $expected = '2 years 9 months 2 weeks in the future'; + $expected = '2 years 9 months 1 week in the future'; $this->renderTestEntity($id); $this->assertText($expected, SafeMarkup::format('Formatted date field using datetime_time_ago format displayed as %expected.', array('%expected' => $expected))); } @@ -338,12 +338,12 @@ function testDatetimeField() { $this->displayOptions['settings'] = array( 'future_format' => '@time from now', 'past_format' => '@time earlier', - 'granularity' => 4, + 'granularity' => 3, ); entity_get_display($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full') ->setComponent($field_name, $this->displayOptions) ->save(); - $expected = '2 years 9 months 2 weeks 12 hours earlier'; + $expected = '2 years 9 months 1 week earlier'; $this->renderTestEntity($id); $this->assertText($expected, SafeMarkup::format('Formatted date field using datetime_time_ago format displayed as %expected.', array('%expected' => $expected))); @@ -361,7 +361,7 @@ function testDatetimeField() { entity_get_display($this->field->getTargetEntityTypeId(), $this->field->getTargetBundle(), 'full') ->setComponent($field_name, $this->displayOptions) ->save(); - $expected = '2 years 9 months 2 weeks 12 hours from now'; + $expected = '2 years 9 months 1 week from now'; $this->renderTestEntity($id); $this->assertText($expected, SafeMarkup::format('Formatted date field using datetime_time_ago format displayed as %expected.', array('%expected' => $expected))); }