Skip to content

Conversation

@deviantintegral
Copy link
Owner

No description provided.

@deviantintegral deviantintegral changed the title Claude/refactor split command tests ma op i test: remove redundant assertions in SplitCommandTest.php Dec 18, 2025
The assertNotEquals('modified content', $newContent) assertion is
redundant because the preceding assertEquals($originalContent, $newContent)
already verifies the content. If newContent equals originalContent, it
cannot also equal 'modified content'.
…ndTest

This test is redundant because its assertions are covered by other tests:
- 11/11 and 100% assertions are covered by testProgressFinishShowsCompletion
- Intermediate state assertions are covered more thoroughly by
  testProgressAdvanceIsCalledForEachEntry (which checks for >2 distinct states)
- SUCCESS status and file count are covered by testSplitMultipleEntries
The assertCount(11, $files) is redundant because the subsequent
assertEquals($expectedFiles, $files) already verifies both the
exact file count and the specific file names.
The assertFileExists assertion is redundant because the subsequent
file_get_contents call would fail anyway if the file doesn't exist,
and the assertCount(1, $files) already verifies the file count.
The assertFileExists assertion is redundant because the subsequent
file_get_contents call would fail anyway if the file doesn't exist.
The assertFileExists assertions inside the loop are redundant because
the subsequent file_get_contents calls would fail anyway if the files
don't exist.
The assertStringContainsString('100%') assertion is redundant because
the subsequent assertMatchesRegularExpression('/100%\s*\n/') already
verifies that 100% is present in the output.
…tion

The assertTrue(hasArgument('har')) and assertTrue(hasArgument('destination'))
assertions are redundant because getArgument() would throw an exception
if the argument doesn't exist, and we're already calling getArgument()
on the next lines.
…ceIsCalledForEachEntry

The assertContains('0') and assertContains('11') assertions are redundant
because the assertGreaterThan(2, count($progressStates)) already verifies
that progress is being shown. The 11/11 final state is also verified by
testProgressFinishShowsCompletion.
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.
@deviantintegral deviantintegral force-pushed the claude/refactor-split-command-tests-MaOpI branch from afc3f0f to 99c92d0 Compare December 18, 2025 01:32
@deviantintegral deviantintegral marked this pull request as ready for review December 18, 2025 01:35
@deviantintegral deviantintegral merged commit 996e837 into main Dec 18, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants