forked from geraldcroes/atoum-s-old-documentation
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #319 from atoum/feature/release330
Add documentation for new features from 3.3.0 release
- Loading branch information
Showing
6 changed files
with
146 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.. _annotation-os: | ||
|
||
Operating system | ||
**************** | ||
|
||
If you want to define tests scenario for specific OS, or to be avoided on specific OS, you can use the tag `@os`. | ||
You can define one or several OS, and you can avoid an OS by prefixing it with "!". | ||
|
||
.. code-block:: php | ||
<?php | ||
namespace vendor\project\tests\units; | ||
class foo extends \atoum | ||
{ | ||
/** | ||
* @os linux | ||
*/ | ||
public function testBar() | ||
{ | ||
// ... | ||
} | ||
} | ||
The test will only be executed if the current OS is linux | ||
|
||
.. code-block:: php | ||
<?php | ||
namespace vendor\project\tests\units; | ||
class foo extends \atoum | ||
{ | ||
/** | ||
* @os !darwin | ||
*/ | ||
public function testBar() | ||
{ | ||
// ... | ||
} | ||
} | ||
The test will only be executed on all other OS than Darwin | ||
|
||
.. note:: | ||
OS value for the current system is checked in the PHP predefined constant `__PHP_OS__`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,3 +357,6 @@ startWith | |
->startWith(' ') // fails | ||
; | ||
.. versionadded:: 3.3.0 | ||
`notMatches` assertion added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.. _annotation-os: | ||
|
||
Système d'exploitation | ||
********************** | ||
|
||
Si vous désirez définir des tests unitaires uniquement pour certains systèmes d'exploitation, ou alors pour qu'ils ne s'exécutent pas sur certains systèmes d'exploitation, vous pouvez utiliser l'annotation `@os`. | ||
Vous pouvez spécifier un ou plusieurs systèmes d'exploitation, ou alors d'éviter un système particulier en le prefixant par "!" | ||
You can define one or several OS, and you can avoid an OS by prefixing it with "!". | ||
|
||
.. code-block:: php | ||
<?php | ||
namespace vendor\project\tests\units; | ||
class foo extends \atoum | ||
{ | ||
/** | ||
* @os linux | ||
*/ | ||
public function testBar() | ||
{ | ||
// ... | ||
} | ||
} | ||
Ce test ne sera exécuté que si le système d'exploitation courant est Linux. | ||
|
||
|
||
.. code-block:: php | ||
<?php | ||
namespace vendor\project\tests\units; | ||
class foo extends \atoum | ||
{ | ||
/** | ||
* @os !darwin | ||
*/ | ||
public function testBar() | ||
{ | ||
// ... | ||
} | ||
} | ||
Ce test ne sera exécuté que si le système d'exploitation courant n'est pas Darwin | ||
|
||
|
||
.. note:: | ||
Le système d'exploitation courant est récupéré depuis la constante PHP prédéfinie `__PHP_OS__`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,3 +357,7 @@ startWith | |
->startWith(' ') // échoue | ||
; | ||
.. versionadded:: 3.3.0 | ||
Ajout de l'assertion `notMatches` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters