diff --git a/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php b/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php
index 909fe1c..22afc7c 100644
--- a/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/File/ReadOnlyStreamWrapperTest.php
@@ -56,6 +56,10 @@ function testWriteFunctions() {
     // Attempt to open a file in write mode
     $handle = @fopen($uri, 'w+');
     $this->assertFalse($handle, 'Unable to open a file for writing with the read-only stream wrapper.');
+    // Attempt to open a file in binary read mode
+    $handle = fopen($uri, 'rb');
+    $this->assertTrue($handle, 'Able to open a file for reading in binary mode with the read-only stream wrapper.');
+    fclose($handle);
     // Attempt to open a file in read mode
     $handle = fopen($uri, 'r');
     $this->assertTrue($handle, 'Able to open a file for reading with the read-only stream wrapper.');
