diff --git a/phpcs.xml b/phpcs.xml
index d035d5293efbd5ce5a6110f862516367ae6a1aff..c72355f8a265c3716fc5d02d895a84424bfa0cf5 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -47,6 +47,10 @@
             <property name="lineLimit" value="120"/>
             <property name="absoluteLineLimit" value="130"/>
         </properties>
+
+        <!-- Exclude files with long lines that we cannot immediately fix -->
+        <exlude-pattern>tests/lib/SimpleSAML/Metadata/MetaDataStorageSourceTest.php</exclude-pattern>
+        <exlude-pattern>tests/lib/SimpleSAML/Metadata/SAMLParserTest.php</exclude-pattern>
     </rule>
 
     <!-- Ignore these warnings until PHP 7.1 becomes the minimum required version -->