Skip to content

[FrameworkBundle] Allow to un-verbose all the method in BrowserKitAssertionsTrait #60788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 7.4
Choose a base branch
from

Conversation

VincentLanglet
Copy link
Contributor

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #...
License MIT

@carsonbot carsonbot added this to the 7.4 milestone Jun 13, 2025
@nicolas-grekas nicolas-grekas changed the title [HttpClientAssertionsTrait] Allow to un-verbose all the method [FrameworkBundle] Allow to un-verbose all the method in BrowserKitAssertionsTrait Jun 15, 2025
@carsonbot carsonbot changed the title [FrameworkBundle] Allow to un-verbose all the method in BrowserKitAssertionsTrait [FrameworkBundle] Allow to un-verbose all the method in BrowserKitAssertionsTrait Jun 15, 2025
Comment on lines +38 to 43
public static function assertResponseIsSuccessful(string $message = '', ?bool $verbose = null): void
{
$verbose ??= self::$defaultVerboseMode;

self::assertThatForResponse(new ResponseConstraint\ResponseIsSuccessful($verbose), $message);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static function assertResponseIsSuccessful(string $message = '', ?bool $verbose = null): void
{
$verbose ??= self::$defaultVerboseMode;
self::assertThatForResponse(new ResponseConstraint\ResponseIsSuccessful($verbose), $message);
}
public static function assertResponseIsSuccessful(string $message = '', ?bool $verbose = null): void
{
self::assertThatForResponse(new ResponseConstraint\ResponseIsSuccessful($verbose ?? self::$defaultVerboseMode), $message);
}

We could use this notation also to spare a potential assignment. Just a thought, the current code also suits me fine

@OskarStark OskarStark changed the title [FrameworkBundle] Allow to un-verbose all the method in BrowserKitAssertionsTrait [FrameworkBundle] Allow to un-verbose all the method in BrowserKitAssertionsTrait Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants