diff --git a/core/modules/views/src/Tests/Plugin/DisplayEntityReferenceTest.php b/core/modules/views/src/Tests/Plugin/DisplayEntityReferenceTest.php
index 67d4d45..c0a644a 100644
--- a/core/modules/views/src/Tests/Plugin/DisplayEntityReferenceTest.php
+++ b/core/modules/views/src/Tests/Plugin/DisplayEntityReferenceTest.php
@@ -103,6 +103,16 @@ protected function setUp() {
         $this->fieldName => 'text' . $i,
       ])->save();
     }
+    EntityTest::create([
+      'bundle' => 'entity_test',
+      'name' => 'name',
+      $this->fieldName => 'tex',
+    ])->save();
+    EntityTest::create([
+      'bundle' => 'entity_test',
+      'name' => 'name',
+      $this->fieldName => 'sometext',
+    ])->save();
   }
 
   /**
@@ -140,6 +150,48 @@ public function testEntityReferenceDisplay() {
     $this->assertEqual(count($view->result), 2, 'Search returned two rows');
     $view->destroy();
 
+    // Test the 'CONTAINS' match_operator.
+    $view = Views::getView('test_display_entity_reference');
+    $view->setDisplay('entity_reference_1');
+    $options = [
+      'match' => 'tex',
+      'match_operator' => 'CONTAINS',
+      'limit' => 0,
+      'ids' => NULL,
+    ];
+    $view->display_handler->setOption('entity_reference_options', $options);
+    $this->executeView($view);
+    $this->assertEqual(count($view->result), 12, 'Search returned twelve rows');
+    $view->destroy();
+
+    // Test the 'STARTS_WITH' match_operator.
+    $view = Views::getView('test_display_entity_reference');
+    $view->setDisplay('entity_reference_1');
+    $options = [
+      'match' => 'tex',
+      'match_operator' => 'STARTS_WITH',
+      'limit' => 0,
+      'ids' => NULL,
+    ];
+    $view->display_handler->setOption('entity_reference_options', $options);
+    $this->executeView($view);
+    $this->assertEqual(count($view->result), 11, 'Search returned eleven rows');
+    $view->destroy();
+
+    // Test the '=' match_operator.
+    $view = Views::getView('test_display_entity_reference');
+    $view->setDisplay('entity_reference_1');
+    $options = [
+      'match' => 'tex',
+      'match_operator' => '=',
+      'limit' => 0,
+      'ids' => NULL,
+    ];
+    $view->display_handler->setOption('entity_reference_options', $options);
+    $this->executeView($view);
+    $this->assertEqual(count($view->result), 1, 'Search returned one row');
+    $view->destroy();
+
     // Add a relationship and a field using that relationship.
     $this->drupalPostForm('admin/structure/views/nojs/add-handler/test_display_entity_reference/default/relationship', ['name[entity_test.user_id]' => TRUE], t('Add and configure relationships'));
     $this->drupalPostForm(NULL, [], t('Apply'));
