Skip to content

[Testing] Fix phpunit test dir paths #3343

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

Merged
merged 3 commits into from
Mar 13, 2014
Merged

[Testing] Fix phpunit test dir paths #3343

merged 3 commits into from
Mar 13, 2014

Conversation

bicpi
Copy link
Contributor

@bicpi bicpi commented Dec 15, 2013

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets -

Maybe there could be further improvements: The paragraph that follows is a bit confusing. It says ...the following configuration adds the tests from the installed third-party bundles and then the tests from AcmeDemoBundle are included with <directory>../src/Acme/Bundle/*Bundle/Tests</directory>. Mh, the AcmeDemoBundle is a 3rd party bundle that resides in src? Shouldn't it include a directory from vendors instead to demonstrate this? In addition, the AcmeDemoBundle tests are covered by the standard configuration, so there should be no need for an extra configuration.

It continues with To include other directories in the code coverage.. and then some dirs from the AcmeDemoBundle are excluded which is also covered by the standard configuration.

What do you think, should I make some more updates here?

@weaverryan
Copy link
Member

Hey Philipp!

Yea, I'm glad you've caught this. What's happening is that this text is from a VERY old, pre 2.0 version of Symfony I believe - back when the best-practice for bundles was different, and I think we even had vendor bundles stored in src/. Can you re-read this entire section and make as many changes as you want. Don't worry about thinking that something is right for some reason - it's definitely out-dated, so if you can explain things how they actually work today (even if that changes pretty much everything), that's best!

Thanks!

@bicpi bicpi closed this Jan 2, 2014
@bicpi bicpi reopened this Jan 2, 2014
@bicpi
Copy link
Contributor Author

bicpi commented Jan 2, 2014

@weaverryan Sorry, closed by mistake...and re-opened ;-) I've done some tweaks to the section, replacing the notice about how to execute vendor tests (why testing vendor code from within a custom project? It would also need to install the composer deps for the vendor libs) by a notice how to add a non-standard (but custom) test directory.

@@ -686,7 +686,7 @@ their type::
Testing Configuration
---------------------

The Client used by functional tests creates a Kernel that runs in a special
The client used by functional tests creates a Kernel that runs in a special
Copy link
Member

Choose a reason for hiding this comment

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

Client, it refers to an object, just like Kernel

@bicpi
Copy link
Contributor Author

bicpi commented Jan 2, 2014

Btw, many thanks @wouterj for all of your reviews!

@bicpi
Copy link
Contributor Author

bicpi commented Mar 13, 2014

@weaverryan Anything I can still do for this PR? It's just because I stumbled over it again recently ;-)

@weaverryan
Copy link
Member

Nope - it looks great, thanks for the poke :).

weaverryan added a commit that referenced this pull request Mar 13, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

[Testing] Fix phpunit test dir paths

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | -

Maybe there could be further improvements: The paragraph that follows is a bit confusing. It says *...the following configuration adds the tests from the installed third-party bundles* and then the tests from AcmeDemoBundle are included with `<directory>../src/Acme/Bundle/*Bundle/Tests</directory>`. Mh, the AcmeDemoBundle is a 3rd party bundle that resides in `src`? Shouldn't it include a directory from `vendors` instead to demonstrate this? In addition, the AcmeDemoBundle tests are covered by the standard configuration, so there should be no need for an extra configuration.

It continues with *To include other directories in the code coverage..* and then some dirs from the AcmeDemoBundle are excluded which is also covered by the standard configuration.

What do you think, should I make some more updates here?

Commits
-------

75bd1e5 Fixes after review
d17a20f Further tweaks to the PHPUnit configuration description
61cdfcc [Testing] Fix phpunit test dir paths
@weaverryan weaverryan merged commit 75bd1e5 into symfony:2.3 Mar 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants