Skip to content
This repository has been archived by the owner on Apr 12, 2018. It is now read-only.

Commit

Permalink
Update documentation for sebastianbergmann/phpunit@7abe779
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 9, 2015
1 parent 8be375e commit 1505497
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 127 deletions.
2 changes: 1 addition & 1 deletion src/4.5/en/annotations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ public function testMoneyCanBeDepositedInAccount()
<para>
This annotation is especially useful in strict coverage mode where
unintentionally covered code will cause a test to fail. See
<xref linkend="strict-mode.unintentionally-covered-code"/> for more
<xref linkend="risky-tests.unintentionally-covered-code"/> for more
information regarding strict coverage mode.
</para>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/4.5/en/book.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<xi:include href="textui.xml"/>
<xi:include href="fixtures.xml"/>
<xi:include href="organizing-tests.xml"/>
<xi:include href="strict-mode.xml"/>
<xi:include href="risky-tests.xml"/>
<xi:include href="incomplete-and-skipped-tests.xml"/>
<xi:include href="database.xml"/>
<xi:include href="test-doubles.xml"/>
Expand Down
19 changes: 8 additions & 11 deletions src/4.7/en/strict-mode.xml → src/4.5/en/risky-tests.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>

<chapter id="strict-mode">
<title>Strict Mode</title>
<chapter id="risky-tests">
<title>Risky Tests</title>

<para>
PHPUnit can perform additional checks while it executes the tests. In
addition to the fine-grained control over the various strict mode checks
(see below) you may use the <literal>--strict</literal> commandline option
or set <literal>strict="true"</literal> in PHPUnit's XML configuration file
to enable all of them.
PHPUnit can perform the additional checks documented below while it executes
the tests.
</para>

<section id="strict-mode.useless-tests">
<section id="risky-tests.useless-tests">
<title>Useless Tests</title>

<para>
Expand All @@ -29,7 +26,7 @@
</para>
</section>

<section id="strict-mode.unintentionally-covered-code">
<section id="risky-tests.unintentionally-covered-code">
<title>Unintentionally Covered Code</title>

<para>
Expand All @@ -47,7 +44,7 @@
</para>
</section>

<section id="strict-mode.output-during-test-execution">
<section id="risky-tests.output-during-test-execution">
<title>Output During Test Execution</title>

<para>
Expand All @@ -65,7 +62,7 @@
</para>
</section>

<section id="strict-mode.test-execution-timeout">
<section id="risky-tests.test-execution-timeout">
<title>Test Execution Timeout</title>

<para>
Expand Down
27 changes: 19 additions & 8 deletions src/4.5/en/textui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ OK (2 tests, 2 assertions)</screen>
<listitem>
<para>
Printed when the test has been marked as risky (see
<xref linkend="strict-mode" />).
<xref linkend="risky-tests" />).
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -106,7 +106,7 @@ OK (2 tests, 2 assertions)</screen>

<section id="textui.clioptions">
<title>Command-Line Options</title>

<para>
Let's take a look at the command-line test runner's options in
the following code:
Expand Down Expand Up @@ -152,13 +152,15 @@ Test Execution Options:
--strict-coverage Be strict about unintentionally covered code.
--disallow-test-output Be strict about output during tests.
--enforce-time-limit Enforce time limit based on test size.
--strict Run tests in strict mode (enables all of the above).
--disallow-todo-tests Disallow @todo-annotated tests.
--process-isolation Run each test in a separate PHP process.
--no-globals-backup Do not backup and restore $GLOBALS for each test.
--static-backup Backup and restore static attributes for each test.
--colors Use colors in output.
--columns <n> Number of columns to use for progress outout.
--columns max Use maximum number of columns for progress outout.
--stderr Write to STDERR instead of STDOUT.
--stop-on-error Stop execution upon first error.
--stop-on-failure Stop execution upon first error or failure.
Expand Down Expand Up @@ -538,7 +540,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Be strict about tests that do not test anything. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand All @@ -548,7 +550,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Be strict about unintentionally covered code. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand All @@ -558,7 +560,16 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Be strict about output during tests. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><literal>--disallow-todo-tests</literal></term>
<listitem>
<para>
Does not execute tests which have the <literal>@todo</literal> annotation in its docblock.
</para>
</listitem>
</varlistentry>
Expand All @@ -568,7 +579,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Enforce time limit based on test size. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand All @@ -580,7 +591,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
Run tests in strict mode (same as using <literal>--report-useless-tests</literal>,
<literal>--strict-coverage</literal>, <literal>--disallow-test-output</literal>,
and <literal>--enforce-time-limit</literal>). See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion src/4.6/en/annotations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ public function testMoneyCanBeDepositedInAccount()
<para>
This annotation is especially useful in strict coverage mode where
unintentionally covered code will cause a test to fail. See
<xref linkend="strict-mode.unintentionally-covered-code"/> for more
<xref linkend="risky-tests.unintentionally-covered-code"/> for more
information regarding strict coverage mode.
</para>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/4.6/en/book.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<xi:include href="textui.xml"/>
<xi:include href="fixtures.xml"/>
<xi:include href="organizing-tests.xml"/>
<xi:include href="strict-mode.xml"/>
<xi:include href="risky-tests.xml"/>
<xi:include href="incomplete-and-skipped-tests.xml"/>
<xi:include href="database.xml"/>
<xi:include href="test-doubles.xml"/>
Expand Down
11 changes: 4 additions & 7 deletions src/4.5/en/strict-mode.xml → src/4.6/en/risky-tests.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>

