From 958aa5db55b86641df166b00864b6e34d67b34f2 Mon Sep 17 00:00:00 2001 From: Rui Figueira Date: Sun, 1 Apr 2018 16:48:15 +0100 Subject: [PATCH] Remove outdated reference to `EnvironmentTestUtils` Documentation still refers to the now deprecated `EnvironmentTestUtils` class instead of `TestPropertyValues` for setting environment values in tests. This commit replaces it with `TestPropertyValues` and provides an equivalent code example. Closes gh-12711 --- .../src/main/asciidoc/spring-boot-features.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 7a7686ac7c..28a6abea4a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -7160,14 +7160,14 @@ which auto-configures one for you. [[boot-features-environment-test-utilities]] -==== EnvironmentTestUtils -`EnvironmentTestUtils` lets you quickly add properties to a +==== TestPropertyValues +`TestPropertyValues` lets you quickly add properties to a `ConfigurableEnvironment` or `ConfigurableApplicationContext`. You can call it with `key=value` strings, as follows: [source,java,indent=0] ---- - EnvironmentTestUtils.addEnvironment(env, "org=Spring", "name=Boot"); + TestPropertyValues.of("org=Spring", "name=Boot").applyTo(env); ----