Skip to content

Commit 99c92d0

Browse files
claudedeviantintegral
authored andcommitted
test: remove redundant MD5 regex loop in testSplitWithMd5Option
The loop verifying filenames match MD5 regex pattern is redundant because the subsequent assertEquals($expectedHash, $basename) already verifies that each filename equals the expected MD5 hash of the URL. Since md5() always returns a 32-character hex string, the regex check adds no value.
1 parent bbc4d03 commit 99c92d0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/src/Functional/SplitCommandTest.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,7 @@ public function testSplitWithMd5Option(): void
109109
$files = glob($this->tempDir.'/*.har');
110110
$this->assertCount(11, $files);
111111

112-
// Verify file names are MD5 hashes
113-
foreach ($files as $file) {
114-
$basename = basename($file, '.har');
115-
$this->assertMatchesRegularExpression('/^[a-f0-9]{32}$/', $basename, 'Filename should be MD5 hash');
116-
}
117-
118-
// Verify each file is valid HAR
112+
// Verify each file is valid HAR and filename matches MD5 of URL
119113
$serializer = new Serializer();
120114
foreach ($files as $file) {
121115
$contents = file_get_contents($file);

0 commit comments

Comments
 (0)