Changeset 44740 for trunk/tests/phpunit/tests/dependencies/scripts.php
- Timestamp:
- 02/14/2019 12:06:39 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/scripts.php
r44403 r44740 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 } 1344 1356 }
Note: See TracChangeset
for help on using the changeset viewer.