diff options
Diffstat (limited to 'doc/md')
-rw-r--r-- | doc/md/Unit-tests.md | 75 |
1 files changed, 4 insertions, 71 deletions
diff --git a/doc/md/Unit-tests.md b/doc/md/Unit-tests.md index 74920ac1..da993109 100644 --- a/doc/md/Unit-tests.md +++ b/doc/md/Unit-tests.md | |||
@@ -22,12 +22,11 @@ $ composer update | |||
22 | 22 | ||
23 | See http://xdebug.org/docs/install | 23 | See http://xdebug.org/docs/install |
24 | 24 | ||
25 | For Debian-based distros: | ||
26 | ```bash | 25 | ```bash |
26 | # for Debian-based distributions | ||
27 | $ aptitude install php5-xdebug | 27 | $ aptitude install php5-xdebug |
28 | ``` | 28 | |
29 | For ArchLinux: | 29 | # for ArchLinux: |
30 | ```bash | ||
31 | $ pacman -S xdebug | 30 | $ pacman -S xdebug |
32 | ``` | 31 | ``` |
33 | 32 | ||
@@ -38,74 +37,8 @@ zend_extension=xdebug.so | |||
38 | 37 | ||
39 | #### Run unit tests | 38 | #### Run unit tests |
40 | 39 | ||
41 | Successful test suite: | 40 | Run `make test` and ensure tests return `OK`. If tests return failures, refer to PHPUnit messages and fix your code/tests accordingly. |
42 | ```bash | ||
43 | $ make test | ||
44 | |||
45 | ------- | ||
46 | PHPUNIT | ||
47 | ------- | ||
48 | PHPUnit 4.6.9 by Sebastian Bergmann and contributors. | ||
49 | |||
50 | Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml | ||
51 | |||
52 | .................................... | ||
53 | |||
54 | Time: 759 ms, Memory: 8.25Mb | ||
55 | |||
56 | OK (36 tests, 65 assertions) | ||
57 | ``` | ||
58 | |||
59 | Test suite with failures and errors: | ||
60 | ```bash | ||
61 | $ make test | ||
62 | ------- | ||
63 | PHPUNIT | ||
64 | ------- | ||
65 | PHPUnit 4.6.9 by Sebastian Bergmann and contributors. | ||
66 | |||
67 | Configuration read from /home/virtualtam/public_html/shaarli/phpunit.xml | ||
68 | 41 | ||
69 | E..FF............................... | ||
70 | |||
71 | Time: 802 ms, Memory: 8.25Mb | ||
72 | |||
73 | There was 1 error: | ||
74 | |||
75 | 1) LinkDBTest::testConstructLoggedIn | ||
76 | Missing argument 2 for LinkDB::__construct(), called in /home/virtualtam/public_html/shaarli/tests/Link\ | ||
77 | DBTest.php on line 79 and defined | ||
78 | |||
79 | /home/virtualtam/public_html/shaarli/application/LinkDB.php:58 | ||
80 | /home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:79 | ||
81 | |||
82 | -- | ||
83 | |||
84 | There were 2 failures: | ||
85 | |||
86 | 1) LinkDBTest::testCheckDBNew | ||
87 | Failed asserting that two strings are equal. | ||
88 | --- Expected | ||
89 | +++ Actual | ||
90 | @@ @@ | ||
91 | -'e3edea8ea7bb50be4bcb404df53fbb4546a7156e' | ||
92 | +'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834' | ||
93 | |||
94 | /home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:121 | ||
95 | |||
96 | 2) LinkDBTest::testCheckDBLoad | ||
97 | Failed asserting that two strings are equal. | ||
98 | --- Expected | ||
99 | +++ Actual | ||
100 | @@ @@ | ||
101 | -'e3edea8ea7bb50be4bcb404df53fbb4546a7156e' | ||
102 | +'85eab0c610d4f68025f6ed6e6b6b5fabd4b55834' | ||
103 | |||
104 | /home/virtualtam/public_html/shaarli/tests/LinkDBTest.php:133 | ||
105 | |||
106 | FAILURES! | ||
107 | Tests: 36, Assertions: 63, Errors: 1, Failures: 2. | ||
108 | ``` | ||
109 | 42 | ||
110 | #### Test results and coverage | 43 | #### Test results and coverage |
111 | 44 | ||