diff --git a/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php b/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php index b68516b..7eec9e6 100644 --- a/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php +++ b/core/modules/datetime/src/Tests/Views/DateTimeHandlerTestBase.php @@ -7,6 +7,7 @@ namespace Drupal\datetime\Tests\Views; +use Drupal\datetime\Plugin\Field\FieldType\DateTimeItem; use Drupal\views\Tests\Handler\HandlerTestBase; use Drupal\views\Tests\ViewTestData; @@ -52,7 +53,7 @@ public function setUp() { 'field_name' => static::$field_name, 'entity_type' => 'node', 'type' => 'datetime', - 'settings' => array('datetime_type' => 'datetime'), + 'settings' => array('datetime_type' => DateTimeItem::DATETIME_TYPE_DATETIME), )); $fieldStorage->save(); $field = entity_create('field_config', array( diff --git a/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php b/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php index 01403d5..5ef63cc 100644 --- a/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php +++ b/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php @@ -34,7 +34,7 @@ public function setUp() { '2002-10-10', // For the offset test, put a date 24 hours in the future. The `time()` // function is used in case REQUEST_TIME is stale from long-running tests. - \Drupal::service('date.formatter')->format(time() + 86400, 'custom', 'Y-m-d'), + \Drupal::service('date.formatter')->format(time() + 86400, 'custom', DATETIME_DATETIME_STORAGE_FORMAT), ); foreach ($dates as $date) { $this->nodes[] = $this->drupalCreateNode(array(