From 2c1f1db50b4cbace8b9455f2d09d191180bd3308 Mon Sep 17 00:00:00 2001 From: antograssiot Date: Thu, 16 Feb 2017 05:50:46 +0100 Subject: [PATCH 1/3] Add documentation on PHPUnit 6 support --- en/appendices/3-4-migration-guide.rst | 6 ++++++ en/development/testing.rst | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/en/appendices/3-4-migration-guide.rst b/en/appendices/3-4-migration-guide.rst index cd1bac227a..653c6fb3cd 100644 --- a/en/appendices/3-4-migration-guide.rst +++ b/en/appendices/3-4-migration-guide.rst @@ -449,3 +449,9 @@ PluginShell * ``cake plugin load`` and ``cake plugin unload`` now support a ``--cli`` option, which updates the ``bootstrap_cli.php`` instead. + +TestSuite +========= + +* Support to ``PHPUnit 6`` was added. With this framework version requiring PHP + 5.6.0 as a minimum version, the supported version of PHPUnit are now ``^5.7|^6.0`` diff --git a/en/development/testing.rst b/en/development/testing.rst index 98c9c7a578..3e8089f5be 100644 --- a/en/development/testing.rst +++ b/en/development/testing.rst @@ -23,6 +23,9 @@ To install PHPUnit with Composer: .. code-block:: bash + $ php composer.phar require --dev phpunit/phpunit:"^5.7|^6.0" + + // 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 ============================= From 2948eb3e86312b271281193eb29bfc482d5eb2c6 Mon Sep 17 00:00:00 2001 From: antograssiot Date: Thu, 16 Feb 2017 05:51:13 +0100 Subject: [PATCH 2/3] Add the min PHP Version supported --- en/appendices/3-4-migration-guide.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/en/appendices/3-4-migration-guide.rst b/en/appendices/3-4-migration-guide.rst index 653c6fb3cd..6193b89867 100644 --- a/en/appendices/3-4-migration-guide.rst +++ b/en/appendices/3-4-migration-guide.rst @@ -4,6 +4,11 @@ CakePHP 3.4 is an API compatible upgrade from 3.3. This page outlines the changes and improvements made in 3.4. +Minimum PHP 5.6 Required +======================== +CakePHP 3.4 requires at least PHP 5.6.0 as PHP 5.5 is no longer supported and +won't receive any security fixes anymore. + Deprecations ============ From 4fd082ee087914f918d4ff94c312a139e3462196 Mon Sep 17 00:00:00 2001 From: antograssiot Date: Thu, 16 Feb 2017 05:53:54 +0100 Subject: [PATCH 3/3] Update code contribution guidelines --- en/contributing/code.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/contributing/code.rst b/en/contributing/code.rst index d897fdb5aa..7f6c131e7f 100644 --- a/en/contributing/code.rst +++ b/en/contributing/code.rst @@ -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 Set up your user information with your name/handle and working email address::