Skip to content

Commit

Permalink
Merge pull request dsyph3r#11 from jaimesuez/patch-4
Browse files Browse the repository at this point in the history
Small fix in Testing
  • Loading branch information
dsyph3r committed Feb 11, 2012
2 parents ea91d35 + f531a12 commit 26ae639
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/testing-unit-and-functional-phpunit.rst
Expand Up @@ -716,16 +716,16 @@ As your test suite gets large, running tests can be a time consuming tasks.
$ phpunit -c app/ src/Blogger/BlogBundle/Tests/Controller/PageControllerTest.php
You should be greeted with the message ``OK (1 test, 1 assertion)`` letting us
know that 1 test (the ``testAboutIndex()``) ran, with 1 assertion (the ``assertEquals()``).
know that 1 test (the ``testAbout()``) ran, with 1 assertion (the ``assertEquals()``).

Try changing the ``About symblog`` string to ``Contact`` and then re run the test.
The test will now fail as ``Contact`` wont be found, causing ``asertEquals`` to
equate to false.

.. code-block:: bash
1) Blogger\BlogBundle\Tests\Controller\PageControllerTest::testAboutIndex
Failed asserting that <boolean:false> is true.
1) Blogger\BlogBundle\Tests\Controller\PageControllerTest::testAbout
Failed asserting that 0 matches expected 1.
Revert the string back to ``About symblog`` before moving on.

Expand Down

0 comments on commit 26ae639

Please sign in to comment.