- Timestamp:
- 03/26/2021 08:02:01 PM (4 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
-
branches/5.2/tests/phpunit/tests/dependencies/scripts.php
r45989 r50606 1342 1342 ); 1343 1343 } 1344 1345 function test_no_source_mapping() {1346 $all_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( dirname( ABSPATH ) . '/build/' ) );1347 $js_files = new RegexIterator( $all_files, '/\.js$/' );1348 foreach ( $js_files as $js_file ) {1349 $contents = trim( file_get_contents( $js_file ) );1350 1351 // We allow data: URLs.1352 $found = preg_match( '/sourceMappingURL=((?!data:).)/', $contents );1353 $this->assertSame( $found, 0, "sourceMappingURL found in $js_file" );1354 }1355 }1356 1344 }
Note: See TracChangeset
for help on using the changeset viewer.