Navigation Menu

Skip to content
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

[FrameworkBundle] improve errors in tests missing the BrowserKit component #29704

Merged
merged 1 commit into from Jan 1, 2019

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Dec 27, 2018

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29696
License MIT
Doc PR

Copy link
Contributor

@localheinz localheinz left a comment

Choose a reason for hiding this comment

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

👍

try {
$client = $kernel->getContainer()->get('test.client');
} catch (ServiceNotFoundException $e) {
throw new \LogicException('The BrowserKit component is required to be able to create a client.', $e->getCode(), $e);
Copy link
Member

Choose a reason for hiding this comment

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

Could we reword this to be similar to other error messages added recently?

throw new \LogicException('You can not create the client used in functional tests if the BrowserKit component is not available. Try running "composer require symfony/browser-kit".')

@fabpot
Copy link
Member

fabpot commented Jan 1, 2019

Thank you @xabbuh.

@fabpot fabpot merged commit 7961a29 into symfony:3.4 Jan 1, 2019
fabpot added a commit that referenced this pull request Jan 1, 2019
…serKit component (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] improve errors in tests missing the BrowserKit component

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29696
| License       | MIT
| Doc PR        |

Commits
-------

7961a29 improve error message when using test client without the BrowserKit component
@xabbuh xabbuh deleted the issue-29696 branch January 1, 2019 18:02
This was referenced Jan 6, 2019
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.

None yet

6 participants