diff --git a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php index 19bbc25..ab03ff5 100644 --- a/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php +++ b/core/modules/datetime/tests/src/Functional/DateTimeFieldTest.php @@ -67,7 +67,7 @@ public function testDateField() { "{$field_name}[0][value][date]" => $date->format($date_format), ]; $this->drupalPostForm(NULL, $edit, t('Save')); - preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match); + preg_match('|entity_test/manage/(\d+)|', $this->getUrl(), $match); $id = $match[1]; $this->assertText(t('entity_test @id has been created.', ['@id' => $id])); $this->assertRaw($date->format($date_format)); @@ -446,7 +446,7 @@ public function testDatelistWidget() { } $this->drupalPostForm(NULL, $edit, t('Save')); - preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match); + preg_match('|entity_test/manage/(\d+)|', $this->getUrl(), $match); $id = $match[1]; $this->assertText(t('entity_test @id has been created.', ['@id' => $id])); @@ -487,7 +487,7 @@ public function testDatelistWidget() { } $this->drupalPostForm(NULL, $edit, t('Save')); - preg_match('|entity_test/manage/(\d+)|', $this->getSession()->getCurrentUrl(), $match); + preg_match('|entity_test/manage/(\d+)|', $this->getUrl(), $match); $id = $match[1]; $this->assertText(t('entity_test @id has been created.', ['@id' => $id]));