-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Added a note for the test-pack #9452
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ wraps the original PHPUnit binary to provide additional features: | |
|
||
.. code-block:: terminal | ||
|
||
$ composer require --dev symfony/phpunit-bridge | ||
$ composer require --dev phpunit | ||
|
||
Each test - whether it's a unit test or a functional test - is a PHP class | ||
that should live in the ``tests/`` directory of your application. If you follow | ||
|
@@ -29,7 +29,7 @@ command: | |
|
||
.. code-block:: terminal | ||
|
||
$ ./vendor/bin/simple-phpunit | ||
$ ./bin/phpunit | ||
|
||
PHPUnit is configured by the ``phpunit.xml.dist`` file in the root of your | ||
Symfony application. | ||
|
@@ -101,13 +101,13 @@ Running tests for a given file or directory is also very easy: | |
.. code-block:: terminal | ||
|
||
# run all tests of the application | ||
$ ./vendor/bin/simple-phpunit | ||
$ ./bin/phpunit | ||
|
||
# run all tests in the Util/ directory | ||
$ ./vendor/bin/simple-phpunit tests/Util | ||
$ ./bin/phpunit tests/Util | ||
|
||
# run tests for the Calculator class | ||
$ ./vendor/bin/simple-phpunit tests/Util/CalculatorTest.php | ||
$ ./bin/phpunit tests/Util/CalculatorTest.php | ||
|
||
.. index:: | ||
single: Tests; Functional tests | ||
|
@@ -260,6 +260,17 @@ document:: | |
$client->getResponse()->getContent() | ||
); | ||
|
||
.. note:: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's make this a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not? @javiereguiluz wdyt? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ping :) |
||
|
||
Instead of adding each dependency individually, you can also run: | ||
|
||
.. code-block:: terminal | ||
|
||
$ composer require --dev test | ||
|
||
If the ``PHPUnit Bridge`` wasn't installed before, the test pack will add | ||
it too. | ||
|
||
.. index:: | ||
single: Tests; Assertions | ||
|
||
|
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.
Not sure about this change. The
phpunit
thing is an alias to ourphpunit-bridge
... but if we use justphpunit
, then the reader doesn't know if they are installing PHPUnit or "our PHPUnit". Also, I'm not sure about removing the./vendor/bin/simple-phpunit
commands. What's the reasoning behind that?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.
Thank you for you review, but I don't understand what you mean exactly by
are you talking of other contexts? Because here, we're saying that we need the bridge before showing the sample.
This is how it works with Flex now. We just need to run
./bin/phpunit
which is the bridge wrapper installed by the recipe, and is responsible for actually installing the phpunit's dependencies (ref https://github.com/symfony/recipes/blob/master/symfony/phpunit-bridge/3.3/bin/phpunit, and symfony/recipes#277).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 could add a note, maybe even a link, to say we use recipes here.
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.
Though I think I agree with Javier about not using the
phpunit
alias hereThere 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.
Ok changed in 9a6b058.
Is this ok for you? Should I remove the new note?