Skip to content

Commit fde8e25

Browse files
Make the url logged in field:create a clickable link (#6216)
* Make the url logged in field:create a clickable link * Attempt to fix test * Revert "Attempt to fix test" This reverts commit 3091fc3. * Remove assertion
1 parent fdcdae7 commit fde8e25

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Commands/field/FieldCreateCommands.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,9 @@ protected function logResult(FieldConfigInterface $field): void
527527

528528
if ($this->moduleHandler->moduleExists('field_ui')) {
529529
$this->logger()->success(
530-
'Further customisation can be done at the following url:'
531-
. PHP_EOL
532-
. Url::fromRoute($routeName, $routeParams)
533-
->setAbsolute(true)
534-
->toString()
530+
dt('Further customisation can be done through the <href=%editForm>edit form</>.', [
531+
'%editForm' => Url::fromRoute($routeName, $routeParams)->setAbsolute(true)->toString(),
532+
]),
535533
);
536534
}
537535
}

tests/functional/FieldTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public function testFieldCreate()
5151
$this->assertStringContainsString("Bundle 'NO-EXIST' does not exist on entity type with id 'unish_article'.", $this->getErrorOutputRaw());
5252
$this->drush(FieldCreateCommands::CREATE, ['unish_article', 'alpha'], ['field-label' => 'Test', 'field-name' => 'field_test3', 'field-type' => 'entity_reference', 'field-widget' => 'entity_reference_autocomplete', 'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, 'target-type' => 'unish_article', 'target-bundle' => 'beta']);
5353
$this->assertStringContainsString("Successfully created field 'field_test3' on unish_article type with bundle 'alpha'", $this->getErrorOutputRaw());
54-
$this->assertStringContainsString("http://dev/admin/structure/unish_article_types/manage/alpha/fields/unish_article.alpha.field_test3", $this->getSimplifiedErrorOutput());
5554
$php = "return Drupal::entityTypeManager()->getStorage('field_config')->load('unish_article.alpha.field_test3')->getSettings()";
5655
$this->drush(PhpCommands::EVAL, [$php], ['format' => 'json']);
5756
$settings = $this->getOutputFromJSON();

0 commit comments

Comments
 (0)