- $this->assertLessThanOrEqual(
- // FILE_IGNORE_NEW_LINES drops the \n at the EOL, so max length is 80 not 81.
- 80,
- mb_strlen( $line ),
- "Release notes file '$fileName' line $i is longer than 80 chars:\n\t'$line'"
- );
- }
+ $this->assertFalse(
+ !$file,
+ "$type file '$fileName' is inaccessible."
+ );
+
+ $lines = count( $file );
+
+ for ( $i = 0; $i < $lines; $i++ ) {
+ $line = $file[$i];
+
+ $this->assertLessThanOrEqual(
+ // FILE_IGNORE_NEW_LINES drops the \n at the EOL, so max length is 80 not 81.
+ 80,
+ mb_strlen( $line ),
+ "$type file '$fileName' line $i is longer than 80 chars:\n\t'$line'"
+ );