diff --git a/modules/cart/src/Tests/AddToCartFormTest.php b/modules/cart/src/Tests/AddToCartFormTest.php
index 47352bd..8ed0300 100644
--- a/modules/cart/src/Tests/AddToCartFormTest.php
+++ b/modules/cart/src/Tests/AddToCartFormTest.php
@@ -334,7 +334,7 @@ class AddToCartFormTest extends OrderTestBase {
       'red' => 'Red',
     ]);
     // Make the color attribute optional.
-    $color_field = \Drupal::entityManager()->getStorage('field_config')->load('commerce_product_variation.default.attribute_color');
+    $color_field = \Drupal::entityTypeManager()->getStorage('field_config')->load('commerce_product_variation.default.attribute_color');
     $color_field->setRequired(TRUE);
     $color_field->save();
 
