i'm new to symfony2, and learning how to do unit test in this framework, i created the php "calculator" and the test class following the tutorial http://symfony.com/doc/current/book/testing.html
C:\xampp\htdocs\sym1\blog>phpunit -c app src/AppBundle/Tests/Util/CalculatorTest
.php
PHPUnit 3.7.21 by Sebastian Bergmann.
Configuration read from C:\xampp\htdocs\sym1\blog\app\phpunit.xml.dist
.
Time: 0 seconds, Memory: 3.00Mb
[30;42m[2KOK (1 test, 1 assertion)
[0m[2K
I ran the command, but I don't understand the output, what is the meaning of this output?
Time: 0 seconds, Memory: 3.00Mb
[30;42m[2KOK (1 test, 1 assertion)
[0m[2K
That means that you had:
one test: which means you have in total one method (name starting with test
) in all test classes (ones which name ends with Test
)
one assertion: in all of your tests you had one $this->assert*
call (like assertTrue
, assertFalse
etc)
Notice also one .
(dot) above Time 0 seconds
. A dot represents test which was successfull (there were no tests failure). More test you have, more dots printed. Dots will turn into F
in case of failure, E
in case of error - some more options are possible.