PHP Objects, Patterns and Practice (3rd edition)

(Barry) #1

CHAPTER 20 ■ CONTINUOUS INTEGRATION


config-set succeeded


Then you can install.

$ pear install --alldeps phpunit/PHP_CodeBrowser


downloading PHP_CodeBrowser-0.1.2.tgz ...
Starting to download PHP_CodeBrowser-0.1.2.tgz (76,125 bytes)
.................done: 76,125 bytes
install ok: channel://pear.phpunit.de/PHP_CodeBrowser-0.1.2


If all goes well, you’ll have a command line tool called phpcb available. I’m going to point it at my
source code. phpcb likes to have access to log files generated by PHPUnit, so first I’ll run the tests first.


$ mkdir log
$ phpunit --log-junit log/log.xml test/


Now I can run phpcb:

$ mkdir output
$ phpcb --log log --output output/ --source userthing/


This writes files to the output directory. Figure 20–3 shows the output, which you can get by opening
the generated index.html file in a browser.

Free download pdf