Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Tests] Streamline#52365
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Tests] Streamline#52365
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| publicfunctiontestNoTwigTemplateActionMethod() | ||
| { | ||
| $controller =newTemplateController(); | ||
| $this->expectException(\LogicException::class); | ||
| $this->expectExceptionMessage('You cannot use the TemplateController if the Twig Bundle is not available.'); | ||
| $controller =newTemplateController(); | ||
| $controller->templateAction('mytemplate')->getContent(); | ||
| } | ||
| publicfunctiontestNoTwigInvokeMethod() | ||
| { | ||
| $controller =newTemplateController(); | ||
| $this->expectException(\LogicException::class); | ||
| $this->expectExceptionMessage('You cannot use the TemplateController if the Twig Bundle is not available.'); | ||
| $controller('mytemplate')->getContent(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We should test both ways independently
| $client =$this->createClient(['test_case' =>'StandardFormLogin','root_config' =>'invalid_ip_access_control.yml']); | ||
| $client->request('GET','/unprotected_resource'); | ||
| $this->createClient(['test_case' =>'StandardFormLogin','root_config' =>'invalid_ip_access_control.yml']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Exception is thrown while creating the Client, no need to callrequest()
| $controller =newProfilerController($urlGenerator,null,$twig, []); | ||
| $controller->phpinfoAction(Request::create('/_profiler/phpinfo')); | ||
| $controller->phpinfoAction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
phpInfoAction has no parameter
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
OskarStark commentedOct 30, 2023
Ready to merge from my side |
OskarStark commentedOct 31, 2023
@nicolas-grekas as PRs get bigger and bigger, can you please merge/upmerge this one? Thanks |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| $table =newTable($output =$this->getOutputStream()); | ||
| $table =newTable($this->getOutputStream()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Unused variable$output
| $this->expectException(InvalidArgumentException::class); | ||
| $this->expectExceptionMessage('A cell must be a TableCell, a scalar or an object implementing "__toString()", "array" given.'); | ||
| $table->render(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@stof it seems, that this is no dead code, as the exception is raised when callingrender() and not when callingsetRows() 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
then in the other PR, keepsetRows in initialization
OskarStark commentedOct 31, 2023
Fabbot looks unrelated |
nicolas-grekas commentedOct 31, 2023
Thank you@OskarStark. |
…e expectation to avoid false positives (OskarStark)This PR was merged into the 6.4 branch.Discussion----------[Tests] Move `expectException` closer to the place of the expectation to avoid false positives| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | no| New feature? | no| Deprecations? | no| Tickets | --| License | MITIf you guys like this PR, I will fix the other places as wellShould be merged after merge & upmerge of:*#52365Commits-------6115ab0 [Tests] Move expectException closer to the place of the expectation to avoid false positives
Uh oh!
There was an error while loading.Please reload this page.
Extracted from#52157