Skip to content

Commit

Permalink
Merge pull request #319 from atoum/feature/release330
Browse files Browse the repository at this point in the history
Add documentation for new features from 3.3.0 release
  • Loading branch information
Grummfy committed Mar 16, 2018
2 parents 788389f + 82a7b84 commit 6f3f536
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 1 deletion.
49 changes: 49 additions & 0 deletions source/en/annotations/annotation-os.inc.rst
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__`.

3 changes: 3 additions & 0 deletions source/en/asserters/string.inc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,6 @@ startWith
->startWith(' ') // fails
;
.. versionadded:: 3.3.0
`notMatches` assertion added
18 changes: 18 additions & 0 deletions source/en/option_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,21 @@ This option lets you disable the generation of the code coverage report for one
$ ./bin/atoum -nccfm foo\\test\\units\\myClass::testMyMethod foo\\test\\units\\myClassToo::testMyMethod
$ ./bin/atoum --no-code-coverage-for-methods foo\\test\\units\\myClass::testMyMethod foo\\test\\units\\myClassToo::testMyMethod
.. _cli-options-udr:

-udr / --use-dot-report
=======================

This option lets you get only execution progression with dots.

.. code-block:: shell
$ bin/atoum -udr
$ bin/atoum --use-dot-report
............................................................ [60/65]
..... [65/65]
Success (1 test, 65/65 methods, 0 void method, 0 skipped method, 872 assertions)!

.. _cli-options-ulr:

-ulr / --use-light-report
Expand Down Expand Up @@ -539,3 +554,6 @@ This option lets you display the current version of atoum.
$ ./bin/atoum --version
atoum version DEVELOPMENT by Frédéric Hardy (/path/to/atoum)
.. versionadded:: 3.3.0
Dot report added
52 changes: 52 additions & 0 deletions source/fr/annotations/annotation-os.inc.rst
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__`.

4 changes: 4 additions & 0 deletions source/fr/asserters/string.inc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,7 @@ startWith
->startWith(' ') // échoue
;
.. versionadded:: 3.3.0
Ajout de l'assertion `notMatches`
21 changes: 20 additions & 1 deletion source/fr/option_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Cette option active le mode verbose de atoum.
.. _cli-options-coverage_reports:

Couverture & rapports
***********************
*********************

.. _cli-options-report-title:

Expand Down Expand Up @@ -384,6 +384,22 @@ Cette option vous permet de désactiver la génération du rapport de couverture
$ ./bin/atoum -nccfm foo\\test\\units\\myClass::testMyMethod foo\\test\\units\\myClassToo::testMyMethod
$ ./bin/atoum --no-code-coverage-for-methods foo\\test\\units\\myClass::testMyMethod foo\\test\\units\\myClassToo::testMyMethod
.. _cli-options-udr:

-udr / --use-dot-report
=======================

Cette option vous permet d'afficher uniquement la progression de l'exécution avec des points.


.. code-block:: shell
$ bin/atoum -udr
$ bin/atoum --use-dot-report
............................................................ [60/65]
..... [65/65]
Success (1 test, 65/65 methods, 0 void method, 0 skipped method, 872 assertions)!

.. _cli-options-ulr:

-ulr / --use-light-report
Expand Down Expand Up @@ -531,3 +547,6 @@ Cette option vous permet d'afficher la version courante d'atoum.
$ ./bin/atoum --version
atoum version DEVELOPMENT by Frédéric Hardy (/path/to/atoum)
.. versionadded:: 3.3.0
Ajout du dot report

0 comments on commit 6f3f536

Please sign in to comment.