Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] Add placeholder for line number in console exception fixtures #25794

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

Closed
wants to merge 3 commits into from

Conversation

pierredup
Copy link
Contributor

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

Add placeholders for exception line numbers for tests in ApplicationTest to make the tests more flexible

@pierredup
Copy link
Contributor Author

Travis HHVM failure seems unrelated

Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

I would have just changed assertStringEqualsFile to assertStringMatchesFormatFile(), replacing the line number by %d in fixtures (https://phpunit.de/manual/current/en/appendixes.assertions.html#appendixes.assertions.assertStringMatchesFormatFile). Feel free to update if you want, fine for me as is. Thanks for taking care

@pierredup
Copy link
Contributor Author

I think assertStringMatchesFormatFile is cleaner as it's not necessary to track the exception line anymore. I have implemented the suggested changes

@chalasr
Copy link
Member

chalasr commented Jan 15, 2018

Thank you @pierredup.

chalasr pushed a commit that referenced this pull request Jan 15, 2018
…eption fixtures (pierredup)

This PR was squashed before being merged into the 3.4 branch (closes #25794).

Discussion
----------

[Console] Add placeholder for line number in console exception fixtures

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

Add placeholders for exception line numbers for tests in `ApplicationTest` to make the tests more flexible

Commits
-------

686d4f7 [Console] Add placeholder for line number in console exception fixtures
@chalasr chalasr closed this Jan 15, 2018
@pierredup pierredup deleted the console-exceptions-lineno branch January 15, 2018 16:42
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.

3 participants