Skip to content

Commit

Permalink
AssertContainsOnly::assertContainsNotOnlyInstancesOf(): fix incorrect…
Browse files Browse the repository at this point in the history
… param name

This could be problematic when tests use function calls with named parameters, so let's make sure the parameter name matches the one used in PHPUnit.
  • Loading branch information
jrfnl committed Jan 12, 2025
1 parent 1bc0d31 commit b822354
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Polyfills/AssertContainsOnly.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ trait AssertContainsOnly {
/**
* Asserts that $haystack does not only contain instances of class or interface $type.
*
* @param string $type Class or interface name.
* @param iterable<mixed> $haystack The variable to test.
* @param string $message Optional failure message to display.
* @param string $className Class or interface name.
* @param iterable<mixed> $haystack The variable to test.
* @param string $message Optional failure message to display.
*
* @return void
*/
final public static function assertContainsNotOnlyInstancesOf( string $type, $haystack, string $message = '' ) {
static::assertNotContainsOnly( $type, $haystack, false, $message );
final public static function assertContainsNotOnlyInstancesOf( string $className, $haystack, string $message = '' ) {
static::assertNotContainsOnly( $className, $haystack, false, $message );
}

/**
Expand Down

0 comments on commit b822354

Please sign in to comment.