Skip to content

Conversation

@ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented Jul 9, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR TODO: showcase using setUpVarDumper in setUp or in specific test cases accordingly to the use-case. tearDownVarDumper is automatically called after each test case.

The VarDumper component is a great tool in tests to assert objects states.
The ability to register custom casters on need is a nice way to control only the fields you're expecting, or a way to write concise test cases.
Hence this feature allowing to configure casters specifically per test class/case.

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

I like it a lot

Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

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

(I prefer when property declaration and their usage are sorted in the same order, but this is really a detail)

👍

@ogizanagi
Copy link
Contributor Author

@nicolas-grekas : Better? :)

@nicolas-grekas
Copy link
Member

Thank you @ogizanagi.

@nicolas-grekas nicolas-grekas merged commit 613dbb2 into symfony:4.4 Jul 17, 2019
nicolas-grekas added a commit that referenced this pull request Jul 17, 2019
…ers & flags (ogizanagi)

This PR was merged into the 4.4 branch.

Discussion
----------

[VarDumper] Allow to configure VarDumperTestTrait casters & flags

| Q             | A
| ------------- | ---
| Branch?       | 4.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | TODO: showcase using `setUpVarDumper` in `setUp` or in specific test cases accordingly to the use-case. `tearDownVarDumper` is automatically called after each test case.

The VarDumper component is a great tool in tests to assert objects states.
The ability to register custom casters on need is a nice way to control only the fields you're expecting, or a way to write concise test cases.
Hence this feature allowing to configure casters specifically per test class/case.

Commits
-------

613dbb2 [VarDumper] Allow to configure VarDumperTestTrait casters & flags
@ogizanagi ogizanagi deleted the feat/var-dumper/test-trait-setup branch July 17, 2019 19:16
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
This was referenced Nov 12, 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.

7 participants