-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Document PHPUnit 6 support #4712
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 all commits
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 |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ setup. You'll need the following software: | |
|
|
||
| * Git | ||
| * PHP |minphpversion| or greater | ||
| * PHPUnit 3.7.0 or greater | ||
| * PHPUnit 5.7.0 or greater | ||
|
Member
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. 😼 |
||
|
|
||
| Set up your user information with your name/handle and working email address:: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,9 @@ To install PHPUnit with Composer: | |
|
|
||
| .. code-block:: bash | ||
|
|
||
| $ php composer.phar require --dev phpunit/phpunit:"^5.7|^6.0" | ||
|
Member
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. This is not reflected here:
Member
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. No because the change is on master.. |
||
|
|
||
| // Before CakePHP 3.4.1 | ||
| $ php composer.phar require --dev phpunit/phpunit:"<6.0" | ||
|
|
||
| This will add the dependency to the ``require-dev`` section of your | ||
|
|
@@ -124,13 +127,18 @@ tests: | |
| #. The filenames of these files should end in **Test.php** instead | ||
| of just .php. | ||
| #. The classes containing tests should extend ``Cake\TestSuite\TestCase``, | ||
| ``Cake\TestSuite\IntegrationTestCase`` or ``\PHPUnit_Framework_TestCase``. | ||
| ``Cake\TestSuite\IntegrationTestCase`` or ``\PHPUnit\Framework\TestCase``. | ||
| #. Like other classnames, the test case classnames should match the filename. | ||
| **RouterTest.php** should contain ``class RouterTest extends TestCase``. | ||
| #. The name of any method containing a test (i.e. containing an | ||
| assertion) should begin with ``test``, as in ``testPublished()``. | ||
| You can also use the ``@test`` annotation to mark methods as test methods. | ||
|
|
||
| .. versionadded:: 3.4.1 | ||
| Support for PHPUnit 6 was addded. If you're using a PHPUnit version lower | ||
| than 5.7.0, your tests classes should either extends Cake's classes or | ||
| ``PHPUnit_Framework_TestCase``. | ||
|
|
||
| Creating Your First Test Case | ||
| ============================= | ||
|
|
||
|
|
||
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.
https://github.com/cakephp/cakephp/blob/3.4.0/composer.json#L21 👍