<chapter id="strict-mode">
<title>Strict Mode</title>
<chapter id="risky-tests">
<title>Risky Tests</title>

<para>
PHPUnit can perform additional checks while it executes the tests. In
addition to the fine-grained control over the various strict mode checks
(see below) you may use the <literal>--strict</literal> commandline option
or set <literal>strict="true"</literal> in PHPUnit's XML configuration file
to enable all of them.
PHPUnit can perform the additional checks documented below while it executes
the tests.
</para>

<section id="strict-mode.useless-tests">
Expand Down
54 changes: 10 additions & 44 deletions src/4.6/en/textui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ OK (2 tests, 2 assertions)</screen>
<listitem>
<para>
Printed when the test has been marked as risky (see
<xref linkend="strict-mode" />).
<xref linkend="risky-tests" />).
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -153,15 +153,14 @@ Test Execution Options:
--disallow-test-output Be strict about output during tests.
--enforce-time-limit Enforce time limit based on test size.
--disallow-todo-tests Disallow @todo-annotated tests.
--strict Run tests in strict mode (enables all of the above).
--process-isolation Run each test in a separate PHP process.
--no-globals-backup Do not backup and restore $GLOBALS for each test.
--static-backup Backup and restore static attributes for each test.
--colors=<flag> Use colors in output ("never", "auto" or "always").
--columns <n> Number of columns to use for progress output.
--columns max Use maximum number of columns for progress output.
--colors Use colors in output.
--columns <n> Number of columns to use for progress outout.
--columns max Use maximum number of columns for progress outout.
--stderr Write to STDERR instead of STDOUT.
--stop-on-error Stop execution upon first error.
--stop-on-failure Stop execution upon first error or failure.
Expand Down Expand Up @@ -273,7 +272,7 @@ Miscellaneous Options:
<term><literal>--coverage-php</literal></term>
<listitem>
<para>
Generates a serialized PHP_CodeCoverage object with the
Generates a serialized PHP_CodeCoverage object with the
code coverage information.
</para>
<para>
Expand Down Expand Up @@ -541,7 +540,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Be strict about tests that do not test anything. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand All @@ -551,7 +550,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Be strict about unintentionally covered code. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand All @@ -561,7 +560,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Be strict about output during tests. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand All @@ -580,7 +579,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
<listitem>
<para>
Enforce time limit based on test size. See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand All @@ -592,7 +591,7 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
Run tests in strict mode (same as using <literal>--report-useless-tests</literal>,
<literal>--strict-coverage</literal>, <literal>--disallow-test-output</literal>,
and <literal>--enforce-time-limit</literal>). See <xref
linkend="strict-mode" /> for details.
linkend="risky-tests" /> for details.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -637,39 +636,6 @@ class TestCaseClass extends \PHPUnit_Framework_TestCase
Use colors in output.
On Windows, use <ulink url="https://github.com/adoxa/ansicon">ANSICON</ulink> or <ulink url="https://github.com/Maximus5/ConEmu">ConEmu</ulink>.
</para>
<para>
There are three possible values for this option:
<itemizedlist>
<listitem>
<para>
<literal>never</literal>: never displays colors in the output. This is the default value when <literal>--colors</literal> option is not used.
</para>
</listitem>
<listitem>
<para>
<literal>auto</literal>: displays colors in the output unless the current terminal doesn't supports colors,
or if the output is piped to a command or redirected to a file.
</para>
</listitem>
<listitem>
<para>
<literal>always</literal>: always displays colors in the output even when the current terminal doesn't supports colors,
or when the output is piped to a command or redirected to a file.
</para>
</listitem>
</itemizedlist>
When <literal>--colors</literal> is used without any value, <literal>auto</literal> is the chosen value.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><literal>--columns</literal></term>
<listitem>
<para>
Defines the number of columns to use for progress output.
If <literal>max</literal> is defined as value, the number of columns will be maximum of the current terminal.
</para>
</listitem>
</varlistentry>

Expand Down
2 changes: 1 addition & 1 deletion src/4.7/en/annotations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ public function testMoneyCanBeDepositedInAccount()
<para>
This annotation is especially useful in strict coverage mode where
unintentionally covered code will cause a test to fail. See
<xref linkend="strict-mode.unintentionally-covered-code"/> for more
<xref linkend="risky-tests.unintentionally-covered-code"/> for more
information regarding strict coverage mode.
</para>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/4.7/en/book.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<xi:include href="textui.xml"/>
<xi:include href="fixtures.xml"/>
<xi:include href="organizing-tests.xml"/>
<xi:include href="strict-mode.xml"/>
<xi:include href="risky-tests.xml"/>
<xi:include href="incomplete-and-skipped-tests.xml"/>
<xi:include href="database.xml"/>
<xi:include href="test-doubles.xml"/>
Expand Down
11 changes: 4 additions & 7 deletions src/4.6/en/strict-mode.xml → src/4.7/en/risky-tests.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>

<chapter id="strict-mode">
<title>Strict Mode</title>
<chapter id="risky-tests">
<title>Risky Tests</title>

<para>
PHPUnit can perform additional checks while it executes the tests. In
addition to the fine-grained control over the various strict mode checks
(see below) you may use the <literal>--strict</literal> commandline option
or set <literal>strict="true"</literal> in PHPUnit's XML configuration file
to enable all of them.
PHPUnit can perform the additional checks documented below while it executes
the tests.
</para>

<section id="strict-mode.useless-tests">
Expand Down

0 comments on commit 1505497

Please sign in to comment.